Can anyone clarify the expected JSON structure for the screen_recording:completed event when routing directly to a ServiceNow REST API endpoint via Data Actions?
We are implementing a workflow where agent screen sessions are automatically archived into ServiceNow Knowledge Articles for compliance review. The Architect flow triggers correctly upon session termination, and the Data Action connector successfully authenticates with the ServiceNow MID Server. However, the integration fails consistently with a 400 Bad Request response from ServiceNow, citing Invalid field value: sys_id.
The issue appears to stem from how Genesys Cloud formats the recording_url and metadata fields in the webhook payload. The documentation suggests a flat JSON structure, but our ServiceNow endpoint expects nested objects for the u_screen_metadata table. When we attempt to map the recording_id to the sys_id field for upsert operations, the payload size exceeds the expected limit, or the field types mismatch (string vs. GUID).
Specifically, the webhook payload contains:
{
"event": "screen_recording:completed",
"recording_id": "rec_12345",
"url": "https://s3.amazonaws.com/...",
"duration": 120,
"agent_id": "agent_9876"
}
ServiceNow returns a 400 error because recording_id is not a valid sys_id format for the kb_knowledge table. We have tried using Data Actions to transform the payload before sending it to ServiceNow, but the transformation fails if the metadata object is null, which happens in approximately 15% of short sessions.
Is there a specific transformation template or Data Action configuration that handles null metadata gracefully while ensuring the sys_id mapping is correct? We need to ensure that every completed screen recording generates a unique Knowledge Article reference without manual intervention. The current setup requires manual cleanup of failed imports, which defeats the purpose of automation.