Hi,
I am trying to understand the best way to process the body of customer emails as soon as they’re received by Genesys (or as close to realtime as possible). The solution I’ve come up with is as follows:
- AWS EventBridge listens for the
v2.detail.events.conversation.{id}.customer.start
event and triggers a Lambda when an event haseventBody.mediaType == 'EMAIL'
- It uses the Conversation ID from the event to then call the
/api/v2/conversations/{conversationId}/recordings
endpoint to get the email body. - The Lambda can then send the email body on to our 'Processor'.
Is there a better way of doing this, or if this is the best way are there considerations I should be aware of? Alternatively I can get the email body by calling:
GET /api/v2/conversations/emails/{conversationId}/messages
to get the message ID(s)GET /api/v2/conversations/emails/{conversationId}/messages/{messageId}
to get the email body
Any advice would be greatly appreciated.