SDK for PHP 3.x

Client: Aws\ConnectContactLens\ConnectContactLensClient
Service ID: connect-contact-lens
Version: 2020-08-21

This page describes the parameters and results for the operations of the Amazon Connect Contact Lens (2020-08-21), and shows how to use the Aws\ConnectContactLens\ConnectContactLensClient object to call the described operations. This documentation is specific to the 2020-08-21 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

ListRealtimeContactAnalysisSegments ( array $params = [] )
Provides a list of analysis segments for a real-time analysis session.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListRealtimeContactAnalysisSegments

Operations

ListRealtimeContactAnalysisSegments

$result = $client->listRealtimeContactAnalysisSegments([/* ... */]);
$promise = $client->listRealtimeContactAnalysisSegmentsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listRealtimeContactAnalysisSegments([
    'ContactId' => '<string>', // REQUIRED
    'InstanceId' => '<string>', // REQUIRED
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
ContactId
Required: Yes
Type: string

The identifier of the contact.

InstanceId
Required: Yes
Type: string

The identifier of the Amazon Connect instance.

MaxResults
Type: int

The maximum number of results to return per page.

NextToken
Type: string

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Result Syntax

[
    'NextToken' => '<string>',
    'Segments' => [
        [
            'Categories' => [
                'MatchedCategories' => ['<string>', ...],
                'MatchedDetails' => [
                    '<CategoryName>' => [
                        'PointsOfInterest' => [
                            [
                                'BeginOffsetMillis' => <integer>,
                                'EndOffsetMillis' => <integer>,
                            ],
                            // ...
                        ],
                    ],
                    // ...
                ],
            ],
            'PostContactSummary' => [
                'Content' => '<string>',
                'FailureCode' => 'QUOTA_EXCEEDED|INSUFFICIENT_CONVERSATION_CONTENT|FAILED_SAFETY_GUIDELINES|INVALID_ANALYSIS_CONFIGURATION|INTERNAL_ERROR',
                'Status' => 'FAILED|COMPLETED',
            ],
            'Transcript' => [
                'BeginOffsetMillis' => <integer>,
                'Content' => '<string>',
                'EndOffsetMillis' => <integer>,
                'Id' => '<string>',
                'IssuesDetected' => [
                    [
                        'CharacterOffsets' => [
                            'BeginOffsetChar' => <integer>,
                            'EndOffsetChar' => <integer>,
                        ],
                    ],
                    // ...
                ],
                'ParticipantId' => '<string>',
                'ParticipantRole' => '<string>',
                'Sentiment' => 'POSITIVE|NEUTRAL|NEGATIVE',
            ],
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: string

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.

Segments
Required: Yes
Type: Array of RealtimeContactAnalysisSegment structures

An analyzed transcript or category.

Errors

InvalidRequestException:

The request is not valid.

AccessDeniedException:

You do not have sufficient access to perform this action.

ResourceNotFoundException:

The specified resource was not found.

InternalServiceException:

Request processing failed due to an error or failure with the service.

ThrottlingException:

The throttling limit has been exceeded.

Shapes

AccessDeniedException

Description

You do not have sufficient access to perform this action.

Members
Message
Required: Yes
Type: string

Categories

Description

Provides the category rules that are used to automatically categorize contacts based on uttered keywords and phrases.

Members
MatchedCategories
Required: Yes
Type: Array of strings

The category rules that have been matched in the analyzed segment.

MatchedDetails
Required: Yes
Type: Associative array of custom strings keys (CategoryName) to CategoryDetails structures

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

CategoryDetails

Description

Provides information about the category rule that was matched.

Members
PointsOfInterest
Required: Yes
Type: Array of PointOfInterest structures

The section of audio where the category rule was detected.

CharacterOffsets

Description

For characters that were detected as issues, where they occur in the transcript.

Members
BeginOffsetChar
Required: Yes
Type: int

The beginning of the issue.

EndOffsetChar
Required: Yes
Type: int

The end of the issue.

InternalServiceException

Description

Request processing failed due to an error or failure with the service.

Members
Message
Type: string

InvalidRequestException

Description

The request is not valid.

Members
Message
Type: string

IssueDetected

Description

Potential issues that are detected based on an artificial intelligence analysis of each turn in the conversation.

Members
CharacterOffsets
Required: Yes
Type: CharacterOffsets structure

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

PointOfInterest

Description

The section of the contact audio where that category rule was detected.

Members
BeginOffsetMillis
Required: Yes
Type: int

The beginning offset in milliseconds where the category rule was detected.

EndOffsetMillis
Required: Yes
Type: int

The ending offset in milliseconds where the category rule was detected.

PostContactSummary

Description

Information about the post-contact summary.

Members
Content
Type: string

The content of the summary.

FailureCode
Type: string

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.

Status
Required: Yes
Type: string

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

RealtimeContactAnalysisSegment

Description

An analyzed segment for a real-time analysis session.

Members
Categories
Type: Categories structure

The matched category rules.

PostContactSummary
Type: PostContactSummary structure

Information about the post-contact summary.

Transcript
Type: Transcript structure

The analyzed transcript.

ResourceNotFoundException

Description

The specified resource was not found.

Members
Message
Type: string

ThrottlingException

Description

The throttling limit has been exceeded.

Members
Message
Required: Yes
Type: string

Transcript

Description

A list of messages in the session.

Members
BeginOffsetMillis
Required: Yes
Type: int

The beginning offset in the contact for this transcript.

Content
Required: Yes
Type: string

The content of the transcript.

EndOffsetMillis
Required: Yes
Type: int

The end offset in the contact for this transcript.

Id
Required: Yes
Type: string

The identifier of the transcript.

IssuesDetected
Type: Array of IssueDetected structures

List of positions where issues were detected on the transcript.

ParticipantId
Required: Yes
Type: string

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

ParticipantRole
Required: Yes
Type: string

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

Sentiment
Required: Yes
Type: string

The sentiment detected for this piece of transcript.