If I remember correctly… the issue isn’t just the JSON path. EventBridge patterns are notoriously strict about data types and nesting. The detail object in Genesys Cloud events often contains a conversation wrapper that you’re missing.
Here’s how I usually structure these rules to catch state changes reliably:
Verify the Source: Ensure source is exactly genesys.conversations. No trailing slashes.
Check Detail-Type: ConversationEvent is correct, but make sure you’re not filtering on ConversationCreated if you want state changes.
Fix the Detail Path: The type field usually lives inside detail.conversation.type. Your current pattern looks for detail.type, which likely returns nothing.
Also, double-check your IAM Role permissions. The EventBridge service needs events:PutRule and events:PutTargets permissions, plus the target Lambda needs lambda:InvokeFunction. If the rule exists but doesn’t fire, it’s often a permissions issue with the target, not the pattern itself.
One more thing: EventBridge can have a slight delay. Don’t expect real-time firing. It’s usually within seconds, but not milliseconds. If you need instant reactions, stick to the Client App SDK with postMessage or websockets.
the pattern above is too loose on the detail side. EventBridge matches strictly. if you’re using the standard integration, the type field inside detail is often conversation-state-changed, not state-change. also, make sure you aren’t missing the conversation object if your rule expects it.
i’ve seen this break when people assume state-change works across all event versions. it doesn’t. verify the actual payload in CloudWatch first. copy the raw JSON from a recent event, then use the EventBridge pattern tester tool in the AWS console to validate. if that fails, your schema version might be mismatched with the integration config. check the DFO mapping too. sometimes the custom channel injects extra fields that break the simple match.
yeah, the casing is usually the culprit. state-change doesn’t match. try conversation-state-changed. also, inspect the raw event payload in CloudWatch first. guessing the schema is painful. just fetch a sample via an analytics query to see the actual json structure before writing rules.
yeah, you’re missing the conversation wrapper. the docs are vague on this. always pull a raw sample via an analytics query first. guessing the schema just wastes hours.