Priority Routing

The Routing Engine supports multiple queues. Tasks are enqueued to a queue based on the channel or based on the type of request initiated. There's no priority among queues. All queues are at the same level of priority. However, tasks enqueued to same queue may be prioritised based on task labels. 

There are two different ways of assigning a label to a request. 

  1. Pass label parameter in Javascript API
  2. Specify customer labels in CIM Customer module

On this page

Javascript API

Pass the label attribute with a predefined label via Javascript API. This API is called for initiating a web-chat request.

CIM Customer

In CIM Customer, assign a predefined label to the customer. For integration with other CRMs, refer to Priority Routing Integration with CRM.

Chat server configurations

To enable priority routing via CIM Customer labels do the following Hybrid Chat configurations for integration in Chat Environment Variables

# set IS_CIM_INTEGRATED to true to enable priority routing
IS_CIM_INTEGRATED=true
CIM_LABELS_API_PATH=http://<cim-api-path>/cim/label
CIM_CUSTOMER_QUERY_URL=http://<cim-api-path>/cim/customer?query=phone:{refId}

# If CIM api is hosted via https, add this environment variable in chat enviornment variables as well.
NODE_TLS_REJECT_UNAUTHORIZED=0


Define Routing Labels in Routing Engine

The next step is to create labels in Hybrid Chat. Visit https://hc-fqdn/mre-ui and navigate to Labels.

Use + sign in the bottom right corner to add a new Label. Assign a priority weight while creating a label.


Note

Priority weight should be a positive integer ranging from 1 (lowest) to 10 (highest). A request without any label is considered on lowest priority (1). 


The following screenshot features the label creation dialog. i.e.


For example, three labels Gold (highest priority), Silver (medium priority), Bronze (lowest from all the labels) defined in the system.


Labels in CIM

Labels with the same name ar expected in CIM as well. Hybrid Chat requests customer based on phone number as reference Id from CIM. So in CIM, the customer should have the same number in the phone field for Hybrid Chat. In CIM, assign labels to customer e.g.

In the above screenshot, a customer with the phone number 1111 is assigned the Gold label. This label will be used by Hybrid Chat to prioritize the customer. A customer could have multiple labels assigned e.g.

In this case, the label with the highest priority will be considered. In the above example, the Gold label is used by Hybrid Chat routing, unless a higher priority label is assigned to the customer.

Communication Flow

The following diagram illustrates the communication flow for Priority Routing.


Use Cases

Requests with different priority labels

Customers A (Bronze), B (Silver), C(Gold) initiates a chat request. The request from C is served before the other two.


Chats with same priority

The same priority customers are treated as FIFO. See following diagram for detailed flow.

Route on No Agent 

A lower priority task is selected and RONA occurs:


Limitations

  • If priority routing is configured, and the CIM APIs to check customer's priority are not available for some reason, the chat is not routed to an agent.  CSN-3721 - Getting issue details... STATUS