Amazon Connect Cases

2023/11/08 - Amazon Connect Cases - 2 updated api methods

Changes  This release adds the ability to add/view comment authors through CreateRelatedItem and SearchRelatedItems API. For more information see https://docs.aws.amazon.com/cases/latest/APIReference/Welcome.html

CreateRelatedItem (updated) Link ¶
Changes (request)
{'performedBy': {'userArn': 'string'}}

Creates a related item (comments, tasks, and contacts) and associates it with a case.

Note

  • A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a contactArn ). All Related Items have their own internal identifier, the relatedItemArn . Examples of related items include comments and contacts .

  • If you provide a value for performedBy.userArn you must also have DescribeUser permission on the ARN of the user that you provide.

</note>

See also: AWS API Documentation

Request Syntax

client.create_related_item(
    caseId='string',
    content={
        'comment': {
            'body': 'string',
            'contentType': 'Text/Plain'
        },
        'contact': {
            'contactArn': 'string'
        }
    },
    domainId='string',
    performedBy={
        'userArn': 'string'
    },
    type='Contact'|'Comment'
)
type caseId

string

param caseId

[REQUIRED]

A unique identifier of the case.

type content

dict

param content

[REQUIRED]

The content of a related item to be created.

  • comment (dict) --

    Represents the content of a comment to be returned to agents.

    • body (string) -- [REQUIRED]

      Text in the body of a Comment on a case.

    • contentType (string) -- [REQUIRED]

      Type of the text in the box of a Comment on a case.

  • contact (dict) --

    Object representing a contact in Amazon Connect as an API request field.

    • contactArn (string) -- [REQUIRED]

      A unique identifier of a contact in Amazon Connect.

type domainId

string

param domainId

[REQUIRED]

The unique identifier of the Cases domain.

type performedBy

dict

param performedBy

Represents the creator of the related item.

  • userArn (string) --

    Represents the Amazon Connect ARN of the user.

type type

string

param type

[REQUIRED]

The type of a related item.

rtype

dict

returns

Response Syntax

{
    'relatedItemArn': 'string',
    'relatedItemId': 'string'
}

Response Structure

  • (dict) --

    • relatedItemArn (string) --

      The Amazon Resource Name (ARN) of the related item.

    • relatedItemId (string) --

      The unique identifier of the related item.

SearchRelatedItems (updated) Link ¶
Changes (response)
{'relatedItems': {'performedBy': {'userArn': 'string'}}}

Searches for related items that are associated with a case.

Note

If no filters are provided, this returns all related items associated with a case.

See also: AWS API Documentation

Request Syntax

client.search_related_items(
    caseId='string',
    domainId='string',
    filters=[
        {
            'comment': {}
            ,
            'contact': {
                'channel': [
                    'string',
                ],
                'contactArn': 'string'
            }
        },
    ],
    maxResults=123,
    nextToken='string'
)
type caseId

string

param caseId

[REQUIRED]

A unique identifier of the case.

type domainId

string

param domainId

[REQUIRED]

The unique identifier of the Cases domain.

type filters

list

param filters

The list of types of related items and their parameters to use for filtering.

  • (dict) --

    The list of types of related items and their parameters to use for filtering.

    • comment (dict) --

      A filter for related items of type Comment .

    • contact (dict) --

      A filter for related items of type Contact .

      • channel (list) --

        A list of channels to filter on for related items of type Contact .

        • (string) --

      • contactArn (string) --

        A unique identifier of a contact in Amazon Connect.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

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.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'relatedItems': [
        {
            'associationTime': datetime(2015, 1, 1),
            'content': {
                'comment': {
                    'body': 'string',
                    'contentType': 'Text/Plain'
                },
                'contact': {
                    'channel': 'string',
                    'connectedToSystemTime': datetime(2015, 1, 1),
                    'contactArn': 'string'
                }
            },
            'performedBy': {
                'userArn': 'string'
            },
            'relatedItemId': 'string',
            'tags': {
                'string': 'string'
            },
            'type': 'Contact'|'Comment'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The token for the next set of results. This is null if there are no more results to return.

    • relatedItems (list) --

      A list of items related to a case.

      • (dict) --

        A list of items that represent RelatedItems.

        • associationTime (datetime) --

          Time at which a related item was associated with a case.

        • content (dict) --

          Represents the content of a particular type of related item.

          • comment (dict) --

            Represents the content of a comment to be returned to agents.

            • body (string) --

              Text in the body of a Comment on a case.

            • contentType (string) --

              Type of the text in the box of a Comment on a case.

          • contact (dict) --

            Represents the content of a contact to be returned to agents.

            • channel (string) --

              A list of channels to filter on for related items of type Contact .

            • connectedToSystemTime (datetime) --

              The difference between the InitiationTimestamp and the DisconnectTimestamp of the contact.

            • contactArn (string) --

              A unique identifier of a contact in Amazon Connect.

        • performedBy (dict) --

          Represents the creator of the related item.

          • userArn (string) --

            Represents the Amazon Connect ARN of the user.

        • relatedItemId (string) --

          Unique identifier of a related item.

        • tags (dict) --

          A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

        • type (string) --

          Type of a related item.