Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Padded EWT in Messaging Flows

    Posted 10 days ago

    I am trying to ascertain if it is possible to use Padded estimated wait time in a messaging in-queue flow. We are using Padded EWT in our in-queue call flows, and also have an expression written for standard EWT in the message in-queue flows GetQueueEstimatedWaitTime(FindQueue("XXX_Queue_Name")). My question is, is it possible to write an expression for Padded EWT? My initial research suggests this may not be possible, but any pointers are greatly appreciated. Thanks!


    #Architect

    ------------------------------
    Dave Stockdale
    Voice Engineer
    ------------------------------


  • 2.  RE: Padded EWT in Messaging Flows

    Posted 10 days ago
    Edited by Phaneendra Avatapalli 10 days ago

    Hi Dave,

    My understanding is that there isn't a separate Architect expression that returns the padded EWT used by the Play Estimated Wait Time action.

    In our in-queue message flow, we currently display the standard EWT using:

    Append(
      "Your estimated wait time is ",
    Substring(ToString(Message.EstimatedWaitTime), 2, 30)
    )

    One idea may be to create the padded range manually using Message.EstimatedWaitTime. For example, with a one-minute padding:

    Task.LowerEWT =
    If(
      Message.EstimatedWaitTime > MakeDuration(0, 0, 1, 0),
      Message.EstimatedWaitTime - MakeDuration(0, 0, 1, 0),
      MakeDuration(0, 0, 0, 0)
    )

    Task.UpperEWT =
    Message.EstimatedWaitTime + MakeDuration(0, 0, 1, 0)

    Then build the message using:

    Append(
      "Your estimated wait time is approximately ",
      Substring(ToString(Task.LowerEWT), 2, 30),
      " to ",
      Substring(ToString(Task.UpperEWT), 2, 30)
    )

    I haven't tested these expressions, but this may be worth trying in Architect to see whether it provides a similar padded EWT range for messaging.

    Hope this helps.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 3.  RE: Padded EWT in Messaging Flows

    Posted 9 days ago

    Thank you Phaneendra, we will be giving this a go later in the week.



    ------------------------------
    Dave Stockdale
    Voice Engineer
    ------------------------------



  • 4.  RE: Padded EWT in Messaging Flows

    Posted 7 days ago

    Hi Dave, 

    I ended up using the following expression, which announces "less than a minute" for seconds-only durations, "approximately 1 minute" for PT1M, and a padded ±1 minute range for anything greater than 1 minute:

    If(
        FindString(ToString(Message.EstimatedWaitTime), "M") == -1,
        "Your estimated wait time is less than a minute",
        If(
            FindString(ToString(Message.EstimatedWaitTime), "PT1M") > -1,
            "Your estimated wait time is approximately 1 minute",
            Append(
                "Your estimated wait time is between ",
                ToString(
                    ToInt(
                        subString(
                            ToString(Message.EstimatedWaitTime),
                            2,
                            FindString(ToString(Message.EstimatedWaitTime), "M") - 2
                        )
                    ) - 1
                ),
                " and ",
                ToString(
                    ToInt(
                        subString(
                            ToString(Message.EstimatedWaitTime),
                            2,
                            FindString(ToString(Message.EstimatedWaitTime), "M") - 2
                        )
                    ) + 1
                ),
                " minutes"
            )
        )
    )

    Based on how Message.EstimatedWaitTime is returned (e.g. PT23S, PT1M, PT5M), we'd expect the following:

    Estimated Wait Time Announcement
    PT23S Your estimated wait time is less than a minute
    PT59S Your estimated wait time is less than a minute
    PT1M Your estimated wait time is approximately 1 minute
    PT2M Your estimated wait time is between 1 and 3 minutes
    PT5M Your estimated wait time is between 4 and 6 minutes
    PT12M Your estimated wait time is between 11 and 13 minutes


    I did some testing with a chat queue by keeping an interaction active for around 12 minutes and then starting a fresh chat. Interestingly, the announcement still remained "less than a minute."

    My theory is that chat utilization may be influencing the predicted EWT, so it might be worth testing after fully consuming the agent's concurrent chat capacity and creating a genuine queue backlog. I'd be interested to hear what results you get.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------