Skip to main content

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:

ParameterTypeMandatoryDescription
userIdstringYesClient ID assigned on JAICP.
destinationIdstringYesAgent ID assigned by the agent application.
userNamestringNoThe client’s first name. If no value has been passed, the agent will see {channel} {userId} as the name.
attributesstringNoField pre-chat.
Accepts JSON in the {"key":"value"} form.
Parameters will be passed to the agent as additional client info.
hiddenAttributesstringNoPre-chat of the field that will not be sent to the agent.
The format is similar to attributes.
customDatastringNoAdditional data to be switched to the agent. Add the customData parameter in the switch response (accepts JSON) when the chat is switched.

Response

Response format:

200 (OK)    // request successfully completed