Newer Version Available

This content describes an older version of this product. View Latest

CTRDataSyncFunction Lambda Function

This Lambda function performs updates to a specific VoiceCall object using data from the Contact Trace Record (CTR) generated on Amazon. You don’t need to call this function manually.

Configuration: This function is available to Service Cloud Voice customers who are using an Amazon Connect instance and connecting to a Kinesis stream. The configuration is automatically performed when you create a contact center in Voice.

Description: This function performs two actions:

  1. Synchronizes data between a CTR from Amazon and a VoiceCall record by taking the data from CTR and updating the record.
  2. As part of the update, if the function finds that a VoiceCall record doesn’t exist, it creates one. This behavior is useful for missed or abandoned calls.

The following data is synced between the Amazon Connect CTR data model and a VoiceCall record:

Amazon Connect CTR Attribute VoiceCall Field Notes
InitiationTimestamp CallStartDateTime
DisconnectTimestamp CallEndDateTime
InitiationTimestamp and DisconnectTimestamp

CallDurationInSeconds

CallDurationInSeconds is inferred from InitiationTimestamp and DisconnectTimestamp.
Agent.ConnectedToAgentTimestamp CallAcceptDateTime
Agent.CustomerHoldDuration CustomerHoldDuration The DurationInSeconds field on the VoiceCallRecording record gets its value by adding Agent.CustomerHoldDuration and Agent.AgentInteractionDuration from CTR.
Agent.LongestHoldDuration LongestHoldDuration
Agent.NumberOfHolds NumberOfHolds
Agent.AgentInteractionDuration This value isn’t mapped to a VoiceCall field. However, the DurationInSeconds field on the VoiceCallRecording record gets its value by adding Agent.CustomerHoldDuration and Agent.AgentInteractionDuration from CTR.
Queue.EnqueueTimestamp CallQueuedDateTime
Queue.Name QueueName
InitiationMethod CallType (only when creating a new record) This value is used to infer values for ToPhoneNumber and FromPhoneNumber. Also, it’s used for the CallType field if creating a new VoiceCall record.
SystemEndpoint.Address ToPhoneNumber or FromPhoneNumber

If InitiationMethod is Inbound, the value is mapped to ToPhoneNumber (when creating a new record). If InitiationMethod is Outbound, this value is mapped to FromPhoneNumber.

CustomerEndpoint.Address ToPhoneNumber or FromPhoneNumber If InitiationMethod is Inbound, the value is mapped to FromPhoneNumber. If initiationMethod is Outbound, this value is mapped to ToPhoneNumber (when creating a new record).
Recording.Location CallRecordingId The VoiceCall record creates a reference to the VoiceCallRecording record using the CallRecordingId reference ID field.

If you’d like to sync more CTR fields into a VoiceCall record, see Customize Synced CTR Fields Using CTRDataSyncFunction.

Usage: The data synchronization automatically starts when a CTR is generated. You don’t need to call this function manually.