Skip to content

aws.connect.search_contacts

Example SQL Queries

SELECT * FROM
aws.connect.search_contacts
WHERE
"instance_id" = 'VALUE'
AND "time_range" = 'VALUE';

Description

Searches contacts in an Amazon Connect instance.

Table Definition

Column NameColumn Data Type
instance_id Required Input Column

The identifier of Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

VARCHAR
time_range Required Input Column

Time range that you want to search results.

STRUCT(
"type" VARCHAR,
"start_time" TIMESTAMP_S,
"end_time" TIMESTAMP_S
)
Show child fields
time_range.end_time

The end time of the time range.

time_range.start_time

The start time of the time range.

time_range.type

The type of timestamp to search.

search_criteria Input Column

The search criteria to be used to return contacts.

STRUCT(
"agent_ids" VARCHAR[],
"agent_hierarchy_groups" STRUCT(
"l1_ids" VARCHAR[],
"l2_ids" VARCHAR[],
"l3_ids" VARCHAR[],
"l4_ids" VARCHAR[],
"l5_ids" VARCHAR[]
),
"channels" VARCHAR[],
"contact_analysis" STRUCT(
"transcript" STRUCT(
"criteria" STRUCT(
"participant_role" VARCHAR,
"search_text" VARCHAR[],
"match_type" VARCHAR
)[],
"match_type" VARCHAR
)
),
"initiation_methods" VARCHAR[],
"queue_ids" VARCHAR[],
"searchable_contact_attributes" STRUCT(
"criteria" STRUCT(
"key" VARCHAR,
"values" VARCHAR[]
)[],
"match_type" VARCHAR
)
)
Show child fields
search_criteria.agent_hierarchy_groups

The agent hierarchy groups of the agent at the time of handling the contact.

Show child fields
search_criteria.agent_hierarchy_groups.l1_ids[]
search_criteria.agent_hierarchy_groups.l2_ids[]
search_criteria.agent_hierarchy_groups.l3_ids[]
search_criteria.agent_hierarchy_groups.l4_ids[]
search_criteria.agent_hierarchy_groups.l5_ids[]
search_criteria.agent_ids[]
search_criteria.channels[]
search_criteria.contact_analysis

Search criteria based on analysis outputs from Amazon Connect Contact Lens.

Show child fields
search_criteria.contact_analysis.transcript

Search criteria based on transcript analyzed by Amazon Connect Contact Lens.

Show child fields
search_criteria.contact_analysis.transcript.criteria[]
Show child fields
search_criteria.contact_analysis.transcript.criteria[].match_type

The match type combining search criteria using multiple search texts in a transcript criteria.

search_criteria.contact_analysis.transcript.criteria[].participant_role

The participant role in a transcript

search_criteria.contact_analysis.transcript.criteria[].search_text[]
search_criteria.contact_analysis.transcript.match_type

The match type combining search criteria using multiple transcript criteria.

search_criteria.initiation_methods[]
search_criteria.queue_ids[]
search_criteria.searchable_contact_attributes

The search criteria based on user-defined contact attributes that have been configured for contact search. For more information, see Search by custom contact attributes in the Amazon Connect Administrator Guide.

To use SearchableContactAttributes in a search request, the GetContactAttributes action is required to perform an API request. For more information, see https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnect.html#amazonconnect-actions-as-permissionsActions defined by Amazon Connect.

Show child fields
search_criteria.searchable_contact_attributes.criteria[]
Show child fields
search_criteria.searchable_contact_attributes.criteria[].key

The key containing a searchable user-defined contact attribute.

search_criteria.searchable_contact_attributes.criteria[].values[]
search_criteria.searchable_contact_attributes.match_type

The match type combining search criteria using multiple searchable contact attributes.

sort Input Column

Specifies a field to sort by and a sort order.

STRUCT(
"field_name" VARCHAR,
"order" VARCHAR
)
Show child fields
sort.field_name

The name of the field on which to sort.

sort.order

An ascending or descending sort.

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
contacts

Information about the contacts.

STRUCT(
"arn" VARCHAR,
"id" VARCHAR,
"initial_contact_id" VARCHAR,
"previous_contact_id" VARCHAR,
"initiation_method" VARCHAR,
"channel" VARCHAR,
"queue_info" STRUCT(
"id" VARCHAR,
"enqueue_timestamp" TIMESTAMP_S
),
"agent_info" STRUCT(
"id" VARCHAR,
"connected_to_agent_timestamp" TIMESTAMP_S
),
"initiation_timestamp" TIMESTAMP_S,
"disconnect_timestamp" TIMESTAMP_S,
"scheduled_timestamp" TIMESTAMP_S
)[]
Show child fields
contacts[]
Show child fields
contacts[].agent_info

Information about the agent who accepted the contact.

Show child fields
contacts[].agent_info.connected_to_agent_timestamp

The timestamp when the contact was connected to the agent.

contacts[].agent_info.id

The identifier of the agent who accepted the contact.

contacts[].arn

The Amazon Resource Name (ARN) of the contact.

contacts[].channel

How the contact reached your contact center.

contacts[].disconnect_timestamp

The timestamp when the customer endpoint disconnected from Amazon Connect.

contacts[].id

The identifier of the contact summary.

contacts[].initial_contact_id

If this contact is related to other contacts, this is the ID of the initial contact.

contacts[].initiation_method

Indicates how the contact was initiated.

contacts[].initiation_timestamp

The date and time this contact was initiated, in UTC time. For INBOUND, this is when the contact arrived. For OUTBOUND, this is when the agent began dialing. For CALLBACK, this is when the callback contact was created. For TRANSFER and QUEUE_TRANSFER, this is when the transfer was initiated. For API, this is when the request arrived. For EXTERNAL_OUTBOUND, this is when the agent started dialing the external participant. For MONITOR, this is when the supervisor started listening to a contact.

contacts[].previous_contact_id

If this contact is not the first contact, this is the ID of the previous contact.

contacts[].queue_info

If this contact was queued, this contains information about the queue.

Show child fields
contacts[].queue_info.enqueue_timestamp

The timestamp when the contact was added to the queue.

contacts[].queue_info.id

The unique identifier for the queue.

contacts[].scheduled_timestamp

The timestamp, in Unix epoch time format, at which to start running the inbound flow.

total_count

The total number of contacts which matched your search query.

BIGINT