- Newest
- Most votes
- Most comments
Question 1: This is an architectural specification.
The official AWS documentation, Search for in-progress contacts in Connect Customer - Amazon Connect Customer explicitly describes this behavior.
For other voice contacts, you can search them only after they are connected to an agent, or have been disconnected. Queued in-progress voice contacts (with the exception of callbacks) are not shown on the Contact search page.
In other words, by design, voice contacts other than callbacks are excluded from the search index while waiting in the queue. This is an intentional design constraint of the indexing infrastructure underlying the SearchContacts API; it is not a matter of latency where they will "eventually be indexed." They will not appear in search results at all until they are connected to an agent or disconnected.
Question 2: The Kinesis CTR stream is actually not suitable.
Contact Trace Record (CTR) streams via Kinesis are generated and delivered only after a contact has concluded (disconnected). In other words, monitoring the CTR stream does not allow you to detect—in real time—contacts that are currently waiting in the queue and have not yet disconnected. Fundamentally, CTRs are "post-completion records," and they simply inherit the same limitations as the SearchContacts API, albeit in a different form. What you should actually use is "Connect Contact Events" via EventBridge. Amazon Connect natively publishes contact lifecycle events to EventBridge; the available event types are as follows:
- INITIATED
- CONNECTED_TO_SYSTEM
- QUEUED ← This directly matches your requirements
- CONNECTED_TO_AGENT
- DISCONNECTED
The behavior you're experiencing with the SearchContacts API is related to how Amazon Connect indexes and surfaces contact records. The SearchContacts API primarily works with completed contact records, which explains why you're not seeing live, queued contacts until after they disconnect.
For real-time visibility into active contacts—especially those waiting in unstaffed queues—the recommended approach is to use Amazon Connect contact events via Amazon EventBridge rather than relying on search APIs.
Here's why this is the appropriate solution:
Contact Events Architecture: Contact events provide a real-time stream of events as they occur in your contact center. When a contact enters a queue, a QUEUED event is emitted that includes the ContactId, queue information, and enqueue timestamp. These events fire immediately as state changes happen, regardless of agent staffing levels.
Key Events for Your Use Case:
- QUEUED event: Fires when a contact enters a queue, providing the ContactId and QueueInfo with enqueue timestamp
- CONNECTED_TO_AGENT event: Fires when an agent picks up (which won't happen in your unstaffed scenario)
- DISCONNECTED event: Fires when the contact leaves the system
By subscribing to these events through EventBridge, you can:
- Capture ContactIds as soon as contacts enter unstaffed queues
- Track how long they've been waiting
- Trigger automated cleanup or escalation workflows
- Maintain your own real-time index of stuck contacts
Implementation Pattern: Create an EventBridge rule that filters for QUEUED events on your target queues. Route these events to a Lambda function or SQS queue that maintains a tracking table (like DynamoDB). When DISCONNECTED events arrive, remove those ContactIds from your tracking system. This gives you a real-time view of all active queued contacts, regardless of staffing.
The SearchContacts API and GetCurrentUserData API are designed for different purposes—historical analysis and agent-centric views respectively—which is why they don't reliably surface unassigned, actively queued contacts. For production-scale real-time monitoring of contacts in queue states, the EventBridge contact events pattern is the architecturally correct approach.
Sources
Connect Customer contact events - Amazon Connect Customer
