Conversation activity query returning empty results for specific flow outcomes

So we’re trying to move fast on a new dashboard for flow outcome aggregation and we’ve been hitting the /api/v2/analytics/conversations/activity/query endpoint to pull the raw events but for some reason the data is just disappearing for specific Architect outcomes. It’s a total nightmare because the conversations show up fine in the UI and the general conversation detail queries work but when we try to isolate the activity for these specific flows we get a 200 OK with a completely empty results array. We’ve been banging our heads against the pagination limits again because the dataset is huge and we’re forced to loop through pageNumber just to find a few events but even with a tight interval it’s coming up blank. I just want to ship it and get this into pandas but the API is acting like these events don’t exist.

The script is straightforward and handles the auth raw since we don’t have time for the SDK dance. It’s hitting the endpoint with a standard filter but the results are missing for any conversation that hit the “Payment_Failed” outcome in our billing flow.

import requests

url = "https://api.mypurecloud.com/api/v2/analytics/conversations/activity/query"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
payload = {
 "interval": "-PT1H",
 "filter": {
 "type": "And",
 "clauses": [
 {"type": "Dimension", "dimension": "flowName", "operator": "Equal", "value": "Billing_Payment_Flow"}
 ]
 }
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

Think of the conversation activity query like a wide-net fishing boat- it catches the big fish but misses the specific lures used in the flow. Why aren’t the outcomes showing up? Because they’re flow-level events, not conversation-level ones.

POST /api/v2/analytics/flows/activity/query
{
 "interval": "2023-10-01T00:00:00Z/2023-10-02T00:00:00Z",
 "filter": {
 "type": "flowOutcome",
 "flowOutcomeId": "your-outcome-id-here"
 }
}

edit: make sure the interval doesn’t overlap the 429 window if you’re polling this frequently.

2 Likes

i’m already using a custom filter for the flow outcome in the query body but it’s still coming back empty. we’re on Genesys Cloud and i’ve double checked the outcome names against the architect config so it’s not a typo.