Newer Version Available
Request Bodies for Live Agent REST API
To perform a POST or GET request, pass query parameters
or create a request body that’s formatted in JSON. Request
bodies can contain one or more other request bodies that are nested
inside. Each request body can contain unique request properties.
Breadcrumb
- Request properties
-
Property Name Type Description Available Versions location String The URL of the Web page that the chat visitor is viewing. 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-0", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17"location":{ 18 "type":"string", 19 "description":"The current location or URL of the visitor", 20 "required":true, 21 "version":29.0 22 }
ChasitorInit
- Request properties
-
Property Name Type Description Available Versions organizationId String The chat visitor’s Salesforce organization ID. 29.0 deploymentId String The ID of the deployment from which the chat originated. 29.0 buttonId String The ID of the button from which the chat originated. 29.0 sessionId String The chat visitor’s Live Agent session ID. 29.0 userAgent String The chat visitor’s browser user agent. 29.0 language String The chat visitor’s spoken language. 29.0 screenResolution String The resolution of the chat visitor’s computer screen. 29.0 visitorName String The chat visitor’s custom name. 29.0 prechatDetails Array of CustomDetail objects The pre-chat information that was provided by the chat visitor. 29.0 prechatEntities Array of Entity objects The records to create when a chat visitor begins a chat. 29.0 buttonOverrides Array of Strings The button override rules that indicate how a chat request will be rerouted. 29.0 receiveQueueUpdates Boolean Indicates whether the chat visitor will receive queue position updates (true) or not (false). 29.0 isPost Boolean Indicates whether the chat request was made properly through a POST request (true) or not (false). 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-1", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17{ 18 organizationId: "00DD0000000JVXs", 19 deploymentId: "572D000000000J6", 20 buttonId: "573D000000000OC", 21 agentId: "005B0000000F3b2", 22 doFallback: true, 23 sessionId: "5503f854-0203-4324-8ed5-f793a367426f", 24 userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36", 25 language; "en-US", 26 screenResolution: "2560x1440" 27 visitorName: "Jon A." 28 prechatDetails: [ 29 { 30 label: "E-mail Address", 31 value: "jon@example.com", 32 transcriptFields: [ 33 "c__EmailAddress" 34 ], 35 displayToAgent: true 36 } 37 ], 38 buttonOverrides: [ 39 "573D000000000OD" 40 ], 41 receiveQueueUpdates: true, 42 isPost: true 43}
ChasitorResyncState
- Request properties
-
Property Name Type Description Available Versions organizationId String The chat visitor’s Salesforce organization ID. 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-2", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17{ 18 organizationId: "00DD0000000JVXs" 19}
ChasitorSneakPeek
- Request properties
-
Property Name Type Description Available Versions position integer The position of the Sneak Peek update in the chat. 29.0 text String The text that the chat visitor is typing in the text input area of the chat window. 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-3", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17{ 18 position: 3, 19 text: "Hi there." 20}
ChatMessage
- Request properties
-
Property Name Type Description Available Versions text String The text of the chat visitor’s message to the agent. 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-4", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17{ 18 text: "I have a question about my account." 19}
CustomEvent
- Request properties
-
Property Name Type Description Available Versions type String The type of custom event that occurred, used for adding the event listener on the agent’s side. 29.0 data String Data that’s relevant to the event that was sent to the agent. 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-5", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17{ 18 type: "PromptForCreditCard", 19 data: "Visa" 20}
MultiNoun
- Request properties
-
Name Type Description Available Versions nouns Array of NounWrapper objects An array of noun objects and their properties that are batched in the MultiNoun request. 29.0 - Request body
-
1swfobject.registerObject("clippy.codeblock-6", "9"); 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17{ 18 nouns: [ 19 { 20 prefix: "Chasitor", 21 noun: "ChatMessage", 22 object: { 23 text: "Goodbye" 24 } 25 }, 26 { 27 prefix: "Chasitor", 28 noun: "ChatEnd", 29 object: {} 30 } 31 ] 32}