Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Observation activity query endpoint seem to be not working

    Posted 14 days ago

    Hello,

    I am trying to use the following API.

    /api/v2/analytics/flows/activity/query: Query for ongoing flows (oFlow)

    This is documented in the following link:

    https://developer.genesys.cloud/analyticsdatamanagement/analytics/observation/activity-query

    Here is the post request i am sending.

    {
      "metrics": [
        {
          "metric": "oFlow"
        }
      ],
      "groupBy": [
        "flowId"
      ],
      "filter": {
        "type": "or",
        "clauses": [
          {
            "type": "or",
            "predicates": [
              {
                "type": "dimension",
                "dimension": "flowId",
                "operator": "matches",
                "value": "32a1c3be-5f72-40d2-b3a6-782369aeeaad"
              }
            ]
          }
        ]
      }
    }

    Goal is to get the oFlow metric for a specific flow which according to the documentation is the number of currently active interactions on this flow.

    Best Regards,

    Orestis.


    #PlatformAPI

    ------------------------------
    Orestis Dimitropoulos
    ------------------------------


  • 2.  RE: Observation activity query endpoint seem to be not working

    Posted 14 days ago

    Here is the response i get all the time:

    {}



    ------------------------------
    Orestis Dimitropoulos
    ------------------------------



  • 3.  RE: Observation activity query endpoint seem to be not working

    Posted 14 days ago

    I am trying to get oFlow metric for commonmodule and in-queue flow types. It seems that it is not working for such flow types. Can you advise?



    ------------------------------
    Orestis Dimitropoulos
    ------------------------------



  • 4.  RE: Observation activity query endpoint seem to be not working
    Best Answer

    Posted 14 days ago

    Hello @Orestis Dimitropoulos

    The oFlow metric from the /api/v2/analytics/flows/activity/query API has an important limitation that's not well-documented: it only works for flows that are directly invoked by active interactions (primarily inbound call flows and outbound call flows).
    The commonmodule and in-queue flow types do not generate oFlow metrics because:

     - Common modules are sub-flows called by other flows - they don't have direct interactions associated with them, so they don't appear in flow activity observations
     - In-queue flows are technically part of the queue context, not a direct flow interaction - the interaction is in the queue, and the in-queue flow executes within the queue context

    Solution: To monitor these flow types, you need to use alternative approaches:

    - For in-queue flows: Use the Queue Observation Query API (/api/v2/analytics/queues/observations/query) with the oInteracting or oWaiting metrics
    - For common modules: Monitor the parent flow (inbound/outbound) that calls the common module, since the active interaction is counted at the main flow level

    The empty response {} you're getting is expected - it's not an error, but the API indicating there's no oFlow data available for that flow type.



    ------------------------------
    Gabriel Garcia
    NA
    ------------------------------