Contact center admins can add and edit event scripts in the Start widget. This allows you to create scripts and associate them with an engagement event. For example, you can run a custom script for when an agent saves a disposition.
This article covers:
The following events can be set in the Start widget.
|Event||Description||Channels that the event is available for|
|Engagement accepted||When an agent accepts the call.||voice, video|
|Engagement assigned||When an agent accepts an SMS or chat engagement.||SMS, web chat, in-app chat|
|Engagement closed||An engagement has closed. For example, the agent or consumer has ended/left the video or voice call.||voice, video, SMS, web chat, in-app chat|
|Engagement recording started||Recording for the engagement has started.||voice|
|Engagement recording ended||Recording for the engagement has ended.||voice|
|Engagement transcription started||Transcription for the engagement has started.||voice|
|Engagement transcription ended||Transcription for the engagement has ended.||voice|
|Engagement started||An engagement starts in the flow.||voice|
|Engagement transferred||An engagement is transferred to another agent.||voice, video, SMS, web chat, in-app chat|
|Disposition saved||An agent saved a disposition.||voice, video, SMS, web chat, in-app chat|
|Voicemail saved||Consumer leaves voicemail for the engagement.||voice|
Refer to the Script widget support article for more information on using variables.
Enter the following script in the Script widget to setting the caseID variable when an engagement is accepted by an agent.
let caseID = var_get()["engagement_accepted.caseID"];
The variables below are available to extract the agent information and include these variables in an event script. This can enable functionality such as triggering an HTTP call when an agent receives a new engagement.
let agentName = var_get()["agentName"]; // This is the name of the agent involved in the engagement let agentEmail = var_get()["agentEmail"]; // This is the email of the agent involved in the engagement