Chat REST API Data Types

A request to a Chat REST API resource returns a response code. The successful execution of a resource request can also return a response body in JSON format. Some response bodies return data types that contain their own properties. All property values that refer to a name of an entity or field are case-sensitive.

Button 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
idStringThe ID of the chat button object.TRUE29.0
typeStringThe button type. Valid values are:
  • Standard
  • Invite
  • ToAgent
TRUE29.0
endpointUrlStringThe URL of the custom chat window that’s assigned to the chat button.FALSE29.0
prechatUrlStringThe URL of the pre-chat form that’s assigned to the button.FALSE29.0
languageStringThe chat button’s default language.FALSE29.0
isAvailableBooleanSpecifies whether the chat button is available to receive new chat requests (true) or not (false). If you don’t see this property, the value is false.FALSE29.0
inviteImageUrl (for automated chat invitations only)StringThe URL to the automated invitation’s static image resource.FALSE29.0
inviteImageWidth (for automated chat invitations only)numberThe width in pixels of the automated chat invitation’s image.FALSE29.0
inviteImageHeight (for automated chat invitations only)numberThe height in pixels of the automated chat invitation’s image.FALSE29.0
inviteRenderer (for automated chat invitations only)StringThe animation option that’s assigned to the automated chat invitation. Valid values are:
  • Slide
  • Fade
  • Appear
  • Custom
FALSE29.0
inviteStartPosition (for automated chat invitations only)StringThe position at which the automated chat invitation begins its animation. Valid values are:
  • TopLeft
  • TopLeftTop
  • Top
  • TopRightTop
  • TopRight
  • TopRightRight
  • Right
  • BottomRightRight
  • BottomRight
  • BottomRightBottom
  • Bottom
  • BottomLeftBottom
  • BottomLeft
  • BottomLeftLeft
  • Left
  • TopLeftLeft
FALSE29.0
inviteEndPosition (for automated chat invitations only)StringThe position at which the automated chat invitation begins its animation. Valid values are:
  • TopLeft
  • Top
  • TopRight
  • Left
  • Center
  • Right
  • BottomLeft
  • Bottom
  • BottomRight
FALSE29.0
hasInviteAfterAccept (for automated chat invitations only)BooleanSpecifies whether the automated chat invitation can be sent again after the customer accepted a previous chat invitation (true) or not (false).FALSE29.0
hasInviteAfterReject (for automated chat invitations only)BooleanSpecifies whether the automated chat invitation can be sent again after the customer rejected a previous chat invitation (true) or not (false).FALSE29.0
inviteRejectTime (for automated chat invitations only)numberThe amount of time in seconds that the invitation appears on a customer’s screen before the invitation is automatically rejected.FALSE29.0
inviteRules (for automated chat invitations only)ObjectThe custom rules that govern the behavior of the automated chat invitation, as defined in your custom Apex class.FALSE29.0
estimatedWaitTimenumberThe estimated wait time for the button in seconds. If the server cannot retrieve the wait time, this property returns -1.FALSE47.0

CustomDetail 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
labelStringThe customized label for the detail.TRUE29.0
valueStringThe customized value for the detail.TRUE29.0
transcriptFieldsArray of StringsThe names of fields to which to save the customer’s details on the chat transcript.TRUE29.0
displayToAgentBooleanSpecifies whether to display the customized detail to the agent (true) or not (false).FALSE29.0

Entity 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
entityNameStringThe record to search for or create.TRUE29.0
showOnCreateBooleanSpecifies whether to display the record after it’s created (true) or not (false).FALSE29.0
linkToEntityNameStringThe name of the record to which to link the detail.FALSE29.0
linkToEntityFieldStringThe field within the record to which to link the detail.FALSE29.0
saveToTranscriptStringThe name of the transcript field to which to save the record.FALSE29.0
entityFieldsMapsArray of EntityFieldsMaps objectsThe fields to which to associate the detail on a record.TRUE29.0

EntityFieldsMaps 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
fieldNameStringThe name of the field to which to associate the detail.TRUE29.0
labelStringThe customized label for the detail.TRUE29.0
doFindBooleanSpecifies whether to use the field fieldName to perform a search for matching records (true) or not (false).TRUE29.0
isExactMatchBooleanSpecifies whether to only search for records that have fields that exactly match the field fieldName (true) or not (false).TRUE29.0
doCreateBooleanSpecifies whether to create a record based on the field fieldName if one doesn’t exist (true) or not (false).TRUE29.0

GeoLocation 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
countryCodeStringThe ISO 3166-1 alpha-2 country code for the chat visitor’s location.TRUE29.0
countryNameStringThe name of the country that’s associated with the chat visitor’s location.TRUE29.0
regionStringThe principal administrative division associated with the chat visitor’s location—for example, the state or province.FALSE29.0
cityStringThe name of the city associated with the chat visitor’s location.FALSE29.0
organizationStringThe name of the organization associated with the chat visitor’s location.FALSE29.0
latitudenumberThe latitude associated with the chat visitor’s location.FALSE29.0
longitudenumberThe longitude associated with the chat visitor’s location.FALSE29.0

Message 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
typeStringThe type of message that was received.TRUE29.0
messageObjectA placeholder object for the message that was received. Can return any of the responses that are available for the Messages request.TRUE29.0

NounWrapper 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
prefixStringThe prefix of the resource.TRUE29.0
nounStringThe name of the resource.TRUE29.0
dataStringThe data to post to the resource.FALSE29.0

Result 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
idStringThe Salesforce ID of the agent or chat button.TRUE29.0
isAvailableBooleanIndicates whether the entity that’s associated with the Salesforce ID id is available to receive new chat requests (true) or not (false). If you don’t see this property, the value is false.FALSE29.0
estimatedWaitTimenumberThe estimated wait time for the button in seconds. If the server cannot retrieve the wait time, this property returns -1.FALSE47.0

Rule 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
idStringThe ID of the sensitive data rule record. Applies to SensitiveDataRuleTriggered for Chasitors only.FALSE29.0
nameStringThe name of the sensitive data rules applied to the chat session. This property applies to both agent and chasitor.TRUE29.0

SensitiveDataRule 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
nameStringThe name of the sensitive data rule.TRUE29.0
patternStringThe pattern of the sensitive data rule pattern definition.TRUE29.0
idStringThe ID of the sensitive data rule.FALSE29.0
replacementStringThe replacement of the pattern in the message if actionType is Replace.FALSE29.0
actionTypeStringThe action type if the message matches the pattern.FALSE29.0

TranscriptEntry 

Properties

Property NameTypeDescriptionRequiredAvailable Versions
typeEnumeration of type StringThe type of message in the chat transcript. Valid values are:
  • Agent: a message from an agent to a chat visitor
  • Chasitor: a message from a chat visitor to an agent
  • OperatorTransferred: A request to transfer a chat to another agent
TRUE29.0
nameStringThe name of the person who sent the chat message.TRUE29.0
contentStringThe body of the message.TRUE29.0
timestampnumberThe date and time when the message was sent.TRUE29.0
sequencenumberThe sequence in which the message was received in the chat.TRUE29.0

See Also