Newer Version Available
createEngagementInteraction(engagementContainerInput)
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.
Return Value
Example
1Account initiatingUserAccount = new Account(Name='Test');
2insert initiatingUserAccount;
3ConnectApi.EngagementInteractionCreateInput interactionInput = new ConnectApi.EngagementInteractionCreateInput();
4interactionInput.communicationChannel = 'Video Call';
5interactionInput.attendeeAuthenticated = true;
6interactionInput.attendeeVerified = false;
7interactionInput.sentiment = 'Positive';
8interactionInput.startDateTime = datetime.now().formatGMT('yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'');
9interactionInput.endDateTime = datetime.now().formatGMT('yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'');
10interactionInput.status = 'New';
11interactionInput.initiatingAttendeeId = initiatingUserAccount.id;
12interactionInput.attendeeAuthenticated = true;
13interactionInput.type = 'Inbound';
14interactionInput.status = 'New';
15interactionInput.attendeeVerificationTime = datetime.now().formatGMT('yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'');
16interactionInput.reason = 'Unknown Charges';
17interactionInput.phoneNumber = '9999999999';
18ConnectApi.EngagementsCreateInput containerInput = new ConnectApi.EngagementsCreateInput();
19containerInput.engagementInteraction = interactionInput;
20ConnectApi.EngagementsCreateOutput output = ConnectApi.EngagementContainerConnect.createEngagementInteraction(containerInput);