selectDestination
Create a session between the chatbot client and the selected agent.
Request
POST {apiUrl}/selectDestination
Request body:
{
"userId":"<userId>",
"destinationId":"54321",
"userName":"firstName lastName",
"attributes":{
"key1":"value1",
"key2":"value2"
},
"hiddenAttributes":{
"key1":"value1",
"key2":"value2"
},
"customData":{
}
}
Request parameters:
Parameter | Type | Mandatory | Description |
---|---|---|---|
userId |
string |
Yes | Client ID assigned on JAICP. |
destinationId |
string |
Yes | Agent ID assigned by the agent application. |
userName |
string |
No | The client’s first name. If no value has been passed, the agent will see {channel} {userId} as the name. |
attributes |
string |
No | Field pre-chat. Accepts JSON in the {"key":"value"} form. Parameters will be passed to the agent as additional client info. |
hiddenAttributes |
string |
No | Pre-chat of the field that will not be sent to the agent. The format is similar to attributes . |
customData |
string |
No | Additional data to be switched to the agent. Add the customData parameter in the switch response (accepts JSON) when the chat is switched. |
Answer
Response format:
200 (OK) // request successfully completed