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())