Add this first. This tool needs an access token, so add Get Salesforce Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Get a Salesforce access token first if you do not already have one. Create a support case in Salesforce. Summarise the customer's issue in the subject and give the detail in the description. Returns the new case record ID with success set to true. Tell the customer the case has been logged.
Request
POSThttps://YOUR_INSTANCE.my.salesforce.com/services/data/v67.0/sobjects/Case
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}
Body
{
"Subject": "{{subject}}",
"Description": "{{description}}",
"Origin": "Phone",
"Status": "New"
}Parameters
subject stringA short summary of the issue.description stringThe full detail of the issue as the customer described it.accessToken stringThe access_token value returned by Get Salesforce Access Token. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "fd24b6f5-af49-449c-9bc6-2f3afbf131bf",
"type": "HTTP_REQUEST",
"label": "Create Salesforce Case",
"name": "create_salesforce_case",
"customName": false,
"description": "Get a Salesforce access token first if you do not already have one. Create a support case in Salesforce. Summarise the customer's issue in the subject and give the detail in the description. Returns the new case record ID with success set to true. Tell the customer the case has been logged.",
"parameters": [
{
"name": "subject",
"type": "string",
"description": "A short summary of the issue."
},
{
"name": "description",
"type": "string",
"description": "The full detail of the issue as the customer described it."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by Get Salesforce Access Token. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://YOUR_INSTANCE.my.salesforce.com/services/data/v67.0/sobjects/Case"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": "{\n \"Subject\": \"{{subject}}\",\n \"Description\": \"{{description}}\",\n \"Origin\": \"Phone\",\n \"Status\": \"New\"\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.