- Newest
- Most votes
- Most comments
In this scenario, where your Lambda function is triggered by the Contact Lens summary generation event, you don't have direct access to the agent information through the event payload. However, you can still retrieve the agent's name by using the contact ID that should be available in the Contact Lens summary file.
Here's a general approach you can take:
-
Extract the contact ID from the Contact Lens summary file.
-
Use the Amazon Connect API, specifically the DescribeContact operation, to retrieve detailed information about the contact, including the agent information.
-
With the agent's user ID obtained from the DescribeContact call, you can then use the DescribeUser operation to get the agent's full name and other details.
To implement this in your Lambda function:
-
First, ensure your Lambda function has the necessary IAM permissions to call the Amazon Connect API.
-
Use the AWS SDK for your programming language to make the API calls.
-
Extract the contact ID from the Contact Lens summary file.
-
Use the contact ID to call the DescribeContact API.
-
From the DescribeContact response, extract the agent's user ID.
-
Use the agent's user ID to call the DescribeUser API and retrieve the agent's name.
-
Once you have the agent's name, you can include it along with the Contact Lens summary when storing the information in Customer Profiles.
This approach allows you to retrieve the agent's name even when your Lambda function is triggered by the Contact Lens summary generation event, without relying on Kinesis data streams.
Sources
Provide call metadata for Contact Lens integration - Amazon Connect
Amazon connect conversational analytics - contact flow condition | AWS re:Post
Relevant content
- asked 10 months ago
- asked 7 months ago