Skip to content

aws.connect_contact_lens.list_realtime_contact_analysis_segments

Example SQL Queries

SELECT * FROM
aws.connect_contact_lens.list_realtime_contact_analysis_segments
WHERE
"instance_id" = 'VALUE'
AND "contact_id" = 'VALUE';

Description

Provides a list of analysis segments for a real-time analysis session.

Table Definition

Column NameColumn Data Type
contact_id Required Input Column

The identifier of the contact.

VARCHAR
instance_id Required Input Column

The identifier of the Amazon Connect instance.

VARCHAR
max_results Input Column

The maximum number of results to return per page.

BIGINT
next_token Input Column

If there are additional results, this is the token for the next set of results. If response includes nextToken there are two possible scenarios:

  • There are more segments so another call is required to get them.

  • There are no more segments at this time, but more may be available later (real-time analysis is in progress) so the client should call the operation again to get new segments.

If response does not include nextToken, the analysis is completed (successfully or failed) and there are no more segments to retrieve.

VARCHAR
_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.

segments

An analyzed transcript or category.

STRUCT(
"transcript" STRUCT(
"id" VARCHAR,
"participant_id" VARCHAR,
"participant_role" VARCHAR,
"content" VARCHAR,
"begin_offset_millis" BIGINT,
"end_offset_millis" BIGINT,
"sentiment" VARCHAR,
"issues_detected" STRUCT(
"character_offsets" STRUCT(
"begin_offset_char" BIGINT,
"end_offset_char" BIGINT
)
)[]
),
"categories" STRUCT(
"matched_categories" VARCHAR[],
"matched_details" MAP(VARCHAR, STRUCT(
"points_of_interest" STRUCT(
"begin_offset_millis" BIGINT,
"end_offset_millis" BIGINT
)[]
))
),
"post_contact_summary" STRUCT(
"content" VARCHAR,
"status" VARCHAR,
"failure_code" VARCHAR
)
)[]
Show child fields
segments[]
Show child fields
segments[].categories

The matched category rules.

Show child fields
segments[].categories.matched_categories[]
segments[].categories.matched_details

The category rule that was matched and when it occurred in the transcript.

segments[].post_contact_summary

Information about the post-contact summary.

Show child fields
segments[].post_contact_summary.content

The content of the summary.

segments[].post_contact_summary.failure_code

If the summary failed to be generated, one of the following failure codes occurs:

  • QUOTA_EXCEEDED: The number of concurrent analytics jobs reached your service quota.

  • INSUFFICIENT_CONVERSATION_CONTENT: The conversation needs to have at least one turn from both the participants in order to generate the summary.

  • FAILED_SAFETY_GUIDELINES: The generated summary cannot be provided because it failed to meet system safety guidelines.

  • INVALID_ANALYSIS_CONFIGURATION: This code occurs when, for example, you're using a language that isn't supported by generative AI-powered post-contact summaries.

  • INTERNAL_ERROR: Internal system error.

segments[].post_contact_summary.status

Whether the summary was successfully COMPLETED or FAILED to be generated.

segments[].transcript

The analyzed transcript.

Show child fields
segments[].transcript.begin_offset_millis

The beginning offset in the contact for this transcript.

segments[].transcript.content

The content of the transcript.

segments[].transcript.end_offset_millis

The end offset in the contact for this transcript.

segments[].transcript.id

The identifier of the transcript.

segments[].transcript.issues_detected[]
Show child fields
segments[].transcript.issues_detected[].character_offsets

The offset for when the issue was detected in the segment.

Show child fields
segments[].transcript.issues_detected[].character_offsets.begin_offset_char

The beginning of the issue.

segments[].transcript.issues_detected[].character_offsets.end_offset_char

The end of the issue.

segments[].transcript.participant_id

The identifier of the participant. Valid values are CUSTOMER or AGENT.

segments[].transcript.participant_role

The role of participant. For example, is it a customer, agent, or system.

segments[].transcript.sentiment

The sentiment detected for this piece of transcript.