Discover the seamless integration process of combining Salesforce Service Cloud's capabilities with Viable's analytical AI prowess. This tutorial will guide you in obtaining all messages linked to cases in Salesforce Service Cloud and channeling them to Viable as transcripts.
You'll need your Salesforce Consumer Key, Consumer Secret, Username, and Password for this step.
Open your Python environment and run the following code:
import requests
# Replace with your Salesforce credentials
params = {
'grant_type': 'password',
'client_id': 'YOUR_CONSUMER_KEY',
'client_secret': 'YOUR_CONSUMER_SECRET',
'username': 'YOUR_USERNAME',
'password': 'YOUR_PASSWORD'
}
auth_url = '<https://login.salesforce.com/services/oauth2/token>'
auth_resp = requests.post(auth_url, params=params)
# Extract access token and instance URL for further use
access_token = auth_resp.json().get('access_token')
instance_url = auth_resp.json().get('instance_url')
Now that you're authenticated, let's fetch the cases:
We'll collect all the messages associated with each case and compile them into a single transcript.
Use the API key from Step 1 to post the transcripts to Viable:
Congratulations! You've now adeptly fused Salesforce Service Cloud and Viable, ensuring streamlined analytics and insights.