How to Send AI-Generated Post Contact Summaries from Amazon Connect to Salesforce
Published on: 7/30/2025

What You’ll Need
- Enable Post-call summary in Amazon Connect (via Contact Lens).
- Use a Lambda function to push the summary to Salesforce.
- Create a custom Apex REST endpoint in Salesforce to accept the data.
- Store the summary on the custom field on VoiceCall object.
Step 1: Enable Post-Call Summaries in Amazon Connect
Reference : View generative AI-powered post-contact summaries in Amazon Connect
Step 2: Trigger a Lambda When the Call Ends
Use Amazon EventBridge to create a rule that will trigger the lambda once the call is Disconnected.
Step 3: Lambda Fetches the Summary and Sends to Salesforce
Here’s what your Lambda needs to do:
- Grab the contact ID and instance ID from the event.
- Use AWS SDK to get the summary from Amazon Connect Contact Lens.
- Send it to Salesforce via an HTTP POST request.
A simplified version of the lambda code:
NOTE : Instead of hardcoding the domain value/ bearer token within the Lambda function, consider storing it as an environment variable.
Reference : PostContactSummary
AWS SDK
Step 4: Salesforce Receives the Summary
In Salesforce, create an Apex class that acts like a Web Service with REST endpoint . It receives the summary and updates the custom field on VoiceCall object.
Here’s an example Apex class:
Testing the Post-Call Summary Integration
To validate that your Lambda function and the Salesforce Apex REST endpoint are working correctly, you can use Postman as a testing tool.
- Use the same REST endpoint exposed in your Salesforce Apex class:
- Add Authorization Header
- Pass JSON Body
- Send the Request : If everything is configured correctly, you should see a
200 OK
response and the corresponding update reflected on the VoiceCall record in Salesforce.