Email Scenarios
Email scenarios can be used to control the logic of how incoming emails are routed and processed in your contact center. For example, you can use email scenarios to:
- Create self-service workflows that automatically reply to common inquiries, such as providing an order status or tracking information, without needing agent intervention. You can even integrate AI to analyze email content and generate appropriate responses.
- Change an email's assigned service or priority based on various criteria, including keywords in the subject line or body, the sender's address or domain, email headers, current queue conditions, and more.
- Configure custom screen pops to automatically open relevant web pages, internal knowledge base articles, or CRM records when agents handle the email.
To create or edit email scenarios, open the Email page from the Scenarios sub-menu. You will see a list of email scenarios that have already been configured. The Scenario Overview page describes how to create, edit, import, and export scenarios.
Using AI to Process emails | ||
![]() |
When using the Ask AI scenario block to process incoming emails, consider using either of the email_remove_quoted_content_html or email_remove_quoted_content_plaintext functions. These functions remove quoted text from the email body, such as previous replies in an email thread. By stripping out this older content, you can focus the AI's analysis on only the most recent message, leading to more accurate and relevant responses. |
Email Scenario Lifecycle
The email scenario lifecycle starts when an email is received by an Email Scenario Entry that specifies an email scenario. The email appears in the relevant service queue while waiting for the scenario to be executed.
While awaiting scenario execution, emails in services with the "Push" distribution method will not be distributed to agents automatically until the scenario exits or processes a Find Agent block. However, agents can move emails into their personal queue at any time if the service uses the "Pull" distribution method, or if they have the privilege to see the contents of the push queue.
Once an email scenario begins execution, each scenario block is processed in order without pausing until a Find Agent or Wait+ block is encountered:
- When the scenario executes a Find Agent block, the behavior depends on its configuration and the email's current queue:
- If the email is in a service queue, its routing parameters are updated, and it can be pushed to agents if the service uses push routing.
- If the block has no escalation intervals (i.e., no timeout exit), the scenario concludes, and the email remains in its current queue.
- If the block has at least one escalation interval defined, the scenario pauses until the escalation timeout expires:
- When a non-final escalation interval expires, the settings for the next interval are applied if the email is in the service queue. If it is in a personal queue, the email is unchanged, and the next interval begins.
- If the final escalation interval expires (e.g. has a defined end time), the scenario resumes execution along the Timeout exit path.
- If the scenario encounters a Wait+ block, it pauses until the specified condition is met. Service and priority values from any preceding Set Service or Set Priority blocks are preserved.
As with workflows, there is a limit on the maximum number of blocks that can be executed by a scenario, to prevent infinite loops. When the block execution limit is reached, an error is logged, the scenario is stopped, and the email remains in the queue in its current state. However, this block execution limit is reset each time a scenario is paused.
Properties Tab
Name
The name used to identify the scenario when associating it with an Email Scenario Entry.
Scenario Entries tab
Table of Email Services
The top table displays a list of all Email Services (i.e., email scenario entries) that point to this Email Scenario.
Selected Scenario Entry Properties
Displays an editable view of the specific Email Service selected from the list of associated entries. An Email Scenario is initiated when an email is received by an email service that has this scenario configured on its Services tab.
You can also define a new email service for this scenario by clicking the + button.
Associations tab
The Associations tab lists contact center resources that are referenced in this scenario, such as skills and services. This may be useful, for example, when you use the same scenarios in several separate environments.