Newer Version Available

This content describes an older version of this product. View Latest

Response Bodies for Live Agent REST API

A request to a Live Agent REST API resource returns a response code. The successful execution of a resource request can also return a response body in JSON format.

Availability

Response Properties
Property Name Type Description Available Versions
results Array of Result objects A list of Salesforce IDs that correspond to agents and chat buttons and their respective availability to receive new chat requests. 29.0
Response body

ChasitorSessionData

Response Properties
Property Name Type Description Available Versions
queuePosition integer The position of the chat visitor in the chat queue. 29.0
geoLocation GeoLocation object The chat visitor's location, based on the IP address from which the request originated. 29.0
url String The URL that the chat visitor is visiting. 29.0
oref String The original URL that the chat request came from. 29.0
postChatUrl String The URL to which to redirect the chat visitor after the chat has ended. 29.0
sneakPeekEnabled Boolean Whether Sneak Peek is enabled for the agent who accepts the chat. 29.0
chatMessages Array of TranscriptEntry objects The chat message structure that’s synchronized across the agent.js and chasitor.js files. 29.0
Response body

ChatEstablished

Response properties
Property Name Type Description Available Versions
name String The name of the agent who is engaged in the chat. 29.0
userId String The user ID of the agent who is engaged in the chat. 29.0
sneakPeekEnabled Boolean Whether Sneak Peek is enabled for the agent who accepts the chat. 29.0
Response body

ChatMessage

Response properties
Property Name Type Description Available Versions
name String The name of the agent who is engaged in the chat. 29.0
text String The text of the chat message that the agent sent to the chat visitor. 29.0
Response body

ChatRequestFail

Response properties
Property Name Type Description Available Versions
reason String The reason why the chat request failed—for example, no agents were available to chat or an internal error occurred. 29.0
postChatUrl String The URL of the post-chat page to which to redirect the chat visitor after the chat has ended. 29.0
Response body

ChatRequestSuccess

Response properties
Property Name Type Description Available Versions
queuePosition integer The position of the chat visitor in the chat queue. 29.0
geoLocation GeoLocation object The chat visitor's location, based on the IP address from which the request originated. 29.0
url String The URL that the chat visitor is visiting. 29.0
oref String The original URL that the chat request came from. 29.0
postChatUrl String The URL to which to redirect the chat visitor after the chat has ended. 29.0
customDetails Array of CustomDetail objects The custom details of the deployment from which the chat request was initiated. 29.0
visitorId String The ID of the chat visitor. 29.0
Response body

ChatTransferred

Response properties
Property Name Type Description Available Versions
name String The name of the agent to whom the chat was transferred. 29.0
userId String The ID of the chat visitor. 29.0
sneakPeekEnabled Boolean Whether Sneak Peek is enabled for the agent to whom the chat was transferred. 29.0
Response body

CustomEvent

Response properties
Property Name Type Description Available Versions
type String The type of custom event that occurred, used for adding the event listener on the chat visitor’s side. 29.0
data String Data that’s relevant to the event that was sent to the chat visitor. 29.0
Response body

Messages

Response Properties
Property Name Type Description Available Versions
messages Array of Message objects The messages that was sent over the course of a chat. 29.0
sequence integer The sequence of the message as it was received over the course of a chat. 29.0
Response body

NewVisitorBreadcrumb

Response properties
Property Name Type Description Available Versions
location String The URL of the Web page that the chat visitor is viewing. 29.0
Response body

QueueUpdate

Response properties
Property Name Type Description Available Versions
position integer The updated position of the chat visitor in the chat queue. 29.0
Response body

ResyncSession

Response properties
Property Name Type Description Available Versions
isValid Boolean Indicates whether the session is valid (true) or not (false). 29.0
key String The session key for the new session after the old session has been reestablished. 29.0
affinityToken String The affinity token for the session that’s passed in the header for all future requests. 29.0
Response body

SessionId

Response Properties
Property Name Type Description Available Versions
id String The session ID for the new session. 29.0
key String The session key for the new session. 29.0
affinityToken String The affinity token for the session that’s passed in the header for all future requests. 29.0
clientPollTimeout integer The number of seconds before you must make a Messages request before your Messages long polling loop times out and is terminated. 29.0
Response body

Settings

Response Properties
Property Name Type Description Available Versions
pingrate number The rate at which the visitor must ping the server to maintain the Live Agent visitor session. 29.0
contentServerUrl String The URL of the content server. 29.0
buttons Array of button objects A list of chat buttons, along with their settings information, that were specified when you made the Settings request. 29.0
Response body

VisitorId

Response Properties
Property Name Type Description Available Versions
sessionId String The session ID for the new session. 29.0
Response body