Hello everyone! I am super passionate about automating our daily workflows! We run massive outbound dialer campaigns every day, and our management team wants an automated daily report showing the exact hit rate and Right Party Connect metrics for each campaign. I am writing a daily script to pull this data, but the standard /api/v2/analytics/conversations/aggregates/query endpoint is incredibly difficult to filter by Campaign ID! The metrics in the native Outbound Campaign Performance views are fantastic, but I cannot figure out which API endpoint powers those specific views. Is there a dedicated analytics endpoint for outbound campaigns, or must I parse every single conversation detail to calculate the hit rates manually?
Good morning. I encountered a similar requirement when developing a Python integration for our reporting department. You do not need to parse the raw conversation details manually.
The standard conversation aggregate query is indeed the correct endpoint, but you must construct your JSON filter correctly. You need to group by the outboundCampaignId dimension.
Furthermore, to determine the Right Party Connect metric, you must filter by the wrapUpCode dimension. You will need to map your specific wrap-up codes to the outcomes you consider a successful connection.
The user interface performs this mapping internally based on your wrap-up code classifications.
The previous reply is correct regarding the aggregate query. However, for outbound campaign performance specifically, you should utilize the Outbound Campaign Analytics endpoints. Querying /api/v2/outbound/campaigns/{campaignId}/stats provides real-time snapshot data regarding the contact list progression and hit rates without requiring complex aggregate queries.
If you require historical daily rollups, you must use the standard aggregate endpoint and filter by outboundCampaignId. Ensure you use the tHandle and nOutboundAttempted metrics to calculate your precise penetration rates.