- DarkLight
Save Custom Variables
- DarkLight
Overview
This method is used to save custom variables against a call. The variables sent in this API should have a corresponding mapping in Salesforce Admin rules (Call Log section / URL Invoke Section). These values will not be updated immediately as in “Update Object” request but are updated during the corresponding event configuration in Salesforce admin rules.
Pre-requisite
The Agent must be on an active call.
Sequence Diagram

Message Structure
Request Parameters | Value |
|---|---|
channel | Salesforce |
topic | Call |
subtopic | SaveCustomVariables |
source | «Source application name» |
data | «JSON Object» |
Data Parameters
Parameter | Data Type | Description | Sample Value |
|---|---|---|---|
callid | String | Call ID for which you want to remove variables | 12345 |
params | JSON Object | Custom variables to be removed. |
Response Parameters | Value |
|---|---|
channel | Salesforce |
topic | Call |
subtopic | SaveCustomVariables |
source | «JSON Object» |
Response Data Parameters
Parameter | Data Type | Description | Sample Value |
|---|---|---|---|
callid | String | Call ID for which you want to remove variables | 12345 |
params | JSON Object | Custom variables to be removed. | |
Success | Boolean | Indicates if the custom variables are removed. | True |
ErrorMessage | String | The error message is the response is a failure |
Sample Request
{
"channel": "Salesforce",
"topic": "Call",
"subtopic": "SaveCustomVariables",
"source": "myapp",
"data":
{
"callId": "12345",
"params":
{
"variable1": "Value 1",
"variable2": "Value 2",
"variable3": "Value 3"
}
}
}Sample Response
{
"channel": "Salesforce",
"topic": "Call",
"subtopic": "SaveCustomVariables",
"data":
{
"callId": "12345",
"params":
{
"variable1": "Value 1",
"variable2": "Value 2",
"variable3": "Value 3"
},
"Success": true,
"ErrorMessage": null
}
}