Is there a clean way to structure the JSON payload for the api/now/table/qmgr_quality_score endpoint when triggered from a Genesys Cloud Data Action?
- Environment details: Genesys Cloud Release 2024-12 (v13.2) hosted in AWS London (eu-west-2). ServiceNow instance is Washington DC (washington.service-now.com).
- The integration uses a scheduled Data Action to sync quality assessment results from Genesys Cloud Quality Management to ServiceNow for SLA tracking.
- The flow triggers every 15 minutes, fetching completed assessments via the
api/v2/quality/assessmentsendpoint, filtering forstatus: completedandcreated_datewithin the last hour. - Each assessment is then mapped to a ServiceNow record using the
webhook.executenode. - The issue arises specifically when the payload contains multiple interactions linked to a single agent in a single assessment batch.
- ServiceNow returns a
422 Unprocessable Entityerror with the message:Invalid value for field 'interaction_id'. Value must be unique. - This suggests that ServiceNow is enforcing a uniqueness constraint on the
interaction_idfield in theqmgr_quality_scoretable, which conflicts with how Genesys Cloud generates IDs for multi-channel interactions (e.g., chat followed by callback). - The webhook payload includes standard fields:
agent_id,interaction_id,score,feedback, andtimestamp. - Attempts to use a Data Action to transform the
interaction_idby appending a timestamp or random suffix have failed because the downstream ServiceNow script includes a validation step that rejects non-standard ID formats. - Cross-referencing the ServiceNow documentation for
qmgr_quality_score, there is no clear indication of whether theinteraction_idshould be a composite key or if a separatesys_idmapping is required. - The Genesys Cloud Data Action logs show successful execution of the fetch step, but the webhook.execute node fails with a 422 status code and a retry limit of 3 is exhausted within 60 seconds.
- Is there a recommended pattern for handling duplicate
interaction_idvalues when syncing from Genesys Cloud to ServiceNow? - Should the integration logic shift to updating an existing record via
sys_idrather than creating new entries for each interaction? - Any insights on how other teams have resolved this uniqueness conflict in similar QM-to-ServiceNow integrations would be appreciated.