Placing an outgoing call based on a variable


Contact center admins can set up logic in the flow editor to write to a custom variable, then use this variable in the Route To widget to place an outgoing phone call.

This article covers:

Prerequisites for placing an outgoing call based on a variable

How to place an outgoing call based on a variable

  1. Create a custom variable with the Phone, E.164 data type that will be used to define the phone number to call.
  2. Add and customize the Script widget to write a phone number to a custom variable.
    Note: Refer to the Script widget support article for examples on using the Script widget.
  3. Add a Route To widget to the flow.
  4. Select the Route To widget and customize these settings in the Settings tab:
    • Route to: Select OutgoingCall.
    • Outgoing Call Target: Select Variable.
    • Variable: Select the variable that will contain the phone number to call.
    • Add Country Code to Variable: Enable the toggle add the country code before the variable-based number.
      • Country/Region: Select a country code.
    • Max Ring Time: Enter the total maximum wait time allowed in seconds. When the maximum is exceeded, callers will be routed based on the Overflow exit setting.
    • Caller ID: Select the caller ID used to place the outgoing call.
      • Flow Number: Use the phone number assigned to the flow's entry point.
      • Original Caller ID: Use the consumer's caller ID.
      • Outbound Queue Caller ID: Use a caller ID assigned to a queue
        • Outbound Queue: Select a queue to place the outbound call.
        • Queue Caller ID: Select a caller ID that's assigned to the previously-selected queue. This will be used to place the outbound call.
  5. Click the Exit tab to set the exit settings.
    • Call Answered: Select the destination widget if the call successfully connects to the target phone number or to voicemail.
    • Call Failed: Select the destination widget if the call is declined, the target phone number is busy, or the target phone number is invalid.
    • Call Not Answered: Select the destination widget if the call exceeded the Max Ring Time wait time set in the widget’s settings.

Example

Note: This section shows an example configuration and is not meant to be a complete configuration guide.

The following example contains a global custom variable with the variable name, NightAnsweringService. This string variable will contain the number of an after-hours answering service that will receive calls when the queue is closed.

Flow layout

Route To widget

Set the following settings in the AfterhoursService Route To widget. This will send the caller to a queue defined by the global variable.