Set up direct routing

Use direct routing to forward an email, call, or an SMS to an agent directly. For more information, see Direct routing overview. This article explains the high-level steps that you must perform to set up direct routing. Genesys also provides two CX-as-Code accelerators that you can deploy to get started with direct routing. The accelerators help you with sample configurations that you can use as is or edit to suit your requirements. The first accelerator creates data actions and in-queue flows, and the second accelerator creates an inbound call route, inbound flows, and a queue.

Prerequisites

  • Admins have the following permissions: 
    • Infrastructure As Code > Job > Add – To run the CX-as-Code accelerators to set up sample configuration
    • Infrastructure As Code > Job > View – To run the CX-as-Code accelerators to set up sample configuration
    • Directory > User > View – To Find User Action
    • Routing > Queue > View – To set up queue backup and alert timeout data actions
  • Admins have the following permissions to set up agent or queue backup: 
  • (Optional permission) Agents have the following permissions to set up their backup from the User profile > Preferences > Direct Routing section:  
    • Routing > Direct Routing Backup > Self View – To view their backup setting
    • Routing > Direct Routing Backup > Self Edit – To edit their backup setting
    • Routing > Direct Routing Backup > Self Delete – To delete their backup
  • Agents have the following permission: 
    • Routing > Conversation > Accept Off-Queue – To accept a direct routing interaction while the direct routing agent is Off queue and Available
  • Add the ‘directrouting’ integration tag to agent’s phone number, SMS number, or email address via the /api/v2/users/<userID> API. This user ID must also have the routing phone number and email address that is linked from the call/email route. For examples, see the Sample APIs to add direct routing tag section.

Set up direct routing

Once you have the pre-requisites set up, perform the following steps to set up direct routing:

    1. Add direct routing addresses to a route.
      1. Associate the direct agent’s phone number to a call flow – When a customer calls or sends an SMS to the direct agent’s phone, the call route identifies the queue and subsequently the user to whom the interaction must be sent. Associating the call with the route removes the user assignment in the list of DID numbers, and replaces it with the route assignment. For more information, see Add a call route.
      2. Associate the direct agent’s email address to an email flow – When a customer sends an email to the direct agent’s email ID, the email route identifies the queue and then the user to whom the email must be sent. For more information, see Use the organization’s email domain name.
    2. Set up queues to handle the direct routing interaction. For more information, see Create and configure queues.
    3. Configure an inbound flow to target a direct routing user.
      1. Configure a data action to identify the direct agent – Use the email address or the phone number of the direct agent to retrieve the agent’s user ID. For more information, see Call data action. For direct routing examples, see Example Architect flows and custom data actions for direct routing
      2. Identify the queue to forward the interaction – After you retrieve the user ID of the agent, add the ID to the transfer to ACD action. This identifies the designated queue and forwards to the agent. For more information, see Transfer to ACD action.
    4. Set up a backup for a direct routing agent
      1. Create an in-queue flow to create a voicemail and to transfer interactions to a backup queue. 
      2. Set up agent-level backup: Use the /api/v2/routing/users/<userID>/directroutingbackup/settings API to set up the backup for each individual direct routing agent. For an example, see the Sample APIs to set up agent-level backup section. If the agents have the necessary permissions (specified in Prerequisites section), they can set up their backup options in the User profile > Preferences > Direct Routing section.
      3. Set up queue-level backup: If an agent does not have the agent-level backup set up, then the queue-level backup takes effect. When a direct routing agent does not answer their interaction, Genesys Cloud forwards the interaction to the queue that is the backup to the queue to which the interaction originally arrived. The interaction is now treated as any normal ACD interaction and is routed per the routing method set in the backup queue. Click Admin > Queues and select the Queue name. On the Direct Routing tab, configure the backup for the queue. For more information, see Create and configure queues.
    5. Set up the direct numbers and email address for outbound interactions. 
      1. Ensure that the queue has a backup configured.
      2. Configure the queue to use the direct routing agent’s phone number – Click Admin > Queues and select the Queue name. From the Voice tab, enter the direct routing agent’s phone number in the Calling Party Number field, and check Use Direct Routing DID Address option. For more information, see Create and configure queues.
      3. Configure the email address when making an outbound interaction – Click Admin > Queues and select the Queue name. From the Email tab, enter the email address of the direct routing agent in the Outbound Email Address field, and check Use Direct Routing DID Address option. For more information, see Create and configure queues.
      4. Configure the direct routing agent’s phone number when making an outbound SMS interaction – Click Admin > Queues and select the Queue name. From the Message tab, enter the direct routing agent’s phone number in the Outbound SMS Number field, and check Use Direct Routing DID Address option. For more information, see Create and configure queues.
    6. Create in-queue flows to handle routing to backup agents or queues. For examples, see Example in-queue call flow for Direct Routing.

Best practices

Genesys recommends the following best practices to seamlessly route an interaction to a direct routing agent:

  • Set up queues that are dedicated to direct routing interactions.
  • Tag the direct agent’s non-primary number to the direct routing tag and retain the primary number for internal and transfer purposes. When you primary number for direct routing, any calls, transfers, or conferences to that number will be routed via the call route and direct routing flow.
  • Add the direct routing tag to Work Phone, Work Phone 2, or Work Phone 3. Retain Work Phone 4 and any other phone types for internal purposes. 

Sample APIs to add direct routing tag

The following examples illustrate how to add a direct routing tag to the existing user IDs using the /v2/users/<userID> API. When using the PATCH API, make sure that all existing user addresses are included in the request, to avoid overwriting any existing addresses.

{
  "addresses": [

   {
     "address": "+13172079639",
     "display": "+1 317-207-9639",
     "mediaType": "PHONE",
     "type": "WORK",
      "integration": "directrouting",
     "countryCode": "US"
   }
  ],
"version": 55
}

{
  "addresses": [
    {
      "address": "davidf@inindca.com",
      "mediaType": "EMAIL",
      "type": "WORK",
      "integration": "directrouting"
    }
  ],
  "version": 40
}

Sample APIs to set up agent-level backup

The following examples explain how to update agent’s backup configuration using the /v2/routing/users/{userID}/directroutingbackup/settings API using GET and PUT operations. 

{ 

"userId": "d9f3524a-98ba-4a7e-b7d3-ab5863cdd526", 
"type": "USER", 
"waitForAgent": true, 
"agentWaitSeconds": 70, 

}
{ 

"queueId": "d9f3524a-98ba-4a7e-b7d3-ab5863cdd526", 
"type": "QUEUE", 
"waitForAgent": true, 
"agentWaitSeconds": 70, 

}