Skip to main content

Contact Channel Analytics

In addition to the CTI adapter's native ability to provide direct playback links to call recordings in Amazon Connect, the AWS Serverless Application Repository for Salesforce includes several functions that allow you to process recordings, perform quality analytics functions, and bring data into Salesforce.

This processing is done post-call, using the Contact Trace Record (CTR) as the initiation path. The following quality analytics options are available:

  • Call Recording Streaming: streams the actual audio file into Salesforce. This option is not mandatory for the others to function.

  • Recording Transcript: you can choose to have your call recordings transcribed to text and presented in a visual format that resembles a chat conversation. This allows for quick scanning of a call to identify key segments of conversation. This option is required if you wish to include the next level of analysis

  • AI-Driven Contact Analysis: once the recordings have been transcribed to text, you can also indicate that you wish to do further analysis of the conversation using Amazon Comprehend. Available options are:

    • Sentiment Analysis: returns the overall sentiment of the conversation (Positive, Negative, Neutral, or Mixed).

    • Keyphrase Extraction: returns the key phrases or talking points and a confidence score to support that this is a key phrase.

    • Language Detection: returns the dominant language with a confidence score to support that a language is dominant

    • Custom Entities: allows you to customize the AI to identify terms that are specific to your domain

    • Syntax Analysis: analyze the transcript using tokenization and Parts of Speech (PoS), and identify word boundaries and labels like nouns and adjectives within the text.

If you would like to set up streaming with Contact Lens, please finish the Call Recording Streaming section below and then follow the Contact Lens Streaming instructions and possibly the Post Call Contact Lens Import instructions.

Call Recording Streaming

You can stream Call Recordings in your Salesforce Org. This allows for easy access to the recordings from within Salesforce and can be used in conjunction with the other contact channel analytics features to provide a complete view of the customer interaction.

The import of call recordings is not required to activate the other contact channel analytics features.

Once enabled during the AWS Serverless Application Repository for Salesforce, recording import is activated on a call by call basis by adding a specific contact attribute. This attribute is used during Contact Trace Record processing to trigger the call import.

NOTE: After Call Work time is a part of the Contact Trace Record. As such, CTRs are not generated until the agent leaves the after call work state. If you are not seeing a recording import, please make sure the agent has completed the call and left the after call work state.

Cloudformation Template

To make sure that the AWS resources are set up, make sure that the PostcallRecordingImportEnabled parameter is set to true in your Cloudformation stack:

Note: If you are expecting more than 1000 concurrent calls, you may have to increase the timeout for the sfCTRTrigger lambda.

Enabling call recording streaming

  1. Login to your Amazon Connect instance as an Administrator

  2. From the left navigation, choose Routing then select Contact flows

  1. Open the contact flow that you want to use to enable call recording import. This contact flow must have Amazon Connect's native recording turned on.

  2. In you contact flow, before you transfer to queue, add a new Set contact attributes block

  3. Configure the block to set a contact attribute as follows:

    a. Destination key: postcallRecordingImportEnabled

    b. Value: true

  1. Save the Set contact attributes block. Make sure it is appropriately connected to your contact flow, and Publish the flow.

  2. Wait approximately 2 minutes to give the contact flow time to publish.

  3. Place a call, connect to your agent, speak for a few moments to test the audio, then end the call. Make sure the agent exits after call work

  4. After a minute or so, a new Contact Channel Analytics record should be imported, and when opening it, you should be able to stream the audio. (See section Adding Contact Channel Analytics to the Service Console. below).

Adding users to the AC_CallRecording permission set

This step is only necessary for non admin user accounts for the non contact lens case.

  1. In the setup search box, search for "Permission sets". Select the "AC_CallRecording" permission set. Select "Manage Assignments".
  1. Select "Add Assignments". Add the users that should have access to the audio recordings and select "assign".

Adding Contact Channel Analytics to the Service Console

  1. Log in into your Salesforce org and go to the Service Console

  2. Expand the navigation menu by selecting the down arrow and choose Edit.

  1. On the Edit Service Console App Navigation Items page, select Add More Items
  1. Select the + next to AC Contact Channel Analytics

  2. Select Add 1 Nav Item

  3. Change the order of your Navigation Items if desired, then choose Save

  1. Once the save completes, expand the navigation menu by selecting the down arrow and choose AC Contact Channel Analytics
  1. Change the list view from Recently Viewed to All
  1. Once the view refreshes, you should see your record(s)
  1. Select the recording to open it

  2. In the top right, you will see a button to stream the recording.

  1. NOTE: The recording playback, waveform, and transcript views are only active when you also choose to activate recording transcripts.

Recording Transcripts

