requestSaveInteractionLog
requestSaveInteractionLog
Mandatory: No
Description: At the end of an interaction, whether Voice or Digital, the CRM Connector application sends a message containing all the data from that interaction. This message can be saved as an Interaction Log record in the CRM.
It is important that the client application composes its own body and new record structure based on the restrictions and recommendations of the CRM it uses. The CRM Connector application does not impose any restrictions, so it sends the entire interaction body, allowing each customer to create the Interaction Log according to their business needs.
The data options that can be saved are listed in the table below, but keep in mind that these data vary depending on the environment. The AXP and Elite Voice columns indicate whether the data is present in the respective environment.
Additionally, the client application developer must examine the object to understand how to access each field.
This feature uses one-way messages, so the client application does not need to send a confirmation back to the CRM Connector after saving the log.
Implementation Example
// This is a part of the mandatory in-place event message handler
export const processCRMConnectMessageData = async (event) => {
if (event.origin !== CRM_CONNECT_ORIGIN) {
return;
}
const { action, data } = event.data;
clientIframe = document.getElementById('crmConnectIframeId');
if (action === 'requestSaveInteractionLog') {
processSaveInteractionLog(data)
}
};
const processSaveInteractionLog = (data) => {
const composedInteractionData = composeInteractionLog(data.message.body);
saveInteractionLog(composedInteractionData);
}
const composeInteractionLog = (data) => {
/*
Please note that this is a dummy implementation and the objects
you see might not reflect the format your CRM needs.
In order to save the interaction log on your CRM you must consult
its documentation and build a log object following it.
*/
if (!data || !data.interactionId || !data.interactionData) {
return;
}
const externalInteractionId = data.interactionId;
const interactionDetails = data.interactionData;
const durationInSeconds = retrieveDurationInSeconds(interactionDetails.interaction.intrinsics?.START_TIME);
const interactionDataPackage = {
custom_object_record: {
name: externalInteractionId,
external_id: externalInteractionId,
custom_object_fields: {
caller: interactionDetails.updatedOriginatingAddress,
called: interactionDetails.updatedDestinationAddress,
duration: durationInSeconds + '',
// Add how many fields are necessary
}
}
}
}
const saveInteractionLog = async (interactionData) => {
/*
Implement the mechanism in order to save the interaction log,
with the data you need from the table below.
*/
}
Table with the data that can be saved in an interaction log record
Name | Description | AXP | Elite Voice |
---|---|---|---|
ACW Duration | The duration in seconds for the After Contact Work time | Yes | Yes |
Attributes | The attributes of an AXP interaction. E.g language, department | Yes | No |
Channel | The channel for the interaction. E.g Email, Chat, Messaging, Voice | Yes | Yes |
Destination Address | The destination address of the interaction | Yes | Yes |
Direction | The direction of the interaction. The possible values are: Inbound, Outbound or Internal | Yes | Yes |
Established Time | The established time of the interaction in UTC. | Yes | Yes |
Interaction Type | The type of the interaction. Possible values are: Called, Transferred, Conferenced | Yes | Yes |
Interaction ID | A unique identifier for the interaction | Yes | Yes |
Priority | The priority of the interaction | Yes | No |
Resource Address | The station id of the agent. | Yes | Yes |
Updated Originating Address | The Originating Address after the Call Center dialing rules are applied | Yes | Yes |
Updated Destination Address | The Destination Address after the Call Center dialing rules are applied | Yes | Yes |
Work Codes | List of the work codes selected by the agent during active or while in ACW states. | No | Yes |
Interaction Origin | The origin of the interaction. This has 3 possible values: AXP, Elite or [AXP,Elite] | Yes | Yes |
Caller Name | The name of the originating party who initiated the interaction. | Yes | Yes |
Caller Number | The number of the originating party who initiated the interaction. | Yes | Yes |
DNIS | The number of the destination party who received the interaction. | Yes | Yes |
Start Date | The standard date format when interaction starts | Yes | Yes |
Start Time | The standard time format when interaction starts | Yes | Yes |
Topic ID | The Topic ID used to route the interaction. It is also known as Queue Number | Yes | No |
Topic Name | The Topic Name used to route the interaction. It is also known as Queue Name | Yes | No |
UUI | UUI values are defined in Call Center Elite | No | Yes |
ASAI UUI | ASAI UUI contains the caller information, such as a destination number. | No | Yes |
UCID | The Universal Call ID. The UCID is a unique call ID that distinguishes a call from all other calls that the contact center processes simultaneously | Yes | Yes |
End Time | The standard date format when interaction ends | Yes | Yes |
Skill ID | The ID of the skill used to route the Elite voice interaction. | No | Yes |
Skill Name | The name of the skill used to route the Elite voice interaction. | No | Yes |
Engagement Parameters | The engagement parameters passed from AXP flows. E.g availableBalance | Yes | No |
Subject | The subject of the interaction log | Yes | Yes |
Name ID | The name of the CRM object related to the interaction (in Salesforce Name and Related To point to different entities) | Yes | Yes |
Related To ID | The name of the CRM object related to the interaction | Yes | Yes |
Comments | The comments added in the specific field when an interaction is in progress. | Yes | Yes |
Name Options | The possible values from Name field. For example: multiple CRM Contacts and Cases associated with the interaction. | Yes | Yes |
Related To Options | The possible values from Related To field. For example: multiple CRM Contacts and Cases associated with the interaction. | Yes | Yes |
Disposition Code | The disposition code used by the agent during active or while in ACW. | Yes | No |
Custom Fields | The list of customFields configured for the interaction. | Yes | Yes |
Settings | The list of options related to display name, relatedTo, comments. All of them booleans. | Yes | Yes |
Is Transfer Interaction | A boolean indicating whether the interaction is a transfer | Yes | Yes |
Is Conference Interaction | A boolean indicating whether the interaction is a conference | Yes | Yes |
Last Updated At | The timestamp of when the draft was last updated | Yes | No |
Last Updated By | The identifier of the user who last updated the draft | Yes | No |
Draft ID | A unique identifier for the draft | Yes | No |
Draft Saved Successfully | A boolean indicating whether the draft was saved successfully | Yes | No |
Email Draft Body | The body content of the email draft | Yes | No |
Draft Attachments | An array of attachments included in the draft | Yes | No |
Transferred By | The identifier of the user who transferred the draft | Yes | No |
Message formats
CRM Connector
{ "type": "CRMConnectMessage", "action": "requestSaveInteractionLog", "data": logDetails }
Updated 3 months ago