Amazon Connect Participant Service

2023/08/31 - Amazon Connect Participant Service - 1 new1 updated api methods

Changes  Amazon Connect Participant Service adds the ability to get a view resource using a view token, which is provided in a participant message, with the release of the DescribeView API.

DescribeView (new) Link ¶

Retrieves the view for the specified view token.

See also: AWS API Documentation

Request Syntax

client.describe_view(
    ViewToken='string',
    ConnectionToken='string'
)
type ViewToken:

string

param ViewToken:

[REQUIRED]

An encrypted token originating from the interactive message of a ShowView block operation. Represents the desired view.

type ConnectionToken:

string

param ConnectionToken:

[REQUIRED]

The connection token.

rtype:

dict

returns:

Response Syntax

{
    'View': {
        'Id': 'string',
        'Arn': 'string',
        'Name': 'string',
        'Version': 123,
        'Content': {
            'InputSchema': 'string',
            'Template': 'string',
            'Actions': [
                'string',
            ]
        }
    }
}

Response Structure

  • (dict) --

    • View (dict) --

      A view resource object. Contains metadata and content necessary to render the view.

      • Id (string) --

        The identifier of the view.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the view.

      • Name (string) --

        The name of the view.

      • Version (integer) --

        The current version of the view.

      • Content (dict) --

        View content containing all content necessary to render a view except for runtime input data.

        • InputSchema (string) --

          The schema representing the input data that the view template must be supplied to render.

        • Template (string) --

          The view template representing the structure of the view.

        • Actions (list) --

          A list of actions possible from the view

          • (string) --

GetTranscript (updated) Link ¶
Changes (response)
{'Transcript': {'ParticipantRole': {'CUSTOM_BOT'}}}

Retrieves a transcript of the session, including details about any attachments. For information about accessing past chat contact transcripts for a persistent chat, see Enable persistent chat.

The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

See also: AWS API Documentation

Request Syntax

client.get_transcript(
    ContactId='string',
    MaxResults=123,
    NextToken='string',
    ScanDirection='FORWARD'|'BACKWARD',
    SortOrder='DESCENDING'|'ASCENDING',
    StartPosition={
        'Id': 'string',
        'AbsoluteTime': 'string',
        'MostRecent': 123
    },
    ConnectionToken='string'
)
type ContactId:

string

param ContactId:

The contactId from the current contact chain for which transcript is needed.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return in the page. Default: 10.

type NextToken:

string

param NextToken:

The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.

type ScanDirection:

string

param ScanDirection:

The direction from StartPosition from which to retrieve message. Default: BACKWARD when no StartPosition is provided, FORWARD with StartPosition.

type SortOrder:

string

param SortOrder:

The sort order for the records. Default: DESCENDING.

type StartPosition:

dict

param StartPosition:

A filtering option for where to start.

  • Id (string) --

    The ID of the message or event where to start.

  • AbsoluteTime (string) --

    The time in ISO format where to start.

    It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

  • MostRecent (integer) --

    The start position of the most recent message where you want to start.

type ConnectionToken:

string

param ConnectionToken:

[REQUIRED]

The authentication token associated with the participant's connection.

rtype:

dict

returns:

Response Syntax

{
    'InitialContactId': 'string',
    'Transcript': [
        {
            'AbsoluteTime': 'string',
            'Content': 'string',
            'ContentType': 'string',
            'Id': 'string',
            'Type': 'TYPING'|'PARTICIPANT_JOINED'|'PARTICIPANT_LEFT'|'CHAT_ENDED'|'TRANSFER_SUCCEEDED'|'TRANSFER_FAILED'|'MESSAGE'|'EVENT'|'ATTACHMENT'|'CONNECTION_ACK'|'MESSAGE_DELIVERED'|'MESSAGE_READ',
            'ParticipantId': 'string',
            'DisplayName': 'string',
            'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT',
            'Attachments': [
                {
                    'ContentType': 'string',
                    'AttachmentId': 'string',
                    'AttachmentName': 'string',
                    'Status': 'APPROVED'|'REJECTED'|'IN_PROGRESS'
                },
            ],
            'MessageMetadata': {
                'MessageId': 'string',
                'Receipts': [
                    {
                        'DeliveredTimestamp': 'string',
                        'ReadTimestamp': 'string',
                        'RecipientParticipantId': 'string'
                    },
                ]
            },
            'RelatedContactId': 'string',
            'ContactId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InitialContactId (string) --

      The initial contact ID for the contact.

    • Transcript (list) --

      The list of messages in the session.

      • (dict) --

        An item - message or event - that has been sent.

        • AbsoluteTime (string) --

          The time when the message or event was sent.

          It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

        • Content (string) --

          The content of the message or event.

        • ContentType (string) --

          The type of content of the item.

        • Id (string) --

          The ID of the item.

        • Type (string) --

          Type of the item: message or event.

        • ParticipantId (string) --

          The ID of the sender in the session.

        • DisplayName (string) --

          The chat display name of the sender.

        • ParticipantRole (string) --

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

        • Attachments (list) --

          Provides information about the attachments.

          • (dict) --

            The case-insensitive input to indicate standard MIME type that describes the format of the file that will be uploaded.

            • ContentType (string) --

              Describes the MIME file type of the attachment. For a list of supported file types, see Feature specifications in the Amazon Connect Administrator Guide.

            • AttachmentId (string) --

              A unique identifier for the attachment.

            • AttachmentName (string) --

              A case-sensitive name of the attachment being uploaded.

            • Status (string) --

              Status of the attachment.

        • MessageMetadata (dict) --

          The metadata related to the message. Currently this supports only information related to message receipts.

          • MessageId (string) --

            The identifier of the message that contains the metadata information.

          • Receipts (list) --

            The list of receipt information for a message for different recipients.

            • (dict) --

              The receipt for the message delivered to the recipient.

              • DeliveredTimestamp (string) --

                The time when the message was delivered to the recipient.

              • ReadTimestamp (string) --

                The time when the message was read by the recipient.

              • RecipientParticipantId (string) --

                The identifier of the recipient of the message.

        • RelatedContactId (string) --

          The contactId on which the transcript item was originally sent. This field is only populated for persistent chats when the transcript item is from the past chat session. For more information, see Enable persistent chat.

        • ContactId (string) --

          The contactId on which the transcript item was originally sent. This field is populated only when the transcript item is from the current chat session.

    • NextToken (string) --

      The pagination token. Use the value returned previously in the next subsequent request to retrieve the next set of results.