Salesforce
Get Salesforce Access Token
Gets the access token the other Salesforce tools need. The bot calls this first.
Unverified
What the model is told
Get an access token for Salesforce. Call this once before any other Salesforce tool, then pass the access_token value from the response to those tools. The response also includes instance_url, token_type and scope. Never read the token aloud or share it with the customer. If a Salesforce tool returns a 401, call this again to get a fresh token.
Request
POSThttps://YOUR_INSTANCE.my.salesforce.com/services/oauth2/token
Headers
Content-Typeapplication/x-www-form-urlencoded
Body
grant_type=client_credentials&client_id=YOUR_SALESFORCE_CLIENT_ID&client_secret=YOUR_SALESFORCE_CLIENT_SECRETParameters
None.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "7d4a16e3-4628-4ca8-a588-52ecf18bb347",
"type": "HTTP_REQUEST",
"label": "Get Salesforce Access Token",
"name": "get_salesforce_access_token",
"customName": false,
"description": "Get an access token for Salesforce. Call this once before any other Salesforce tool, then pass the access_token value from the response to those tools. The response also includes instance_url, token_type and scope. Never read the token aloud or share it with the customer. If a Salesforce tool returns a 401, call this again to get a fresh token.",
"parameters": [],
"config": {
"endpoint": {
"method": "POST",
"url": "https://YOUR_INSTANCE.my.salesforce.com/services/oauth2/token"
},
"headers": [
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
],
"body": "grant_type=client_credentials&client_id=YOUR_SALESFORCE_CLIENT_ID&client_secret=YOUR_SALESFORCE_CLIENT_SECRET",
"timeout": null
}
}
}IDs are regenerated on every copy.