Skip to main content
Version: Latest

Contact Center Workflows

Orchard Core 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.

MenuDesign > Workflows
PermissionManage workflows
FeaturesWorkflows (OrchardCore.Workflows) plus the Contact Center features each task needs (see below)

Build a workflow​

The screencast builds a workflow that starts recording every call as soon as it connects.

  1. Open Design > Workflows and click Create Workflow. Enter a Name such as Record connected calls and click Save.
  2. Click Add Event, find Contact Center Event and click its Add button.
  3. Pick the Event type to react to, for example Call connected (leave Any event type to react to every event), and click Save.
  4. Click Add Task, find a Contact Center 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.
  5. On the canvas, drag the task away from the event, then drag from the event's Matched outcome to the task to connect them.
  6. Click Save.

The event passes these values to the workflow, which you can use in any field with Liquid: EventType, InteractionId, AggregateType, AggregateId, ActorId, ActorType, AgentId, AgentUserId and SourceComponent, for example {{ Workflow.Input.AgentUserId }}. The event's own details are under Data, for example {{ Workflow.Input.Data.PhoneNumber }}; see the two events below.

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. The dialer does not disposition a call nobody answered (it dials the record again later), so this is the event to use for "we called and they did not answer".

ValueWhat it holds
Data.OutcomeAnswered, NoAnswer, Busy, AnsweringMachine, NotInService, Rejected or Failed.
Data.PhoneNumberThe number that was called.
Data.ActivityItemIdThe activity the call was for.
Data.CampaignIdThe activity's campaign.
Data.HangupCause, Data.ProviderHangupCause, Data.SipHangupCauseHow 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 when it finds a number not in service, or by an automated (AI) call, including one nobody answered.

ValueWhat it holds
Data.DispositionNameThe disposition's name.
Data.OutcomeThe disposition's outcome: NotInService, NoAnswer, Busy, AnsweringMachine or None.
Data.SourceWhat applied it: Agent, AI, Provider, Workflow or System.
Data.PhoneNumberThe number the activity was reaching.
Data.ActivityItemId, Data.ContactContentItemId, Data.CampaignId, Data.SubjectContentType, Data.Channel, Data.AttemptsThe activity, its contact, campaign, subject, channel and attempt count.

Example: text a customer the dialer could not reach​

  1. Create a workflow and add the Contact Center Event event with the event type Dialer attempt completed.
  2. Add an If/Else task with the condition input("Data").Outcome == "NoAnswer", and connect the event's Matched outcome to it.
  3. Add a Send SMS task. Set Phone number to {{ Workflow.Input.Data.PhoneNumber }} and write the Body, then connect the If/Else task's True outcome to it.
  4. Save the workflow.

Every Power, Progressive or Preview call that rings out now sends the text. Use "Busy" or "AnsweringMachine" 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.

  1. Start the workflow from the Contact Center Event that follows the call, for example Activity disposition applied.
  2. Add Find Agent Numbers with User name set to the user who handled the call: {{ Workflow.Input.Data.CompletedById }}.
  3. Add Send Text Message with From {{ Workflow.Output.AgentSmsNumber }}, To {{ Workflow.Input.Data.PhoneNumber }}, your Message, and Agent {{ Workflow.Input.Data.CompletedById }}, 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.

The Event type list is grouped: Interaction, Activity, Routing & queues, Agent, Offer, Dialer, Callback, Call, Recording, Supervision, Secure capture and Shared voicemail.

Contact Center activities​

ActivityFieldsOutcomesNeeds
Contact Center Event (event)Event typeMatched, IgnoredContact Center
Place Call or Send MessageActivityDone, Already Started, FailedContact Center
Set Agent PresenceUser, Status, ReasonDone, FailedContact Center Agents
Find Agent NumbersUser nameDone, NotFoundContact Center, Omnichannel Addresses
Send Text MessageFrom, To, Message, AgentDone, FailedSMS Messaging Channel
Enqueue ActivityActivity, QueueDone, FailedContact Center Work Distribution
Hand Off to Live AgentActivity, Queue, Reason, SummaryConnected, Waiting In Queue, Callback Scheduled, FailedContact Center Work Distribution
Schedule CallbackDestination, Delay (minutes), Campaign, Queue, ContactDone, FailedContact Center Outbound Dialer
Start Call Recording / Stop Call RecordingInteractionDone, Indeterminate, FailedContact Center Call Recording