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
Create a connected app
To set up a connected app in Salesforce:
In Setup, enter "Apps" in the Quick Find box and select "App Manager".
Click the "New Connected App" button (upper right corner of the screen).
Fill in "Basic Information" with the following details:
Connected App Name:
CatalogConnector
Contact Email: your email address
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.
Click the Save button to save the app and take note of your consumer key, and you consumer secret.
Click
Manage Consumer Details
Copy your Consumer Key and Consumer Secret for later
Check necessary permissions:
In Setup, go to "OAuth and OpenID Connect Settings":
Allow OAuth User-Password Flows: is checked.
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
Click your user picture or icon in the upper right corner of the screen.
Click the Settings link.
In
My Personal Information
, go to Reset My Security Token.Click the Reset Security Token button.
Save the security token for the next step
Catalog Managed
Share credentials to Catalog
Go to Settings > Integrations in Catalog
Click on "Catalog managed"
Select a name for your integration and input credentials in the following format:
{
"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
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
Catalog Identifier
(an id for us to match your Salesforce files with your Catalog instance)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 (*)
(*) The tool will upload all files included in the given directory.
Make sure it contains only the extracted files before pushing.
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?