I’ve got an Azure Function set up to listen for Genesys Cloud conversation events via EventBridge. The goal is simple: trigger a downstream process whenever a conversation ends. I’m using the .NET SDK to manage the webhook, but the rule just won’t fire.
I created the event pattern in the GC admin console. Here is the JSON I’m using for the pattern match:
{
"eventSource": "genesys.cloud",
"eventNames": [
"conversation.events"
],
"eventFilters": [
{
"key": "conversation.state",
"match": "contains",
"value": "ended"
}
]
}
The webhook is active in GC. I can see the “Last successful delivery” timestamp updating when I manually trigger a test event from the admin UI. However, when an actual agent ends a call, nothing happens. No logs in Azure Functions. No HTTP 200s returned to GC.
I tried broadening the filter to just "eventNames": ["conversation.events"] without the state filter, and it still didn’t work. The docs say: “The event pattern must match the event source and event names exactly.” I’m matching genesys.cloud and conversation.events.
I checked the GC logs via the /api/v2/webhooks/{id}/events endpoint. It shows:
{
"id": "12345",
"eventSource": "genesys.cloud",
"eventName": "conversation.events",
"eventTime": "2023-10-27T15:30:00.000Z",
"status": "DELIVERED",
"httpResponseCode": 200
}
Wait. If it says DELIVERED with a 200, why isn’t my function logging? I added a simple Console.WriteLine at the very top of the function handler. Nothing. Is EventBridge swallowing the payload? Or is the pattern matching happening before the HTTP call, meaning the rule didn’t match, but GC is reporting success anyway? That sounds broken.
My Azure Function signature is:
public static async Task Run([EventGridTrigger] JObject eventGridEvent, ILogger log)
{
log.LogInformation("Event received: {0}", eventGridEvent);
}
I’m using the Microsoft.Azure.WebJobs.Extensions.EventGrid package. Maybe the binding is wrong? But if GC says it delivered, the HTTP call succeeded. Unless… does GC retry immediately and fail silently? I’m stuck. The pattern looks right. The endpoint works for tests. Live events do nothing.