WFM API 400 Error when pushing Quality Evaluation results to ServiceNow via Data Action

Looking for advice on a persistent integration failure between Genesys Cloud Quality Management and ServiceNow. The objective is to automate the creation of a ServiceNow incident record whenever a Quality Evaluation (QE) score falls below the defined threshold. The environment utilizes a Data Action triggered by the quality.evaluation.completed webhook event. While the webhook payload arrives at the Genesys Cloud endpoint successfully, the subsequent HTTP POST request to the ServiceNow REST API (/api/now/table/incident) returns a 400 Bad Request error with the message ‘Invalid JSON’. The payload structure has been validated against the ServiceNow API documentation and includes the required fields such as ‘short_description’, ‘description’, and ‘priority’. The issue appears to stem from the way Genesys Cloud serializes the nested ‘evaluation_details’ object within the webhook payload before passing it to the Data Action. Specifically, the JSON string containing the evaluator comments and score breakdowns contains unescaped newline characters and special characters that are not being handled correctly during the variable mapping phase. Attempts to use the ‘replace’ function in the Data Action to sanitize the input have proven ineffective, suggesting that the serialization occurs before the transformation step. The Genesys Cloud instance is running the latest release, and the ServiceNow integration is configured with OAuth 2.0 authentication. The request headers include the correct Content-Type: application/json and Authorization Bearer token. Debug logs indicate that the 400 error is returned immediately upon the initial connection attempt, implying a malformed request body rather than a logic error within ServiceNow. Has anyone successfully implemented a similar integration using the Data Action framework? Any insights into handling complex JSON payloads with nested objects and special characters in this context would be appreciated. The current workaround involves manual ticket creation, which defeats the purpose of the automation. The timezone for the evaluation timestamps is Europe/London, and the ServiceNow instance is also configured for this timezone. The Data Action is configured to retry the request three times with exponential backoff, but all retries fail with the same error code. The goal is to ensure that the evaluation data is accurately reflected in the ServiceNow incident record for further processing by the operations team.