Kode Charlie
Kode Charlie

Reputation: 1489

What is the specification for Contact Events emitted by Amazon Connect?

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?

Upvotes: 0

Views: 400

Answers (1)

ledge
ledge

Reputation: 474

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.

Upvotes: 1

Related Questions