Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Engagement Class

Stores the object name and ID of an engagement record. An engagement record represents an engagement interaction, a messaging session, or a voice call between a customer and an agent.

Namespace

DataRetrieval

Engagement Constructors

Use the Engagement constructor to initialize the Engagement class that associates an engagement record ID with the API name of the engagement object.

The Engagement class includes these constructors.

Engagement(recordId, objectApiName)

Creates an instance of the DataRetrieval.Engagement class to associate an engagement record ID with the API name of the engagement object.

Signature

public Engagement(String recordId, String objectApiName)

1DataRetrieval.Engagement, newinstance, [String, String], DataRetrieval.Engagement

Parameters

recordId
Type: String
ID of the engagement record that’s associated with the interaction between a customer and an agent.
objectApiName
Type: String
API name of the engagement object that’s associated with the interaction between a customer and an agent.

Engagement()

Creates an instance of the DataRetrieval.Engagement class.

Signature

public Engagement()

1DataRetrieval.Engagement, newinstance, [], DataRetrieval.Engagement