Encountering a persistent 400 Bad Request error when attempting to push conversation transcripts from Genesys Cloud to ServiceNow via a custom webhook. The flow is triggered on conversation end, utilizing the GET /api/v2/analytics/conversations/details endpoint to fetch the transcript data before sending it to the ServiceNow REST API.
The issue appears isolated to transcripts containing specific special characters, particularly curly quotes (” ”) or em-dashes (-) originating from the customer’s input. The JSON payload generated by the Data Action fails ServiceNow’s strict schema validation.
Environment details:
- Genesys Cloud Release: Latest (EU region)
- ServiceNow Version: Washington DC
- Webhook Method: POST
- Content-Type: application/json
The error response from ServiceNow indicates: Invalid JSON format: Unexpected character '"' at position 145. Interestingly, standard ASCII characters and standard punctuation pass through without issue. Has anyone implemented a robust sanitization step within the Genesys Cloud Data Action or via a subsequent script node to handle UTF-8 encoding mismatches before the webhook dispatch? Looking for best practices to ensure data integrity without dropping the ticket creation entirely.