Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  API for oLongestWaiting - error in API or Documentation

    Posted 07-02-2025 20:00

    I am trying to set up a Data Action so that I can retrieve the number of interactions waiting and the duration of the longest waiting interaction in a queue.  Previous threads and a search of the API area lead me to: 

    https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-analytics-queues-observations-query

    the metric oWaiting returns the number of interactions waiting - fantastic.

    the listed metric oLongestWaiting returns... an error:

    • REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"unsupported metric oLongestWaiting","code":"bad.request","status":400,"messageParams":{},"contextId":"57ec79cf-a526-4ad4-81df-74610d8f9913","details":[],"errors":[]} [ca2ff8cf-c5ea-48f5-af6d-cb28b51bcc19]

    To add further insult - I placed a bad metric in and received the following message:

    • REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"Value [oLongestWait] is not valid for field type [QueueObservationMetric]. Allowable values are: oActiveUsers, oAlerting, oInteracting, oLongestInteracting, oLongestWaiting, oMemberUsers, oOffQueueUsers, oOnQueueUsers, oUserPresences, oUserRoutingStatuses, oWaiting","code":"invalid.value","status":400,"contextId":"e054705c-6aca-4c9f-8b7d-72b831e8fb85","details":[],"errors":[]} [fc80a4e9-cb35-4be9-964b-59d7673e5e6b]

    Even the error message tells me that I should be able to use oLongestWaiting.

    This occurs whether I am testing on the developer site, or testing from the action within Genesys Cloud.

    Is this a failure of the API developer?  And if so can this functionality be added?

    Or, is this a failure of the documentation? and if so, can it be corrected?

    If anyone knows of another way that I could get the information I'm looking for into Architect (input queue, output longest current wait time) that would be an acceptable solution.

     


    #Architect
    #DataActions
    #PlatformAPI

    ------------------------------
    Peter DeMarco
    na
    ------------------------------


  • 2.  RE: API for oLongestWaiting - error in API or Documentation

    Posted 07-03-2025 10:51

    Hi Peter,

    Please open a ticket with Care.  API documentation errors should be fixed by the service teams.  If Care pushes you back to the developer forum please let me know (post the ticket number) and I will escalate internally.

    Thanks,
        John



    ------------------------------
    John Carnell
    Director, Developer Engagement
    ------------------------------



  • 3.  RE: API for oLongestWaiting - error in API or Documentation

    Posted 07-03-2025 11:32
    Edited by Peter DeMarco 07-03-2025 11:33

    I've opened a ticket with our vendor (ConvergeOne) referencing this thread. (I don't have direct access to Care)

    If it is just a documentation error, is there another alternative to retrieve the current longest wait of a specified queue?



    ------------------------------
    Peter DeMarco
    na
    ------------------------------



  • 4.  RE: API for oLongestWaiting - error in API or Documentation

    Posted 07-03-2025 22:49

    I did noticed when using the API end point /api/v2/analytics/queues/observations/query for the longest wait and it displays following error:

    "The request failed with response code: 400. Message: unsupported metric oLongestWaiting".

    I suspect that is no longer an option due to changes to the API by Genesys, but the documentation hasn't been updated. Can you please clarify?



    ------------------------------
    Prem
    ------------------------------