High Load - Deflect

Objective Provide a text resource that can deflect users coming in if more than 30 chats are waiting

Preview If a user comes in with less than 30 waiting it routes normally to interview

If a user comes in with more than 30 waiting, they are deflected

Code

@{    
    var maxWait = 30;
    var actions = "\"title\": \"Submit\",";
    var message = "";
    var message2 = "";
    var message3 = "";
    if(Model.WaitingSeekerCount >= maxWait){
        actions = "\"title\": \"Submit and End Chat \",\"data\": {\"msg\": \"/end\"}";
        message = "Thank you for contacting iSolv. We are experiencing a high volume of chats at this time. Please log a ticket via the iSolv portal or try again later.";
        message2 = "If business critical please telephone us.";
        message3 = "Please click the Submit and End Chat button to close your chat session.";
    }
}
{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "Image",
      "horizontalAlignment": "Left",
      "style": "Person",
      "url": "/Chime/content/isolve1.PNG",
      "size": "Large",
      "altText": ""
    },
    {
      "type": "TextBlock",
      "horizontalAlignment": "Left",
      "size": "Large",
      "weight": "Bolder",
      "color": "Dark",
      "text": "   Hi @Model.SeekerFirstName welcome to iSolv Service Desk.",
      "wrap": true
    },
    {
      "type": "TextBlock",
      "text": "@message",
      "wrap": true
    },
     {
      "type": "TextBlock",
      "text": "@message2",
      "wrap": true
    },
    {
      "type": "TextBlock",
      "text": "@message3",
      "wrap": true
    },
    {
      "type": "TextBlock",
      "text": "Please provide additional details about your request while I locate an expert for you:",
      "wrap": true
    },
    {
      "type": "Input.Text",
      "id": "question",
      "spacing": "Small",
      "value": "@Model.SeekerQuestion",
      "placeholder": "Please provide additional details...",
      "isMultiline": true
    }    
  ],
  "actions":[
        {
            "type": "Action.Submit",            
            @actions
        }
    ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.0"
}
Adaptive Cards
fghazi