- DarkLight
Set Business Fields
- DarkLight
Overview
The SetBusinessFields API helps agents update the business data of a contact.

Pre-requisite
The Agent must be on an active call or logged in to the application.
Sequence Diagram

Message Structure
Request Parameters | Value |
|---|---|
channel | LCM |
topic | Webservice |
subtopic | SetContactBusinessFields |
source | «app-name-broadcasting-this-message» |
data | N/A |
Data Parameters
Parameter | Mandatory | Data Type | Description |
|---|---|---|---|
callid | Yes | String | The Call ID generated by the application. |
AccountNumber | Yes | String | The LCM Key. |
AgentID | Yes | String | The agent ID. |
businessField | Yes | JSON Array | The business fields to be updated by the agent. |
BusinessField Parameters | |||
FieldName | Yes | String | The business field name |
Value | Yes | String | The value for the business field. |
DataType | Yes | String | The data type for the business field value - String, Number, DateTime, etc. |
Format | Yes | String | The format of the data type. |
Response Parameters | Value |
|---|---|
channel | LCM |
topic | Webservice |
subtopic | SetContactBusinessFieldsResult |
message | «JSON Object» |
Message Parameters
Parameter | Mandatory | Data Type | Description |
|---|---|---|---|
callid | Yes | String | The call ID generated by the application. |
response | Yes | JSON Object | The response data. |
Response Parameters | |||
success | Yes | Boolean | The business field update status. |
Possible Error Cases
Error Type | Actual Error | Message |
|---|---|---|
WS_Error | Callid is empty | Invalid Call ID. |
WS_Error | Invalid Call ID:<call_id> | Invalid Call ID. |
mple Request
{
"channel": "LCM",
"topic": "WebService",
"subtopic": "SetContactBusinessFields",
"data":
{
"callid": "12345",
"AccountNumber": "5|3|1|0|0|44|1",
"AgentID": "testagent",
"businessField":
[
{
"FieldName": "FName",
"Value": "Test",
"DataType": "String",
"Format": ""
},
{
"FieldName": "LName",
"Value": "Berry",
"DataType": "String",
"Format": ""
}
]
}
}Sample Response
{
"channel": "LCM",
"topic": "WebService",
"subtopic": "SetContactBusinessFieldsResult",
"message":
{
"callid": "12345",
"response": {
"success": true
}
}
}