addCustomDetail

Use the addCustomDetail method to add custom details for each chat visitor.

Usage 

Adds a new custom detail for the chat visitor. The Custom Detail is displayed to agents in the footer widget and in the Chat Details page in the Salesforce Console while the chat is active. Available in API versions 28.0 and later.

Syntax 

addCustomDetail(String label, String value, (optional) Boolean displayToAgent)

Parameters 

NameTypeDescriptionAvailable Versions
labelStringThe label for the custom detail—for example, "Name".Available in API versions 28.0 and later.
valueStringThe value of the custom detail—for example, "John Doe".Available in API versions 28.0 and later.
(Optional) displayToAgentBooleanSpecifies whether to display the custom details that customers provide in a pre-chat form to the agent (true) or not (false).Available in API versions 29.0 and later.