public class

ChatUserData

extends Object
implements Serializable
java.lang.Object
   ↳ com.salesforce.android.chat.core.model.ChatUserData
Known Direct Subclasses

Class Overview

A custom data entry to capture user data that can be sent to your Salesforce org and stored as a field in a chat transcript. This data can be mapped with ChatEntity to find or create Salesforce records when a chat session starts.

Once the value has been set using a constructor or setValue(Object), submit the data to your Salesforce org by supplying the object to chatUserData(List).

To define behavior that can find a Contact or create a new Case based on this user data, create ChatEntity objects that map to ChatEntityFields and provide them to chatEntities(List).

Summary

Public Constructors
ChatUserData(String agentLabel)
Create a custom data entry that will appear as part of the chat transcript in your Salesforce org.
ChatUserData(String agentLabel, boolean isDisplayedToAgent, String... transcriptFieldNames)
Create a custom data entry that will appear as part of the chat transcript in your Salesforce org.
ChatUserData(String agentLabel, Object value, boolean isDisplayedToAgent, String... transcriptFieldNames)
Create a custom data entry that will appear as part of the chat transcript in your Salesforce org.
Public Methods
boolean equals(Object obj)
String getAgentLabel()
The field label that will be displayed to the agent next to the value in the agent console.
String[] getTranscriptFieldNames()
A list of Live Chat Transcript Field names that this data will be saved to.
Object getValue()
Get the custom data value that was supplied via constructor or setValue(Object)
boolean isDisplayedToAgent()
Whether or not this data is displayed to the agent in the agent console.
void setValue(Object value)
Set the custom data value, containing data about your user.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ChatUserData (String agentLabel)

Create a custom data entry that will appear as part of the chat transcript in your Salesforce org. This field will be displayed to an agent, and a value must be set by calling setValue(Object). If you wish to prevent an agent from seeing this field, use another constructor where the flag can be set to false.

Parameters
agentLabel The field label that will be displayed to the agent next to the value in the agent console

public ChatUserData (String agentLabel, boolean isDisplayedToAgent, String... transcriptFieldNames)

Create a custom data entry that will appear as part of the chat transcript in your Salesforce org. A value must be set by calling setValue(Object).

Parameters
agentLabel The field label that will be displayed to the agent next to the value in the agent console
isDisplayedToAgent Whether or not this data is displayed to the agent in the agent console
transcriptFieldNames A list of Live Chat Transcript Field names that this data will be saved to

public ChatUserData (String agentLabel, Object value, boolean isDisplayedToAgent, String... transcriptFieldNames)

Create a custom data entry that will appear as part of the chat transcript in your Salesforce org.

Parameters
agentLabel The field label that will be displayed to the agent next to the value in the agent console
value The custom data value, containing data about your user. Value will be converted to a String before being sent
isDisplayedToAgent Whether or not this data is displayed to the agent in the agent console
transcriptFieldNames A list of Live Chat Transcript Field names that this data will be saved to

Public Methods

public boolean equals (Object obj)

public String getAgentLabel ()

The field label that will be displayed to the agent next to the value in the agent console.

public String[] getTranscriptFieldNames ()

A list of Live Chat Transcript Field names that this data will be saved to.

public Object getValue ()

Get the custom data value that was supplied via constructor or setValue(Object)

public boolean isDisplayedToAgent ()

Whether or not this data is displayed to the agent in the agent console.

public void setValue (Object value)

Set the custom data value, containing data about your user. Value will be converted to a String before being sent.