Newer Version Available
Query AWS Lambda Functions to Analyze a Voice Call
A single voice call journey invokes several different AWS Lambda functions and Amazon Connect flows. Perform a query through Amazon CloudWatch Log Insights to find all voice call events across all Lambda functions for a specific voice call.
This feature is installed with Service Cloud Voice contact center version 13.0 or later. See the Update Your Contact Center Knowledge Article for more details. No additional configuration is necessary.
- Log in to Salesforce and find the name of the vendor call key (for example, 12faf34a-f1d5-6b07-89fc-6e3bce61d65f) and the date range of the voice call record you want to analyze.
- Log in to Amazon AWS.
- Open the CloudWatch console.
- In the navigation pane, select Logs > Logs Insights.
- In the Select log group(s) picklist, select the log groups that
include the name of the contact center you want to query. The following example is a
list of log groups for a contact center named ContactCenter1. The list includes AWS
Lambda and Amazon Connect Flow log
groups.
1/aws/connect/contactcenter100db0000006.nep 2/aws/lambda/ContactCenter1-AuthKeysSSMultiFunction 3/aws/lambda/ContactCenter1-CTRDataSyncFunction 4/aws/lambda/ContactCenter1-HandleContactEventsFunction 5/aws/lambda/ContactCenter1-InvokeSalesforceRestApiFunction 6/aws/lambda/ContactCenter1-InvokeTelephonyIntegrationApiFunction 7/aws/lambda/ContactCenter1-kvsConsumerTrigger 8/aws/lambda/ContactCenter1-kvsTransriber 9/aws/lambda/ContactCenter1-RealtimeAlert 10/aws/lambda/ContactCenter1-RententionPeriodFunction 11/aws/lambda/ContactCenter1-VoiceMailAudioProcessingFunction - In the query editor, type the following query, where VENDOR_CALL_KEY is the unique ID of the voice call
(VoiceCall) record within the telephony system. The query is case
sensitive.
1fields @timestamp, @message, @logStream, @log 2| filter ContactId = 'VENDOR_CALL_KEY' OR context.contactId = 'VENDOR_CALL_KEY' | sort @timestamp ascFor example,
1fields @timestamp, @message, @logStream, @log 2| filter ContactId = '12faf34a-f1d5-6b07-89fc-6e3bce61d65f' OR context.contactId = '12faf34a-f1d5-6b07-89fc-6e3bce61d65f' 3| sort @timestamp ascTo learn more about the query syntax, see the Amazon CloudWatch Logs Insights Query Syntax documentation.
- Specify the date range of the voice call record you want to query, click Custom, select the Absolute tab, and then select and apply the date range of the voice call.
- Click Run query. Amazon CloudWatch finds all logs across all
Amazon Lambda functions and Amazon Connect flows that are related to the specified voice
call record and displays the results in the Logs tab.
The first event is created when the voice call record begins. Expand each event to view its details, including the name of the Amazon Connect flow or AWS Lambda output, and any error messages.