Custom KPI attributions failing for predictive routing A/B test

Hey everyone, running an A/B test on a new predictive routing model to see if we can drop AHT. Variant B is performing way better on the primary outcome, but the custom KPI data isn’t hitting the dashboards. The model is scoring agents fine, but when trying to push the results via the API, it’s just not sticking.

Tried hitting POST /api/v2/events/routing/customkpiattributions with the event batch, but it keeps returning a 400 Bad Request. The payload is formatted correctly based on the spec, but it’s just rejecting the whole batch.

{
 "attributions": [
 {
 "conversationId": "12345-abcde-67890",
 "kpiName": "first_call_resolution",
 "value": 1
 }
 ]
}

The failure to persist custom KPI data via the /api/v2/events/routing/customkpiattributions endpoint is often linked to a mismatch in the payload structure or a lack of necessary permissions for the client credentials. From a data governance perspective, it’s imperative to verify that the attribution data doesn’t contain unauthorized Personal Identifiable Information (PII), as this could conflict with our internal GDPR Article 5 (Data Minimization) policies.

The request body must be a batch of events. If the kpiId is incorrect or the conversationId does not match an active or recently closed interaction, the system won’t commit the data.

{
 "events": [
 {
 "conversationId": "your-conversation-uuid",
 "kpiId": "your-kpi-uuid",
 "value": 125.5,
 "timestamp": "2023-10-27T10:00:00.000Z"
 }
 ]
}

A similar discrepancy was noted in a previous community post where the user forgot to wrap the event in the events array. Please verify the JSON structure. ensure the kpiId used in the POST request matches the ID retrieved from the predictive routing configuration. If the KPI was deleted or modified via /api/v2/routing/predictors/keyperformanceindicators/{kpiId}, the attribution will fail.

Since we’re on Zoom Contact Center, we maintain strict logging of these API calls to satisfy GDPR Article 30 records of processing activities. It’s recommended to review the API response body for any specific validation errors rather than relying solely on the HTTP status code.