Contact Events
Near real-time contact lifecycle events published on EventBridge. Initiated, queued, connected, disconnected.
EventBridge
AWS service that captures and processes Amazon Connect contact events using rules. Routes events to targets like Lambda, CloudWatch, or Firehose.
EventBridge Rule
Matches specific event patterns to route events to targets for processing. One rule can send events to multiple targets simultaneously.
Contact Event Lifecycle
Initiated, connected to system, queued, connected to agent, disconnected. Published in near real-time but sequence not guaranteed.
eventType Property
Indicates which stage of contact lifecycle the event represents. CONNECTED_TO_AGENT, QUEUED, INITIATED, etc.
initiationMethod Property
Shows how contact originated. Inbound, Outbound, Transfer, Callback, API, Queue_Transfer, or Disconnect.
Contact Event Detail Property
Contact-specific data like timestamps, channel, initiation method, agent info, and event type. Structure varies by event type.
Contact Event Use Cases
Analytics dashboards, workforce management integrations, abandoned call recovery mechanisms. Any solution needing near real-time contact data.
Agent Events
Near real-time agent activity data published to Kinesis Data Streams. Requires cloud admin to create and configure the data stream.
Agent Event Types
LOGIN, LOGOUT, STATE_CHANGE, HEART_BEAT. All published in JSON format to Kinesis.
HEART_BEAT Event
Generated every 120 seconds when no other events occur. Used for timestamp updates and validating agent connection is still active.
STATE_CHANGE Event
Published when agent status changes between routable and non-routable states. Contains CurrentAgentSnapshot and PreviousAgentSnapshot objects.
Available State
Only routable agent state where agents receive contacts. All other states like Lunch or Break are non-routable.
Contacts Property (Agent Events)
Array with info about contacts agent is currently handling. Only populated when agent is actively handling contacts.
Kinesis Data Stream Encoding
Events are base64 encoded to reduce size. Must decode before processing in Lambda or other consumers.
Agent Event Use Cases
Agent activity dashboards, workforce management integrations, supervisor alerts. Avoids repetitive API calls for agent status.
Contact Lens APIs
ListRealtimeContactAnalysisSegments for voice, ListRealtimeContactAnalysisSegmentsV2 for chat. Near real-time conversational analytics.
Contact Lens Event Types
STARTED, SEGMENTS, COMPLETED, FAILED. Event type indicates analysis progress.
SEGMENTS Event
Utterances, transcripts, matched categories, and sentiment analysis. Published for voice and chat interactions.
Utterance Object
Speaker ID and role, the spoken text, unique identifiers, and time offsets. Part of SEGMENTS event.
Transcript Object
Participant info, text transcript, sentiment analysis, time offsets, and IssuesDetected array. Includes sentiment scores.
Categories Object
Matched Contact Lens categories and points of interest in transcript where they were detected. Only included if categories matched.
Contact Lens Use Cases
Real-time transcript display in agent app, sentiment-based routing, automatic translations, sentiment tracking widgets.
Contact Records
Info about each completed interaction: metadata, agent metrics, performance data, and optionally recordings. Published when contact ends.