Outbound Server Socket (OSS) messages
updateChat
The first updateChat message received contains the full chat information, and subsequent calls may only update certain fields in the chat.
Parameter | Type | Description |
---|---|---|
ChatID | string id | The ID of the chat that you want to update. |
Values | JSON Object | The detail of the chat to be updated. If this is the first message for a ChatID, then this represents all chat information. If the Values parameter is null then the record should be deleted. |
Possible values for EndedReason are the following:
Value | Description |
---|---|
unknown | The chat was ended for an unknown reason. |
operator | The chat was ended by the agent |
visitor | The chat was ended by the customer |
disconnect | The chat was ended because the customer's WebSocket disconnected and timed out. |
updateTyper
The first updateTyper message that is received will contain the full information about the person, and subsequent calls may only update some fields.
Parameter | Type | Description |
---|---|---|
PersonID | string id | The ID of the person whose chat you want to update. |
Values | JSON Object | The detail of the person that you want to update. If this is the first message received for a PersonID, then this represents all person details. If the Values parameter is null then the record should be deleted. |
{
"method":"updateTyper",
"params":
[
{
"PersonID":"5701072127270",
"Values":
{
"Name":"Bob",
"PersonType":"operator",
"IsTyping":true,
"ImageURL":"http://8fe8.r10.cf1.somecdn.com/wow1.jpg"
}
}
]
}
Possible values for PersonType are the following:
Value | Description |
---|---|
operator | The agent handling the chat. |
visitor | The customer who is chatting (typically the API user). |
system | An automated message of the system. |
addMessage
This method is used for the customer to receive messages from the agent. The first addMessage message received contains the full information about the message, and subsequent calls may only update certain fields.
Parameter | Type | Description |
---|---|---|
MessageID | string id | The ID of the chat message that is updated. |
Values | JSON Object | The information of the chat message to be updated. If this is the first message received for a MessageID then it contains all chat message information. If the Values parameter is null then the record should be deleted. |
{
"method":"addMessage",
"params":
[
{
"MessageID":"804881981652",
"Values":
{
"Created":"2014-02-28T13:42:57Z",
"Text":"Hello World!",
"PersonID":"5701072127270",
"PersonType":"operator",
"Name":"Bob"
}
}
]
}
Possible values for PersonType are the following:
Value | Description |
---|---|
operator | The agent handling the chat. |
visitor | The customer who is chatting. |
system | An automated message of the system. |
autoMessage
Textual message to be displayed to customers while they are waiting for the chat to be answered.
Parameter | Type | Description |
---|---|---|
Text | string | Textual message to display while the customer is waiting. |
{
"method":"autoMessage",
"params":
[
{
"Text":"Thank you for your patience, we will be with you soon."
}
]
}
updateBusy
Provides information about the status of the customer's chat while waiting for an agent.
Parameter | Type | Description |
---|---|---|
Position | integer | Position in the queue. When zero, it indicates the chat is no longer in queue and is waiting to be answered by the assigned agent. In this case, the queue position message should be hidden. The chat may still be placed back to queue if the agent does not answer. |
UnavailableFormEnabled | boolean | If this parameter is true and the user cancels waiting for the chat to be answered, then the unavailable email form should be displayed to the customer. The field information for the unavailable form can be retrieved by the getUnavailableForm method. |
{
"method":"updateBusy",
"params":
[
{
"Position":2,
"UnavailableFormEnabled":true
}
]
}
beginActiveAssist
Notifies the visitor that the agent has requested an Active Assist session. The customer should be prompted to allow the session, and then the acceptActiveAssist method should be called. If Active Assist is not supported then these messages can be ignored.
Parameter | Type | Description |
---|---|---|
ActiveAssistID | string id | The ID of the Active Assist session that is requested. |
ActiveAssistType | string | The type of Active Assist session being requested. |
{
"method":"beginActiveAssist",
"params":
[
{
"ActiveAssistID":"13281457415073",
"ActiveAssistType":"screenshare",
"ScreenshareURL":"https://secure.logmeinrescue.com/?param=blah",
"PinCode":"123456"
}
]
}
Possible values for ActiveAssistType are the following:
Value | Description |
---|---|
screenshare | The agent requests to see the entire screen of the customer's computer or device. |
cobrowse | The agent requests to see only the customer's browser. |
updateActiveAssist
Receive updated information about an active Active Assist message. If there is no Active Assist session then these messages should be ignored.
Param | Type | Description |
---|---|---|
ActiveAssistID | string id | The Active Assist session to be updated. |
Values | JSON Object | The information of the Active Assist session to be updated. If this is the first message received for an ActiveAssistID then this represents all chat message information. If the Values parameter is null then the record should be deleted. |
{
"method":"updateActiveAssist",
"params":
[
{
"ActiveAssistID":"13281457415073",
"Values":
{
"Started":"2014-02-28T13:42:57Z",
"Ended":"2014-02-28T13:52:27Z",
"ReconnectOnReboot":false
}
}
]
}