Call Categorisation example uses Amazon Connect Contact Lens to identify call categories based on the conversation between agent and the customer. This capability is for a use case where customer wants to automatically categorise calls based on the business rules. Also, customer wants to know overall sentiment of the call from the caller and the agent perspective.
- User sets up business rules for call categorisation using Amazon Connect console
- User enables Contact Lens Post Call analysis* within Contact Flow
- Customer calls and converser with the agent
- Once the call is over, based on call recording Contact Lens generates post call analysis which includes call categories (based on Rules) and overall sentiment, along with other information
- The lambda function provided inserts the call categories and overall sentiment to corresponding Voice Call Object in Salesforce
Following high level architecture diagram shows the all the components involved as well as the flow.
- Caller places a call on Amazon Connect phone number
- Once the call lands on Amazon Connect, associated contact flow is triggered which has Contact Lens post call analysis enabled
- Call gets transferred to Salesforce Omni Channel agent interface, and agent answers the call
- Conversation between the agent and the caller takes place
- Once the call is completed, Contact Lens analyses the call and put the analysis in pre-defined S3 bucket (same bucket which used for call recording as well)
- Once the analysis is in the S3 bucket, the Lambda function is triggered
- The Lambda function extracts the information from the Contact Lens analysis and inserts into pre-defined fields of Salesforce Voice call object (using out-of-the-box Telephony Integration API)
In order to deploy this capability, following configurations need to be done in Salesforce and AWS.
Notes:
* For SCV Bundle customers, please talk to Salesforce team before implementing this capability to ensure that your Salesforce SCV license includes Contact Lens capability
** The features and capabilities of this solution/example may be incorporated or replicated in future releases of Service Cloud Voice.
- Log in into your Salesforce org and go to Setup
- In the Quick Find field type Object Manager
- Select Object Manager from the results
- In Object Manager find Voice Call
- Choose Fields & Relationships
- Select New
- Choose Long Text Area , then select Next
- Set a value for field label, such as Call Categories
- Select Next
- On the Step 3 page, select Next
- On the step 4 page, select Save
- When the page reloads, scroll to the new field you created and notice that it ends in __c
- Repeat steps 5 to 12 to add Overall Customer Sentiment and Overall Agent Sentiment fields with the exception of step 7 - please choose Number instead of Long Text Area
- To add Rules for Contact Lens, please refer - https://docs.aws.amazon.com/connect/latest/adminguide/build-rules-for-contact-lens.html
- To enable Contact Lens post call analysis within your Contact Flow, please refer - https://docs.aws.amazon.com/connect/latest/adminguide/enable-analytics.html
- Go to CloudFormation folder
- Right-click/control-click to download the awsscv_call_categorisation.yaml
- In a new browser tab, login to the AWS Console (https://console.aws.amazon.com/console/home)
- Make sure you are in the same region as your Amazon Connect instance. You can set the region by expanding the region selector in the upper right and choosing the region
- Navigate to the CloudFormation console
- Select Create Stack, and choose With new resources (standard)
- In the Specify Template section, choose Upload a template file
- Select Choose file
- Navigate to the folder where you saved awsscv_call_categorisation.yaml
- Select Next
- In the Stack Name field, enter AWSSCV-Call-Categorisation
- Enter the parameters as follows (most from your notepad):
- AWSRegion: Select the region where Amazon Connect is deployed
- ConnectInstanceName:Provide the instance name for Amazon Connect
- ContactLensS3Bucket: Provide S3 bucket configured for storing call recording (same bucket used for storing Contact Lens post call analysis) from Amazon Connect instance configurations, refer: https://docs.aws.amazon.com/connect/latest/adminguide/update-instance-settings.html
- TelephonyIntegrationLambda: ARN of out-of-the-box SCV lambda function called InvokeTelephonyIntegrationApiFunction which you can find from AWS Lambda Console
- LambdaLoggingLevel: Logging level of the new Lambda function which this CloudFormation template is going to create, default is INFO
- Select Next
- In Service Cloud Voice deployments, it is normal to see a warning on the next page, Configure stack options
- Scroll to the bottom and select Next
- Scroll to the bottom and select Create Stack
- After a minute or two, the stack should complete
- From Amazon Connect configure Contact Lens post call analysis rule
- In the rule, add keywords or phrases such as “change to next version”, “need latest model”, “upgrade”
- In action section, configure assign contact category and name category as “upgrade”
- Save the rule
- Create new Contact Flow called “Test Contact Lens Post Call Analysis”
- Enable post call analysis using Contact Lens in that contact flow, ref: https://docs.aws.amazon.com/connect/latest/adminguide/enable-analytics.html
- Associate phone number with the contact flow, ref: https://docs.aws.amazon.com/connect/latest/adminguide/associate-phone-number.html
- Place a call and get the call transfer to an agent
- Converser with the agent and use keywords / phrases configured in the Contact Lens rule - “upgrade”, “need latest model” or “change to next version”
- Once the call is completed, check the Details section Salesforce Voice Call object created for the call, you will find populated fields Call Categories, Overall Customer Sentiment and Overall Agent Sentiment (it might take few minutes for these fields to be populated)
This document shows how Contact Lens post call analysis can be leveraged to categorise a call based on business rules as well as gauge the overall sentiment of the call. This capability can be easily extended to add more fields from Contact Lens post call analysis to Salesforce Voice call object. For more information on Contact Lens post call analysis output ref: https://docs.aws.amazon.com/connect/latest/adminguide/contact-lens-example-output-files.html
