0

Amazon Connect documentation describes models for Contact Events and Contact Records, and then lists an example (in the article for Contact Events) with a schema consistent with neither of them:

{
    "version": "0",
    "id": "abcabcab-abca-abca-abca-abcabcabcabc",
    "detail-type": "Amazon Connect Contact Event",
    "source": "aws.connect",
    "account": "111122223333",
    "time": "2021-08-04T17:43:48Z",
    "region": "us-west-1",
    "resources": [
        "arn:aws:...", 
        "contactArn", 
        "instanceArn"
    ],
    "detail": {
        "eventType": "DISCONNECTED",
        "contactId": "11111111-1111-1111-1111-111111111111",
        "initialContactId": "11111111-2222-3333-4444-555555555555",
        "previousContactId": "11111111-2222-3333-4444-555555555555",
        "channel": "Voice",
        "instanceArn": "arn:aws::connect:us-west-2:123456789012:instance/12345678-1234-1234-1234-123456789012",
        "initiationMethod": "OUTBOUND",
        "initiationTimestamp":"2021-08-04T17:17:53.000Z",
        "connectedToSystemTimestamp":"2021-08-04T17:17:55.000Z",
        "disconnectTimestamp":"2021-08-04T17:18:37.000Z",
        "queueInfo": {
            "queueArn": "arn",
            "queueType": "type",
            "enqueueTimestamp": "2021-08-04T17:29:04.000Z"
        },
        "AgentInfo": {
            "AgentArn": "arn",
            "connectedToAgentTimestamp":"2021-08-04T17:29:09.000Z"
        },
        "CustomerVoiceActivity": {
           "greetingStartTimestamp":"2021-08-04T17:29:20.000Z",
           "greetingEndTimestamp":"2021-08-04T17:29:22.000Z",
        }
    }
}

Confusing the matter even more is that in the Data Streaming portion of the Amazon Connect configuration, the contact-related events are called Contact Trace Records, but in other documentation, it sounds as if the use of "Contact Trace Records" is being phased out.

Can someone clarify precisely what our expectations should be for the JSON schema of events emitted as "Contact Events" from Amazon Connect?

Kode Charlie
  • 1,297
  • 16
  • 32

1 Answers1

0

There are two distinct ways to get events from Connect.

The first is via a Kinesis Stream or Firehose. There are two streams that can be setup, one for contact trace records (CTRs) and the other for agent events. These streams are never going away or being phased out.

The definition for a CTR is found here under the ContactTraceRecord heading. And the definition for an agent event is here.

The second method is via Contact Events which can be captured in EventBridge.

The definition for these events is here. This definition describes the data in the details section of the event you included.

ledge
  • 359
  • 1
  • 6
  • That brings some clarity to the picture, but it also underscores just how confounding this arrangement is: IE, (i) contact-related event models vary by distribution channel and (ii) the default configuration for data streaming through Amazon Connect doesn't reference EventBridge (it's almost like that's an afterthought). – Kode Charlie Aug 28 '23 at 22:52
  • Yep, there are signs of multiple different groups being involved in Connect's development that haven't been taking to each other – ledge Aug 29 '23 at 07:21
  • 2
    It is worth mentioning that contact events sent via EventBridge are real-time (in-call), but CTRs are sent over Kinesis only after the call (contact) ends. – gamliela Aug 29 '23 at 09:18