We’ve got a Node.js Lambda function set up to consume Genesys Cloud webhooks for interaction updates. It works perfectly in the dev environment, but in production, about 10% of the events arrive with a stripped-down payload. The detail object is completely missing, so we can’t extract the interaction ID.
Here’s the handler code:
exports.handler = async (event) => {
const payload = event.detail;
if (!payload) {
console.log('Missing detail field:', JSON.stringify(event));
return {
statusCode: 200,
body: JSON.stringify({ status: 'ignored' })
};
}
const interactionId = payload.interaction.id;
// ... tracing logic using OTel SDK
};
The raw event logged to CloudWatch looks like this:
{
"version": "0",
"id": "a1b2c3d4",
"detail-type": "Interaction Update",
"source": "genesys.cloud",
"account": "123456789",
"time": "2024-05-20T10:00:00Z",
"region": "us-east-1",
"resources": ["arn:aws:events:us-east-1:123456789:event-bus/main"],
"detail": {}
}
Notice the empty detail object. This doesn’t happen in dev. We’re using the same EventBridge bus config. Is there a rate limit or payload size issue with Genesys Cloud webhooks that causes truncation? Or is this a bug in the EventBridge integration?
We need to handle these gracefully without losing data. Should we retry based on the event ID or is the data gone?