createEngagementInteraction(engagementContainerInput)

Create an engagement interaction record.

API Version

55.0

Requires Chatter

No

Signature

public static ConnectApi.EngagementsCreateOutput createEngagementInteraction(ConnectApi.EngagementsCreateInput engagementContainerInput)

Parameters

engagementContainerInput
Type: ConnectApi.EngagementsCreateInput
Input representation of the engagements create request.

Example

Account initiatingUserAccount = new Account(Name='Test');
insert initiatingUserAccount;
ConnectApi.EngagementInteractionCreateInput interactionInput = new ConnectApi.EngagementInteractionCreateInput();
interactionInput.communicationChannel = 'Video Call';
interactionInput.attendeeAuthenticated = true;
interactionInput.attendeeVerified = false;
interactionInput.sentiment = 'Positive';
interactionInput.startDateTime = datetime.now().formatGMT('yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'');
interactionInput.endDateTime = datetime.now().formatGMT('yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'');
interactionInput.status = 'New';
interactionInput.initiatingAttendeeId = initiatingUserAccount.id;
interactionInput.attendeeAuthenticated = true;
interactionInput.type = 'Inbound';
interactionInput.status = 'New';
interactionInput.attendeeVerificationTime = datetime.now().formatGMT('yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'');
interactionInput.reason = 'Unknown Charges';
interactionInput.phoneNumber = '9999999999';
ConnectApi.EngagementsCreateInput containerInput = new ConnectApi.EngagementsCreateInput();
containerInput.engagementInteraction = interactionInput;
ConnectApi.EngagementsCreateOutput output = ConnectApi.EngagementContainerConnect.createEngagementInteraction(containerInput);