public static class

ChatEntity.Builder

extends Object
java.lang.Object
   ↳ com.salesforce.android.chat.core.model.ChatEntity.Builder

Class Overview

Used to construct ChatEntity objects for interacting with Salesforce objects.

Summary

Public Constructors
Builder()
Public Methods
ChatEntity.Builder addChatEntityField(ChatEntityField chatEntityField)
Add a ChatEntityField to this ChatEntity, which will define how the custom data provided by ChatUserData objects is used to locate and update a specific field on this Salesforce object.
ChatEntity build(String objectType)
Generate a new ChatEntity object with the supplied behavior and ChatEntityFields.
ChatEntity.Builder linkToAnotherSalesforceObject(ChatEntity chatEntity, String objectFieldName)
**OPTIONAL** Link this ChatEntity to a field of another Salesforce object.
ChatEntity.Builder linkToAnotherSalesforceObject(String objectType, String objectFieldName)
**OPTIONAL** Link this ChatEntity to a field of another Salesforce object.
ChatEntity.Builder linkToTranscriptField(String transcriptFieldName)
**OPTIONAL** Set the name of the transcript field that the resulting Salesforce record will be linked to.
ChatEntity.Builder showOnCreate(boolean showOnCreate)
**OPTIONAL** Define whether or not the records found or created as a result of this ChatEntity's behavior will beshown to the agent in the agent console.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

public ChatEntity.Builder addChatEntityField (ChatEntityField chatEntityField)

Add a ChatEntityField to this ChatEntity, which will define how the custom data provided by ChatUserData objects is used to locate and update a specific field on this Salesforce object. This is essential to finding a Contact, Case, or other record, by their IDs or other fields. It is also essential to assigning values to or updating fields within a record.

public ChatEntity build (String objectType)

Generate a new ChatEntity object with the supplied behavior and ChatEntityFields. If you do not specify any ChatEntityFields via addChatEntityField(ChatEntityField) then this ChatEntity behavior will be ignored.

Parameters
objectType The name of the Salesforce object that this ChatEntity relates to
Returns

public ChatEntity.Builder linkToAnotherSalesforceObject (ChatEntity chatEntity, String objectFieldName)

**OPTIONAL** Link this ChatEntity to a field of another Salesforce object. This can be used to link a Case's ContactID field to a Contact record, or to define other relationships. Use this method to reference to an existing ChatEntity.

public ChatEntity.Builder linkToAnotherSalesforceObject (String objectType, String objectFieldName)

**OPTIONAL** Link this ChatEntity to a field of another Salesforce object. This can be used to link a Case's ContactID field to a Contact record, or to define other relationships.

public ChatEntity.Builder linkToTranscriptField (String transcriptFieldName)

**OPTIONAL** Set the name of the transcript field that the resulting Salesforce record will be linked to.

public ChatEntity.Builder showOnCreate (boolean showOnCreate)

**OPTIONAL** Define whether or not the records found or created as a result of this ChatEntity's behavior will beshown to the agent in the agent console. Default value is false.