Context:
The integration architecture relies on Genesys Cloud Quality Management webhooks to trigger automated case creation in ServiceNow whenever a scorecard falls below the threshold. The webhook endpoint is configured to POST to /api/now/table/x_gc_quality_issues. Recent logs indicate a 400 Bad Request error. The Genesys Cloud payload structure for quality_events includes a nested object for scorecard_details, but the ServiceNow REST API expects flattened fields for the custom table mapping. Attempts to use a Data Action for field transformation before the webhook call have resulted in timeout errors due to the payload size exceeding the standard timeout window for synchronous calls.
Question:
What is the correct way to handle payload transformation for Quality Management webhooks destined for ServiceNow? Specifically, should the transformation logic reside within a Genesys Cloud Data Action using JavaScript, or is it more efficient to handle the nested object flattening via a ServiceNow Script Include on the onBefore insert phase? The current Data Action approach is failing with HTTP 408 errors when processing high-volume quality events during peak hours. Documentation suggests Data Actions are for simple lookups, yet complex transformations seem necessary here. Is there a recommended pattern for bridging the schema gap without incurring latency penalties?