Cerb + Salesforce
- Introduction
- Create an app at Salesforce
- Create the Salesforce service in Cerb
- Link the connected account to Salesforce in Cerb
- Use the connected account in bot behaviors
Introduction
In this guide we’ll walk through the process of linking Cerb to Salesforce. You’ll be able to use the full Salesforce API from bots in Cerb to automate whatever you need.
Create an app at Salesforce
Next, you need to create a new app on Salesforce for Cerb to connect to.
Configure basic information
-
Log in to Salesforce.
-
Click Setup in the top right.
-
In the Build menu on the right, expand Create and select Apps.
-
In the Connected Apps section at the bottom, click the New button.
-
Enter the following details:
- Connected App Name:
Salesforce for Cerb
- API Name:
Salesforce_for_Cerb
- Contact Email: (your email address)
-
Logo URL: image
Configure OAuth
In the API (Enable OAuth Settings) section:
- Enable OAuth Settings: yes
- Callback URL:
https://YOUR-CERB-HOST/oauth/callback
- Selected OAuth Scopes:
- Perform requests on your behalf at any time (refresh_token, offline_access)
- Access and manage your data (api)
- Provide access to your data via the Web (web)
Copy your OAuth credentials
-
Scroll to the bottom and click the Save button.
-
Click the Continue button.
-
Make a note of your Consumer Key and Consumer secret. You’ll need them in the next step.
Create the Salesforce service in Cerb
-
Navigate to Search » Connected Services.
-
Click the (+) icon in the top right of the list.
-
Select Salesforce.
-
Enter your Client ID and Client Secret.
-
Click the Create button.
Link the connected account to Salesforce in Cerb
-
Navigate to Search » Connected Accounts.
-
Click the (+) icon in the top right of the list.
-
Select Salesforce.
-
Click the blue Link to Salesforce button.
-
Accept consent on Salesforce.
-
Click the Save Changes button.
It may take up to 10 minutes for your new app to be available in Salesforce. If you have trouble with the OAuth authentication step, wait a few minutes and try again.
Use the connected account in bot behaviors
You can use the connected account you just created to access the Saleforce REST API from bot behaviors in Cerb. This is typically accomplished using the Execute HTTP Request action from a bot, and selecting the connected account in the Authentication: section.
You can import the Salesforce Bot package for a working example.