The chatKey associated with the chat for which to retrieve details.
callback
function
JavaScript method called upon completion of the method.
Sample Code–Visualforce
1<apex:page >2 <apex:includeScript value="/support/console/68.0/integration.js"/>3 <a href="#" onClick="testGetDetailsByChatKey();">Get Chat Details</a>45 <script type="text/javascript">67 function testGetDetailsByChatKey() {8 //Get the value for 'myChatKey' from the sforce.console.chat.getDetailsByPrimaryTabId() or other chat methods.9 //These values are for example purposes only10 var chatKey = 'myChatKey';11 sforce.console.chat.getDetailsByChatKey(chatKey, getDetailsSuccess);12 }1314 function getDetailsSuccess(result) {15 //Report whether accepting the chat was succesful16 if (result.success == true) {17 ipAddress = result.details.ipAddress;18 alert('The Visitor IP Address for this chat is: ' + ipAddress);19 } else {20 alert('Getting the details was not successful');21 }22 };232425 </script>26</apex:page>
Response
This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties:
Name
Type
Description
primaryTabId
String
The ID of the primary tab associated with the chat.
An object containing information about the visitor’s web browser.
breadcrumb
A breadcrumb represents a Web page viewed by a chat visitor. The breadcrumb object contains the following properties:
Property
Type
Description
location
String
The URL of a Web page viewed by a chat visitor.
time
Date/Time
The date and time a chat visitor visited a specific breadcrumb URL.
customDetail
Custom details are details have been passed into the chat through the Deployment API or Pre-Chat Form API. The customDetail object contains the following properties:
Property
Type
Description
label
String
The name of the custom detail as specified in the Deployment API or Pre-Chat Form API.
value
String
The value of the custom detail as specified in the Deployment API or Pre-Chat Form API.
transcriptFields
Array of Strings
The names of fields where the customer’s details on the chat transcript are saved.
An array of pre-created records used for mapping custom detail information.
entityMap
Entities are records that are created when a customer starts a chat with an agent. You can use the API to auto-populate these records with customer details. The entityMap object contains the following properties:
Property
Type
Description
entityName
String
The record to search for or create.
fieldName
String
The name of the field associated with the details.
isFastFillable
Boolean
Specifies whether the value can be used to populate the field when an agent creates or edits a record (true) or not (false) (Live Agent console only).
isAutoQueryable
Boolean
If you’re using the Live Agent console, specifies whether to perform a a SOSL query (in the Live Agent console) (true) or not (false) to find records with a fieldName containing the value. If you’re using the Salesforce console, specifies whether to perform a SOQL query (in the Salesforce console) (true) or not (false) to find records with a fieldName containing the value.
isExactMatchable
Boolean
Specifies whether to only search for records that have fields exactly matching the field fieldName (true) or not (false).
geoLocation
The geoLocation object represents the details of a chat visitor’s location. It contains the following properties:
Property
Type
Description
city
String
The name of the chat visitor’s city.
countryCode
String
The two-digit ISO-3166 country code for the chat visitor’s country.
countryName
String
The name of chat visitor’s country.
latitude
String
The chat visitor’s approximate latitude.
longitude
String
The chat visitor’s approximate longitude.
organization
String
The organization name of the chat visitor’s internet service provider.
region
String
The chat visitor’s region, such as state or province.
visitorInfo
The visitorInfo object represents information about the visitor’s web browser. It contains the following properties:
Property
Type
Description
browserName
String
The name and version of the chat visitor’s web browser.
language
String
The language of the chat visitor’s web browser.
originalReferrer
String
The original URL of the Web page from which the chat visitor requested a chat.
screenResolution
String
The screen resolution of the chat visitor’s computer, as passed by the chat visitor’s browser.
sessionKey
String
the sessionKey of the visitor which will ultimately be stored on the LiveChatVisitor record as a unique reference to this live chat visitor