Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Action to determine the number of waiting calls

    Posted 01-28-2025 00:31
    No replies, thread closed.

    I am currently considering a data action that counts the number of waiting calls in multiple queues.
    If it is a single queue, I can achieve this with the following structure, but for example, if I set the argument to 4, and I want to count the total number of calls waiting in a maximum of 4 queues, I don't know how to do it.
    If I want to count with 4 arguments, how should I do it for the contract, request body template, and response mapping?

    (CONTRACT)
    Input
    Title: input (object type)
    Title: queueId (string type)
     
    Output
    Title: results.data.stats (object type)
    Title: WaitingCalls (number type)
     
    (Action settings)
    HTTP Method: POST
     
    Request URL Template: /api/v2/analytics/queues/observations/query
     
    Request body template:
    {
        "filter": {
            "type": "or",
            "predicates": [
                {
                    "dimension": "queueId",
                    "value": "${input.queueId}"
                },
                {
                    "dimension": "mediaType",
                    "value": "voice"
                }
            ]
        },
        "metrics": ["oWaiting"]
    }
     
    }
    Response Mapping:
    {
      "translationMap": {
        "WaitingCalls": "results[0].data[0].stats.count"
      },.
      "translationMapDefaults": {
        "WaitingCalls": "0"
      },.
      "successTemplate": '{ \'WaitingCalls\": ${WaitingCalls} }"
    }
     
    Best regards,

    #API/Integrations
    #ArchitectureandDesign

    ------------------------------
    Matsumoto Shun
    Unknown
    ------------------------------


  • 2.  RE: Action to determine the number of waiting calls
    Best Answer

    Posted 01-28-2025 16:18
    No replies, thread closed.

    Hello Matsumoto,

    This would probably be a good question for the Genesys Cloud Developer Forum. I would recommend reaching out over there.



    ------------------------------
    Jason Kleitz
    Online Community Manager/Moderator
    ------------------------------