Postcall Contact Lens Import
Contact Lens for Amazon Connect is a set of machine learning (ML) capabilities integrated into Amazon Connect. With Contact Lens for Amazon Connect, contact center supervisors can better understand the sentiment, trends, and compliance of customer conversions to effectively train agents, replicate successful interactions, and identify crucial company and product feedback.
Contact Lens are available within your Amazon Connect instance in CTR page, and Contact Lens data are stored in Amazon Connect S3 bucket. With the AWS Serverless Application for Salesforce (Amazon Connect Salesforce Lambda), you can import Contact Lens data into your Salesforce org.
Contact Lens Import
Before using AWS Serverless Application (Amazon Connect Salesforce Lambda) to import Contact Lens data, you need to enable Contact Lens in Amazon Connect. More information can be found at https://docs.aws.amazon.com/connect/latest/adminguide/enable-analytics.html.
Once enabled during the installation of AWS Serverless Application (Amazon Connect Salesforce Lambda), Contact Lens import is activated on a call by call basis by adding a specific contact attribute. This attribute is used during Contact Lens processing to trigger the import task.
Creating the AWS Lambda Trigger for the Contact Lens Data
Make sure you set ContactLensImportEnabled to true during the deployment of Amazon Connect Salesforce Lambda application.
Once the deployment is finished, you need to configure a trigger that invokes a Lambda function when Contact Lens output file is generated and stored in S3.
In a browser tab, login to the AWS Console.
Open the AWS Lambda Console.
In the filter field of the AWS Lambda console, enter sfProcessContactLens and press enter to filter the list of functions.
Select the Lambda that includes sfProcessContactLens in the name.
Expand the Designer section.
Select Add trigger
- In Trigger configuration, select S3 from the dropdown list
Select the bucket of your Amazon Connect instace. You can find your Amazon Connect bucket name by clicking on your Amazon Connect instance alias in Amazon Connect console.
Change the Event type to PUT.
Set the Prefix to Analysis/Voice/2020. Note that this might change as the date changes so you will need to update this on the first day of every new year.
Set the Suffix to .json
The trigger configuration should now be similar to the following:
Select Add
If everything has been configured correctly, you should received a success message.
Enabling Contact Lens Import
Login to your Amazon Connect instance as an Administrator
From the left navigation, choose Routing then select Contact flows
Open the contact flow that you want to use to enable Contact Lens import.
In you contact flow, before you transfer to queue, add a new Set contact attributes block
Configure the block to set a few contact attributes:
To turn on Contact Lens data import, set contactLensImportEnabled to true.
For recording import, there are two options: original call recording and redacted call recording. Note that you can only import one of the recordings for each contact.
To turn on original recording import, set postcallRecordingImportEnabled to true
To turn on redacted recording import, set postcallRedactedRecordingImportEnabled to true
Save the Set contact attributes block. Make sure it is appropriately connected to your contact flow, and Publish the flow.
Wait approximately 2 minutes to give the contact flow time to publish.
Place a call, connect to your agent, speak for a few moments, then end the call. Make sure the agent exits after call work
The Contact Lens data is emitted a couple of minutes after call completion and the import happens almost immediately.