Salesforce Reporting

In order to connect to Salesforce, we will need you to create a connected app in Salesforce and input the credentials in Catalog

If you already followed the steps to create a Salesforce integration please proceed directly to Share credentials to Catalog

Create a connected app

To set up a connected app in Salesforce:

  1. In Setup, enter "Apps" in the Quick Find box and select "App Manager".

  2. Click the "New Connected App" button (upper right corner of the screen).

  3. Fill in "Basic Information" with the following details:

    • Connected App Name: CatalogConnector

    • Contact Email: your email address

  4. Fill in "API (Enable OAuth Settings)" with the following details:

    • Enable OAuth Settings: is checked.

    • Enable for Device Flow: is checked.

    • Callback URL: enter any domain, for example https://localhost — this is unused.

    • Selected OAuth Scopes:

      • add Access Lightning applications (lightning) to the Selected OAuth Scopes column.

      • add Manage user data via APIs (api)

      • add Perform requests at any time (refresh_token, offline_access)

    • Require Secret for Web Server Flow: is checked.

    • Require Secret for Refresh Token Flow: is checked.

  5. Click the Save button to save the app and take note of your consumer key, and you consumer secret.

  6. Click Manage Consumer Details

  7. Copy your Consumer Key and Consumer Secret for later

Check necessary permissions:

  1. In Setup, go to "OAuth and OpenID Connect Settings":

    • Allow OAuth User-Password Flows: is checked.

  2. In Setup, go to "Permission Sets" and make sure the Catalog connection has the following permissions:

    • Run Reports

    • View Dashboards in Public Folders

    • View Reports in Public Folders

    • Manage All Private Reports and Dashboards

    • View Roles and Role Hierarcly

    • View Setup and Configuration

Get your security token

  1. Click your user picture or icon in the upper right corner of the screen.

  2. Click the Settings link.

  3. In My Personal Information , go to Reset My Security Token.

  4. Click the Reset Security Token button.

  5. Save the security token for the next step

Catalog Managed

Share credentials to Catalog

  1. Go to Settings > Integrations in Catalog

  2. Click on "Catalog managed"

  3. Select a name for your integration and input credentials in the following format:

username: we expect the user email address here

{
    "baseUrl": "<Your salesforce host>",
    "username": "<Your email address>",
    "password": "<Your password>",
    "securityToken": "<Your security token>",
    "clientId": "<Your consumer key>",
    "clientSecret": "<Your consumer secret>"
}

For your first sync, it will take up to 48h and we will let you know when it is complete ✅

If you are not comfortable giving us access to your credentials, please continue to Client managed 👇

Client managed

Doing a one shot extract

For your trial, you can simply give us a one shot view of your BI tool's and upload them directly in the App

Running the Extraction package

Install the PyPi package

pip install castor-extractor[salesforce-viz]

For further details: link

Running the PyPi package

Once the package has been installed, you should be able to run the following command in your terminal:

castor-extract-salesforce-viz [arguments]

Credentials

  • -u, --username: Salesforce username

  • -p, --password: Salesforce password

  • -c, --client-id: Salesforce client id

  • -s, --client-secret: Salesforce client secret

  • -t, --security-token: Salesforce security token

  • -b, --base-url: Salesforce instance URL

Other arguments

  • -o, --output: target folder to store the extracted files

You can also get help with argument --help

Scheduling and Push to Catalog

When moving out of trial, you'll want to refresh your Salesforce Reporting content in Catalog. Here is how to do it:

The Catalog team will provide you with

  1. Catalog Identifier (an id for us to match your Salesforce files with your Catalog instance)

  2. Catalog Token An API Token

You can then use the castor-upload command:

castor-upload [arguments]

Arguments

  • -k, --token: Token provided by Catalog

  • -s, --source_id: account id provided by Catalog

  • -t, --file_type: source type to upload. Currently supported are { DBT | VIZ | WAREHOUSE }

Target files

To specify the target files, provide one of the following:

  • -f, --file_path: to push a single file

or

  • -d, --directory_path: to push several files at once (*)

Then you'll have to schedule the script run and the push to Catalog, use your preferred scheduler to create this job

You're done!

Last updated

Was this helpful?