Enabling the Recording Transcripts activates a process to run your contact recordings through Amazon Transcribe which uses a deep learning process to convert text to speech accurately and quickly. In addition, this process also creates a visual waveform of the recording, enables the in-app recording playback, and provides a visual representation of the conversation.

Once enabled during the AWS Serverless Application Repository for Salesforce, recording transcription is activated on a call by call basis by adding a specific contact attribute. This attribute is used during Contact Trace Record processing to trigger the transcription.

Make sure the Salesforce user accessing recording transcription are added to the AC_CallRecording permission set, as described in the previous section.

Enabling recording transcription

  1. Login to your Amazon Connect instance as an Administrator

  2. From the left navigation, choose Routing then select Contact flows

  1. Open the contact flow that you want to use to enable call transcription. This contact flow must have Amazon Connect's native recording turned on, since the transcription is dependent on it.

  2. In you contact flow, before you transfer to queue, add a new Set contact attributes block

  3. Configure the block to set two contact attributes as follows:

    1. Attribute 1: enables the transcription process

      a. Destination key: postcallTranscribeEnabled

      b. Value: true

    2. Attribute 2: specifies the transcription language

      -a. Destination key: postcallTranscribeLanguage

      b. Value: en-US (See Amazon Transcribe API Reference for valid language codes)

  1. Save the Set contact attributes block. Make sure it is appropriately connected to your contact flow, and Publish the flow.

  2. Wait approximately 2 minutes to give the contact flow time to publish.

  3. Place a call, connect to your agent, speak for a few moments from both the agent and the customer side to generate a good transcript, then end the call. Make sure the agent exits after call work

  4. The transcription will take at least as long as the call did. Wait an appropriate amount of time for the transcription to be available.

Accessing transcriptions

  1. Log in into your Salesforce org and go to the Service Console

  2. Expand the navigation menu by selecting the down arrow and choose AC Contact Channel Analytics. If you have not previously added AC Contact Channel Analytics to the navigation menu, complete the steps found in Adding Contact Channel Analytics to the Service Console.

  1. Change the list view from Recently Viewed to All
  1. Once the view refreshes, you should see your record(s)
  1. Select a record to view the details.

  2. Once the record opens, note the recording, and the visual version of the transcription

  1. Also note that the transcriptions for each side of the conversation are also included as attachments.

AI Driven Contact Analysis

Enabling the AI Driven Contact Analysis function allows you to process the transcribed text using Amazon Comprehend. Amazon Comprehend is a natural language processing service that uses machine learning to find insights and relationships in text.

Once enabled during the AWS Serverless Application Repository for Salesforce, contact analysis is activated on a call by call basis by adding a specific contact attribute. This attribute is used during Contact Trace Record processing to trigger the Amazon Comprehend task.

There are five functions available with the integration. Each function is triggered by a code. You can use one code in your contact attribute, or string multiple together as a comma separated list. The available codes and their functions are:

  • snt = Sentiment Analysis

  • kw = Keyphrase Extraction

  • dl = Language Detection

  • ne = Custom Entities

  • syn = Syntax Analysis

Enabling AI Driven Contact Analysis

  1. Login to your Amazon Connect instance as an Administrator

  2. From the left navigation, choose Routing then select Contact flows

  1. Open the contact flow that you want to use to enable AI Driven Contact Analytics. This contact flow must have Amazon Connect's native recording turned on, and transcription enabled as these are both prerequisites for the analytics function.

  2. In you contact flow, before you transfer to queue, add a new Set contact attributes block

  3. Configure the block to set a contact attribute as follows:

    a. Destination key: postcallTranscribeComprehendAnalysis

    b. Value: snt,dl,kw,syn

    - In this example, we are performing sentiment analysis,
    language detection, and keyphrase
    extraction
  1. Save the Set contact attributes block. Make sure it is appropriately connected to your contact flow, and Publish the flow.

  2. Wait approximately 2 minutes to give the contact flow time to publish.

  3. Place a call, connect to your agent, speak for a few moments from both the agent and the customer side to generate a good transcript, then end the call. Make sure the agent exits after call work

  4. The contact analysis runs after the transcription, which will take at least as long as the call did. Wait an appropriate amount of time for the analysis to be available.

Accessing the AI Driven Contact Analysis

  1. Log in into your Salesforce org and go to the Service Console

  2. Expand the navigation menu by selecting the down arrow and choose AC Contact Channel Analytics. If you have not previously added AC Contact Channel Analytics to the navigation menu, complete the steps found in Adding Contact Channel Analytics to the Service Console.

  1. Change the list view from Recently Viewed to All
  1. Once the view refreshes, you should see your record(s)
  1. Select a record to view the details.

  2. Once the record opens, note the Keywords, Sentiment, and Dominant Language