Contact Center Workflows
Workflows can react to contact center events and act on them without code. For example: when a call is abandoned, schedule a callback; when an AI conversation qualifies a lead, hand it to the sales queue.
| Menu | Design > Workflows |
| Permission | Manage workflows |
| Features | Workflows, plus the Contact Center features each task needs (see Contact Center activities) |
What you see depends on your role. If the menu, a button or a setting on this page is missing, ask your administrator to give you the permission listed above or to turn on the feature. Only administrators can turn features on and change site settings.
Build a workflow
The steps below build a workflow that starts recording every call as soon as it connects.
- Open Design > Workflows and click Create Workflow. Enter a Name such as Record connected calls and click Save.
- Click Add Event, find Contact Center Event and click its Add button.
- Pick the Event type to react to, for example Call connected (leave Any event type to react to every event), and click Save.
- Click Add Task, open the Contact Center category (the contact center tasks, including Send Text Message) or Omnichannel CRM (Convert Lead), find a task such as Start Call Recording, and click Add. Fill in its fields; for the interaction, use
{{ Workflow.Input.InteractionId }}to take it from the event. Click Save. - On the canvas, drag the task away from the event, then drag from the event's Matched outcome to the task to connect them.
- Click Save.
The Event type list is grouped: Interaction, Activity, Routing & queues, Agent, Offer, Dialer, Callback, Call, Shared voicemail, Recording, Supervision and Secure capture. The event has two outcomes: Matched when the event is the type you picked (or you picked Any event type), and Ignored otherwise.
Values the event passes to the workflow
You can use these in any field that takes Liquid, for example {{ Workflow.Input.AgentUserId }}:
| Value | What it holds |
|---|---|
EventType | The kind of event, such as a call connecting. |
InteractionId | The call or conversation the event is about. |
AggregateType, AggregateId | The record the event is about, such as an activity. Activity tasks take {{ Workflow.Input.AggregateId }}. |
ActorId, ActorType | Who made the change: the agent, a supervisor, a workflow, the telephony provider, or the platform itself (system). |
AgentId, AgentUserId | Which agent the change is about, whoever made it. |
SourceComponent | The part of the platform that raised the event. |
Data | The event's own details, for example {{ Workflow.Input.Data.PhoneNumber }}. See the two events below. |
To act on the agent, for example with Set Agent Presence, use {{ Workflow.Input.AgentUserId }}, not the actor: when the platform reserves an agent or starts their wrap-up, the actor is the platform, not the agent.
Follow up on a call or a completed activity
Two events carry what a follow-up needs, such as a text message to a customer the dialer could not reach.
Dialer attempt completed fires after every call the dialer places, answered or not. A call that ended before an agent was connected is also dispositioned by the dialer, so Activity disposition applied fires for it right after.
| Value | What it holds |
|---|---|
Data.Outcome | Answered, NoAnswer, Busy, AnsweringMachine, NotInService, Rejected, Failed or Disconnected (a customer answered but hung up before the agent was connected). |
Data.Details.attemptNumber, Data.Details.maxAttempts, Data.Details.dialerProfileId | Which attempt the call was, how many the dialer profile allows, and the profile. |
Data.PhoneNumber | The number that was called. |
Data.ActivityItemId | The activity the call was for. |
Data.CampaignId | The activity's campaign. |
Data.HangupCause, Data.ProviderHangupCause, Data.SipHangupCause | How the call ended, in the platform's terms and the provider's. |
Activity disposition applied fires whenever an activity is completed with a disposition: by an agent, by the dialer for a call that ended before an agent was connected, or by an automated (AI) call, including one nobody answered.
| Value | What it holds |
|---|---|
Data.DispositionName | The disposition's name. |
Data.Outcome | The disposition's outcome: NotInService, NoAnswer, Busy, AnsweringMachine, Rejected, Failed, Disconnected or None. |
Data.DialerOutcome | For a call the dialer placed: how it ended, as in Dialer attempt completed. |
Data.AttemptNumber, Data.MaxAttempts, Data.RemainingAttempts | For a call the dialer placed: which attempt it was, how many the dialer profile allows, and how many are left. |
Data.DialerProfileId, Data.InteractionId, Data.TerminalReasonCode | The dialer profile, the call, and why the activity ended (for example dialer_no_answer). |
Data.Source | What applied it: Agent, AI, Provider, Workflow or System. |
Data.PhoneNumber | The number the activity was reaching. |
Data.CompletedById | The user who completed the activity, when a person did. |
Data.AgentUserId | The user the follow-up belongs to: the agent who took the call or, on an automated dial, the agent the dialer held for it, even when nobody answered and the system applied the disposition. Otherwise the agent who applied it. |
Data.ActivityItemId, Data.ContactContentItemId, Data.CampaignId, Data.SubjectContentType, Data.Channel, Data.Attempts | The activity, its contact, campaign, subject, channel and attempt count. |
Call a contact again
When the dialer dispositions a call, what happens next is up to the disposition. There are three ways the dialer comes to call the contact again:
- In the subject flow (no workflow). Wire Try Again to the disposition, for example No answer. The next attempt is created as a new activity and put back in the same campaign with the same dialer profile, due no sooner than the profile's retry delay. No attempt is created past the action's Maximum attempts, or past the profile's Max attempts when the action leaves it empty.
- On its own (neither of the above). When the subject has no disposition for how the call ended, the dialer retries a call that rang out, was busy, reached a machine or was dropped, up to the profile's Max attempts. See Retries and the attempt limit.
- In a workflow. Use the Schedule Dialer Retry task. It does the same, but the workflow decides when: set Delay in minutes (empty uses the profile's retry delay, and a shorter delay is raised to it). It ends with Scheduled (the next activity is in
{{ Workflow.Output.NextActivityItemId }}), Exhausted when no attempt is left, or Failed.
Use one or the other for the same disposition, or the contact gets two follow-up activities. A Schedule Dialer Retry that runs after the dialer already retried the call on its own finds that attempt and does not create another.
To retry a busy line after 15 minutes from a workflow:
- Create a workflow and add the Contact Center Event event with the event type Activity disposition applied.
- Add an If/Else task with the condition
input("Data").DialerOutcome == "Busy" && input("Data").RemainingAttempts > 0, and connect the event's Matched outcome to it. - Add a Schedule Dialer Retry task. Leave Activity as
{{ Workflow.Input.Data.ActivityItemId }}and set Delay in minutes to15, then connect the If/Else task's True outcome to it. - Save the workflow.
Example: text a customer the dialer could not reach
- Create a workflow and add the Contact Center Event event with the event type Dialer attempt completed.
- Add an If/Else task with the condition
input("Data").Outcome == "NoAnswer", and connect the event's Matched outcome to it. - Add a Send Text Message task (under Contact Center). Set From to one of your SMS numbers, To to
{{ Workflow.Input.Data.PhoneNumber }}, and write the Message, then connect the If/Else task's True outcome to it. Leave Agent empty to send a system text. - Save the workflow.
Every Power, Progressive or Preview call that rings out now sends the text. Use "Busy", "AnsweringMachine" or "Disconnected" in the condition to text on those outcomes instead. For automated (AI) calls, use Activity disposition applied with input("Data").Outcome == "NoAnswer".
Example: text a customer from the agent's own number after a call
Find Agent Numbers looks up the numbers an agent calls and texts from and writes them to the workflow: {{ Workflow.Output.AgentPhoneNumber }} and {{ Workflow.Output.AgentSmsNumber }}. They come from the Omnichannel Address whose Agents who dial from this number or Agents who text from this number lists the agent, or else from the default numbers. The User name field takes Liquid, and a user identifier or email works too. Leave it empty to get the default numbers. The task ends in NotFound only when it finds neither number.
- Start the workflow from the Contact Center Event that follows the call, for example Activity disposition applied.
- Add Find Agent Numbers with User name set to the agent the call belongs to:
{{ Workflow.Input.Data.AgentUserId }}. - Add Send Text Message with From
{{ Workflow.Output.AgentSmsNumber }}, To{{ Workflow.Input.Data.PhoneNumber }}, your Message, and Agent{{ Workflow.Input.Data.AgentUserId }}, and connect the Done outcome of Find Agent Numbers to it.
The text is sent by the provider that owns the number and lands in the customer's conversation in the messaging workspace, owned by the agent, so the customer's reply reaches them. Leave Agent empty to send a system text instead. Use AgentUserId rather than CompletedById: when a Power dial reaches an answering machine, the system applies the disposition, so CompletedById is empty and the text would belong to no agent.
Example: text a customer only once
To text a customer who did not answer only the first time, keep a Boolean field on the contact type, for example NoAnswerTextSent on Customer, and set it after the text goes out:
- Start from Activity disposition applied and an If/Else task with
input("Data").Outcome == "NoAnswer". - Add an If/Else task with the Liquid condition
{% assign contact = Workflow.Input.Data.ContactContentItemId | content_item_id %}{% if contact.Content[contact.ContentType].NoAnswerTextSent.Value == true %}false{% else %}true{% endif %}, and connect its True outcome to Send Text Message. - Add Update Contact with Contact
{{ Workflow.Input.Data.ContactContentItemId }}and Fields to set{% assign contact = Workflow.Input.Data.ContactContentItemId | content_item_id %}{ "{{ contact.ContentType }}": { "NoAnswerTextSent": { "Value": true } } }, and connect the Done outcome of Send Text Message to it.
Use Update Contact here rather than Update Content Item. Update Content Item checks the whole record first. When a field the type requires is empty, such as the last name of a contact loaded from a file, it fails and the workflow's run is not saved at all: the text has gone out, but the field is never set, so the next unanswered call texts the customer again.
See what a workflow did
Open the workflow's editor and click Instances (at the top right) to list its runs. Each run shows its status, such as Finished, and when it ran. Click a run to see the path it took through the workflow: Restart runs it again and Delete removes it. The workflow's Properties hold Enabled, Single instance and Delete successfully completed workflows.
Every contact center event starts a run of each workflow that begins with a Contact Center Event, so a busy contact center produces many runs. A run for an event of another type ends at the Ignored outcome and does nothing. To keep the list short, tick Delete successfully completed workflows in the workflow's Properties, or open Settings > Workflow Trimming: Statuses picks which runs to remove once they pass the Retention period (90 days by default), and Disable turns the trimming off.
Contact Center activities
A task only appears in the Add Task list when the feature it needs is on. Every field marked as Liquid can take a value from the event, such as {{ Workflow.Input.AggregateId }} for an activity.
| Activity | Fields | Outcomes | Needs |
|---|---|---|---|
| Contact Center Event (event) | Event type | Matched, Ignored | Contact Center |
| Place Call or Send Message | Activity | Done, Already Started, Failed | Contact Center |
| Set Agent Presence | User, Status, Reason | Done, Failed | Contact Center Agents |
| Find Agent Numbers | User name | Done, NotFound | Contact Center and Omnichannel Channel Endpoints |
| Send Text Message | From, To, Message, Agent | Done, Failed | SMS Messaging Channel |
| Update Contact | Contact, Fields to set, Publish a draft | Done, Failed | Omnichannel Activities |
| Enqueue Activity | Activity, Queue, Priority | Done, Failed | Contact Center Work Distribution |
| Hand Off to Live Agent | Activity, Queue, Reason, Summary | Connected, Waiting In Queue, Callback Scheduled, Failed | Contact Center Work Distribution |
| Schedule Callback | Destination, Delay (minutes), Campaign, Queue, Contact | Done, Failed | Contact Center Outbound Dialer |
| Schedule Dialer Retry | Activity, Delay in minutes | Scheduled, Exhausted, Failed | Contact Center Outbound Dialer |
| Start Call Recording / Stop Call Recording | Interaction | Done, Indeterminate, Failed | Contact Center Call Recording |
The Leads, Accounts and Opportunities page describes the Lead Converted event and the Convert Lead task of the Omnichannel CRM feature.
What each task does
- Place Call or Send Message starts an automated activity right away instead of waiting for the next automatic pass. A Phone activity is dialed; an SMS activity is sent its opening message. It ends in Already Started when the activity was already started, so a workflow that fires twice never calls a customer twice. It does not run the checks the automatic pass runs first (opt-out, numbers not in service, do-not-call lists and the calling window), so use it only for contacts you have already cleared.
- Set Agent Presence puts an agent into a status such as a break, with an optional reason. The Status list offers Offline, Available, Break, Requested break, Away, Do not disturb, Meeting, Training and After-hours unavailable. It leaves out the reserved, busy and wrap-up states, because the platform sets those itself while an agent is offered or handling work.
- Find Agent Numbers looks up the numbers an agent calls and texts from. See the example above.
- Send Text Message sends a text from one of your SMS numbers. Agent is optional: name an agent so the customer's reply reaches them, or leave it empty for a system text.
- Update Contact sets fields on a contact or lead. Fields to set is Liquid that renders JSON, and only the fields it names change. Unlike Orchard Core's Update Content Item, it does not check the record's required fields, so it works on contacts and leads loaded without them. See the example above.
- Enqueue Activity puts an activity on a queue for routing. Priority is optional; Use queue default keeps the queue's own priority. If the activity or the queue does not exist, the task ends in Failed.
- Hand Off to Live Agent moves an automated (AI) conversation to people: a live call is put in a queue and offered to an agent, and a text conversation becomes a queue-owned conversation in the messaging workspace. Leave Queue empty to use the hand-off queue of the subject flow. Reason is shown to the agent who takes it, and Summary gives them the conversation so far. It ends in Connected (put straight through), Waiting In Queue, or Callback Scheduled (for example after hours), so you can handle each case differently. It does nothing to a call a person is already handling.
- Schedule Dialer Retry creates the next attempt of a dialer call, as the Try Again action of a subject flow does: a new activity in the same campaign with the same dialer profile, due after the Delay in minutes and never sooner than the profile's retry delay. It ends in Scheduled, Exhausted when the contact has no attempts left, or Failed. See Call a contact again.
- Schedule Callback schedules a callback to the Destination number. Delay (minutes) of 0 makes it due now. Campaign, Queue and Contact are optional.
- Start Call Recording and Stop Call Recording end in Indeterminate when the provider may have made the change but the platform could not confirm it. Use that outcome to alert someone or check the recording, rather than assuming it worked.
What workflows cannot do
- Transfer a live call. A transfer needs the agent or supervisor who asks for it, so it stays an action people take on the call.
- Give work to one particular agent. Routing decides who gets work, taking presence, skills and entitlements into account. Use Enqueue Activity to put the work on a queue and let routing pick the agent.