Genesys Webhook JSON Payload Mapping for Slack SLA Notifications

Looking for advice on mapping Genesys Cloud queue SLA breach events to a Slack webhook.

I have a Genesys webhook triggering on routing:queue:member:sla:breach. The payload contains nested objects, but my Slack integration fails with a 400 Bad Request. Here is my current mapping attempt:

{{toJson(queue.name)}}: {{toJson(sla.metric)}}

Is the syntax for extracting the queue name and SLA metric from the event payload correct? How should I structure the JSON body to ensure Slack accepts it?

You need to stop using toJson on primitive strings. That function wraps the value in quotes, which breaks the JSON structure of the Slack payload. The webhook engine passes the event body as a JSON object, so you can access fields directly.

For a routing:queue:member:sla:breach event, the structure is nested. Your mapping should look like this:

{
 "text": ":warning: SLA Breach in **{{queue.name}}** | Metric: **{{sla.metric}}** | Threshold: **{{sla.threshold}}**"
}

Do not use toJson. Use the raw variable names. If you need to send a complex object to Slack’s blocks array, you must construct valid JSON manually in the mapping editor or use a script step to format it. I see this mistake constantly when people try to push analytics-style data into chat tools. The payload you are seeing in the test tool is the raw JSON. Map the keys exactly as they appear there. Verify the scope webhooks:write is active on the service account triggering the webhook.

Depends on your setup, but generally the toJson wrapper is indeed the culprit for that 400 error. I confirmed that removing it fixes the structure. For PagerDuty integrations, I also ensure the event_type is strictly trigger. Here is the corrected payload structure:

{
 "event_type": "trigger",
 "payout": {
 "summary": "SLA Breach: {{queue.name}}"
 }
}