The Salesforce Service integration allows an agent to look up, validate, and create Salesforce cases during a call using data drawn directly from your Salesforce org.
- Log into Salesforce and click the settings icon in the top right corner, then click Setup.
- Using the search bar on the left, search for "apps". Click the dropdown arrow on Apps, then the dropdown arrow on External Client Apps, then Settings.
- On the External Client App Settings page, scroll to the Connected Apps section and toggle "Allow creation of connected apps" on.
- Click New Connected App.
- Fill in the basic information: Connected App Name, API Name, Contact Email, Contact Phone, Logo Image URL, Icon URL, Info URL and Description.
- Under "API (Enable OAuth Settings)", tick "Enable OAuth Settings".
- Enter your Callback URL. This should be
https://login.salesforce.com/, but confirm this with your provider.
- Select your OAuth Scopes from the list available — click a scope, then the right-facing arrow under Add to add it.
- Scroll to the bottom of the page and click Save.
Alternatively, follow the guidance in this walkthrough video.
Note: if you make changes to an existing connected app, updates may take up to 10 minutes to come into effect.
- Search for and click App Manager in the search bar.
- Find the app you have just created, click the drop-down arrow to the far right, and click View.
- Under the "API (Enable OAuth Settings)" drop-down, click Manage Consumer Details. You may need to verify your identity with a code sent to the email address your account is set up with.
- Copy both the Consumer Key and Consumer Secret and store them securely for the next step.
- Go to the Integrations tab in the left-hand sidebar, scroll to Available and click the Salesforce integration block.
- Enter your Salesforce OAuth URL (Login URL) in the box, then click Install. You will be taken to the Salesforce website to log in with your credentials.
- Under Required Fields, select which case fields you want an agent to fill out during a user interaction — for example Contact ID, Subject, Case Reason.
- Under Return Fields, select which case fields should be shown back to the caller — for example Case ID, Case Number, Status, Case Origin, Case Reason, Subject.
- Next to Validation Links, click Add Link.
- Toggle the slider to Preset.
- Choose the Object Type — the category of data to be validated (for example an individual contact or a business site).
- Choose the Field to use as the means of validation.
- Enter a test value under Testing (for example, a postcode like SW1A 2AA if you selected postcode as the field).
- Click Test.
- Once validation succeeds, click Add in the bottom right-hand corner.
- Toggle the slider to Custom.
- Write the SOQL query in the SOQL Query box. See the Salesforce SOQL reference for more on how SOQL (Salesforce Object Query Language) works.
- Select which piece of data to return to a caller in response to their query.
- Enter the name given to the return field within the database (for example, an Id field within a site database might be named
site_id).
- Enter a test value under Testing (for example
012 if the return field is Id).
- Click Test.
- Once validation succeeds, click Add in the bottom right-hand corner.
- Click Save Changes in the bottom right-hand corner.
- Go to the Agents tab and click Create New Agent (or Edit an existing agent).
- Open the Integrations drop-down and select the Salesforce integration you have set up.
- Click Save Agent at the bottom of the page.
Tool calls can be inspected from an agent's transcript by enabling Show Tool Logging and expanding the Tool Request and Tool Response blocks. This will show, for example, whether an email address was correctly matched to a Salesforce contact, or the reason a case-creation call failed (invalid or missing required field values are the most common cause).