Deflect if there are no agents

Overview

In this deflection example, Chime will deflect chat sessions if there are no agents available.

Configuration

There are three types of deflections that you can use. For this example, we are going to use the "Conditionally Deflect Chats".

Step 1: Enable "Conditionally Deflect Chats"

To enable this settings, first go to Queue Settings > Deflection. Then select "Conditionally Deflect Chats".

Step 2: Update the conditional code

Top update the "Conditionally Deflect Chats" code, click the blue edit button (with the pencil icon). Then copy and paste the code below into the editor. Click OK, and then click Save to save the current queue settings.

@{
  var deflect = false;
    if(@Model.AvailableExpertsCount == 0) {
      deflect = true;
    }
}
@deflect

Step 3: Update the deflection message

Click the blue edit button for "Message When Chat is Automatically Deflected". Copy and paste the following json into the editor. Click OK and then save the queue settings.

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "TextBlock",
      "text": "Your chat has been ended because currently there are no agents available. Please email support about your questions/issues here: [support@instant-tech.com](mailto:support@instant-tech.com?subject=DeflectedChat)",
      "wrap": true
    }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0"
}

Conclusions

Once all three steps are configured now your queue shall behave such that if there are no agents available, then it will display the deflection message. Note that you can always customize this message according to your needs. And in addition, because deflection is a type of session's state, you can use Chime reporting feature to see how many chats were deflected.

Deflection message

Queue Dashboard > Charts & Metrics > Basic Statistics > Chat Statistics

Queue Dashboard > Charts & Metrics > Performance Metrics > Automatically Deflected Chats Over Time

Text Resources
fghazi