Genesys Cloud (formerly PureCloud)

Discussion Thread View
Expand all | Collapse all

WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

  • 1.  WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

    Posted 09-01-2020 10:34
    Hi,

    One of our customers is asking to have their clients contacting them by webchat channel, informed about the following data if no agents are available: "Position in Queue" and "Estimated Wait Time".

    Call Position in Queue  and Estimated Wait Time, are not available directly as it is only a variable available for InQueue flows and not for InboundChat Flows.

    How can we get this information?

    Tried to search on the API Explorer at the Developer site, and found nothing about "position" (trying to see if the "Postion in Queue" can be retrieved.

    Estimated Wait Time, can be consulted as found in the API Explorer:





    But how can this be consulted in the Inbound Chat flow?

    An example is welcome!

    Thanks again for your help.

    Best regards
    #AskMeAnything(AMA)
    #DigitalChannels
    #Implementation
    #Routing(ACD/IVR)

    ------------------------------
    Jorge Marcelo Negri
    Senior Project Consultant
    Genesys PureCloud Certified Associate
    In Motion Argentina
    Ciudad Autónoma de Buenos Aires
    Argentina
    ------------------------------


  • 2.  RE: WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

    Posted 09-01-2020 10:53
    At current, you can only provide this in a chat flow BEFORE it transfers into the queue.  Once you use Transfer to ACD, you have no way to inject messages into the chat channel.  Now, if you were to front-end chat with a bot, it could look at this API can inject messages occasionally.  What we need is In-queue flows for Chat as suggested here:  https://genesyscloud.ideas.aha.io/ideas/CLSELF-I-142

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

    Posted 09-01-2020 10:58
    Thanks again Robert!

    May be some day this becomes available within Inbound Chat flows on Architect.

    Regards


    ------------------------------
    Jorge Marcelo Negri
    Senior Project Consultant
    Genesys PureCloud Certified Associate
    In Motion Argentina
    Ciudad Autónoma de Buenos Aires
    Argentina
    ------------------------------



  • 4.  RE: WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

    Posted 11-26-2020 17:12
    Hi Jorge,
    I used a custom action to do this in my chat low. I added my action for you to test. just import it under integration and action and test it there.you need the queue ID and media type for input.
    you can use Call Data Action in your flow to get the estimated wait time in seconds. you have to pass the value in send response tool before queuing the chat to the ACD queue.

    I think you can also use the observation API to get the number of interaction waiting to display the position in queue

    /api/v2/analytics/queues/observations/query

    try this
    {
    "filter": {
    "type": "and",
    "clauses": [
    {
    "type": "and",
    "predicates": [
    {
    "type": "dimension",
    "dimension": "queueId",
    "value": "your queue ID"

    }
    ]
    }
    ]

    },
    "metrics": ["oWaiting"]



    }

    ------------------------------
    Kamyar Yazdani
    Aria Solutions
    ------------------------------



  • 5.  RE: WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

    Posted 11-26-2020 17:16
    save this as Get Estimated Wait Time.json file . it did not let me upload it here;

    {
    "name": "Get Estimated Wait Time - Exported 2020-11-26 @ 13:55",
    "integrationType": "purecloud-data-actions",
    "actionType": "static",
    "config": {
    "request": {
    "requestUrlTemplate": "/api/v2/routing/queues/${input.QUEUE_ID}/mediatypes/${input.MEDIA_TYPE}/estimatedwaittime",
    "requestType": "GET",
    "headers": {
    "UserAgent": "PureCloudIntegrations/1.0",
    "Content-Type": "application/x-www-form-urlencoded"
    },
    "requestTemplate": "${input.rawRequest}"
    },
    "response": {
    "translationMap": {
    "estimated_wait_time": "$.results[0].estimatedWaitTimeSeconds"
    },
    "translationMapDefaults": {},
    "successTemplate": "{\n \"estimated_wait_time\": ${estimated_wait_time}\n}"
    }
    },
    "contract": {
    "input": {
    "inputSchema": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Estimated Wait Time Request",
    "description": "The estimated wait time for a specific media type and queue.",
    "type": "object",
    "required": [
    "QUEUE_ID",
    "MEDIA_TYPE"
    ],
    "properties": {
    "QUEUE_ID": {
    "type": "string",
    "description": "The queue ID."
    },
    "MEDIA_TYPE": {
    "type": "string",
    "description": "The media type of the interaction: call, chat, callback, email, social media, or video communication.",
    "enum": [
    "call",
    "chat",
    "callback",
    "email",
    "socialExpression",
    "videoComm"
    ]
    }
    }
    }
    },
    "output": {
    "successSchema": {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Get Estimated Wait Time Response",
    "description": "Returns the estimated wait time.",
    "type": "object",
    "properties": {
    "estimated_wait_time": {
    "type": "integer",
    "title": "Estimated Wait Time in Seconds",
    "description": "The estimated wait time (in seconds) for the specified media type and queue. "
    }
    }
    }
    }
    },
    "secure": false
    }

    ------------------------------
    Kamyar Yazdani
    Aria Solutions
    ------------------------------



  • 6.  RE: WebChat: inform "position in queue" and "Estimated Wait time" by routing to a chat flow

    Posted 11-26-2020 17:20
    Thanks Kanyar!!

    Regards,




    ------------------------------
    Jorge Marcelo Negri
    Senior Project Consultant
    Genesys PureCloud Certified Associate
    In Motion Argentina
    Ciudad Autónoma de Buenos Aires
    Argentina
    ------------------------------