Amazon Connect Cases

2025/04/29 - Amazon Connect Cases - 5 updated api methods

Changes  Introduces CustomEntity as part of the UserUnion data type. This field is used to indicate the entity who is performing the API action.

CreateCase (updated) Link ¶
Changes (request)
{'performedBy': {'customEntity': 'string'}}

Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types.

The following fields are required when creating a case:

  • customer_id - You must provide the full customer profile ARN in this format: arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID

  • title

See also: AWS API Documentation

Request Syntax

client.create_case(
    clientToken='string',
    domainId='string',
    fields=[
        {
            'id': 'string',
            'value': {
                'booleanValue': True|False,
                'doubleValue': 123.0,
                'emptyValue': {}
                ,
                'stringValue': 'string',
                'userArnValue': 'string'
            }
        },
    ],
    performedBy={
        'customEntity': 'string',
        'userArn': 'string'
    },
    templateId='string'
)
type clientToken:

string

param clientToken:

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

This field is autopopulated if not provided.

type domainId:

string

param domainId:

[REQUIRED]

The unique identifier of the Cases domain.

type fields:

list

param fields:

[REQUIRED]

An array of objects with field ID (matching ListFields/DescribeField) and value union data.

  • (dict) --

    Object for case field values.

    • id (string) -- [REQUIRED]

      Unique identifier of a field.

    • value (dict) -- [REQUIRED]

      Union of potential field value types.

      • booleanValue (boolean) --

        Can be either null, or have a Boolean value type. Only one value can be provided.

      • doubleValue (float) --

        Can be either null, or have a Double number value type. Only one value can be provided.

      • emptyValue (dict) --

        An empty value.

      • stringValue (string) --

        String value type.

      • userArnValue (string) --

        Represents the user that performed the audit.

type performedBy:

dict

param performedBy:

Represents the entity that performed the action.

  • customEntity (string) --

    Any provided entity.

  • userArn (string) --

    Represents the Amazon Connect ARN of the user.

type templateId:

string

param templateId:

[REQUIRED]

A unique identifier of a template.

rtype:

dict

returns:

Response Syntax

{
    'caseArn': 'string',
    'caseId': 'string'
}

Response Structure

  • (dict) --

    • caseArn (string) --

      The Amazon Resource Name (ARN) of the case.

    • caseId (string) --

      A unique identifier of the case.

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

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

See also: AWS API Documentation

Request Syntax

client.create_related_item(
    caseId='string',
    content={
        'comment': {
            'body': 'string',
            'contentType': 'Text/Plain'
        },
        'contact': {
            'contactArn': 'string'
        },
        'file': {
            'fileArn': 'string'
        },
        'sla': {
            'slaInputConfiguration': {
                'fieldId': 'string',
                'name': 'string',
                'targetFieldValues': [
                    {
                        'booleanValue': True|False,
                        'doubleValue': 123.0,
                        'emptyValue': {}
                        ,
                        'stringValue': 'string',
                        'userArnValue': 'string'
                    },
                ],
                'targetSlaMinutes': 123,
                'type': 'CaseField'
            }
        }
    },
    domainId='string',
    performedBy={
        'customEntity': 'string',
        'userArn': 'string'
    },
    type='Contact'|'Comment'|'File'|'Sla'
)
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.

  • file (dict) --

    A file of related items.

    • fileArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of a File in Amazon Connect.

  • sla (dict) --

    Represents the content of an SLA to be created.

    • slaInputConfiguration (dict) --

      Represents an input SLA configuration.

      • fieldId (string) --

        Unique identifier of a field.

      • name (string) -- [REQUIRED]

        Name of an SLA.

      • targetFieldValues (list) --

        Represents a list of target field values for the fieldId specified in SlaInputConfiguration. The SLA is considered met if any one of these target field values matches the actual field value.

        • (dict) --

          Object to store union of Field values.

          • booleanValue (boolean) --

            Can be either null, or have a Boolean value type. Only one value can be provided.

          • doubleValue (float) --

            Can be either null, or have a Double number value type. Only one value can be provided.

          • emptyValue (dict) --

            An empty value.

          • stringValue (string) --

            String value type.

          • userArnValue (string) --

            Represents the user that performed the audit.

      • targetSlaMinutes (integer) -- [REQUIRED]

        Target duration in minutes within which an SLA should be completed.

      • type (string) -- [REQUIRED]

        Type of SLA.

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.

  • customEntity (string) --

    Any provided entity.

  • 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.

GetCaseAuditEvents (updated) Link ¶
Changes (response)
{'auditEvents': {'performedBy': {'user': {'customEntity': 'string'}}}}

Returns the audit history about a specific case if it exists.

See also: AWS API Documentation

Request Syntax

client.get_case_audit_events(
    caseId='string',
    domainId='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 maxResults:

integer

param maxResults:

The maximum number of audit events to return. The current maximum supported value is 25. This is also the default when no other value is provided.

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

{
    'auditEvents': [
        {
            'eventId': 'string',
            'fields': [
                {
                    'eventFieldId': 'string',
                    'newValue': {
                        'booleanValue': True|False,
                        'doubleValue': 123.0,
                        'emptyValue': {},
                        'stringValue': 'string',
                        'userArnValue': 'string'
                    },
                    'oldValue': {
                        'booleanValue': True|False,
                        'doubleValue': 123.0,
                        'emptyValue': {},
                        'stringValue': 'string',
                        'userArnValue': 'string'
                    }
                },
            ],
            'performedBy': {
                'iamPrincipalArn': 'string',
                'user': {
                    'customEntity': 'string',
                    'userArn': 'string'
                }
            },
            'performedTime': datetime(2015, 1, 1),
            'relatedItemType': 'Contact'|'Comment'|'File'|'Sla',
            'type': 'Case.Created'|'Case.Updated'|'RelatedItem.Created'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • auditEvents (list) --

      A list of case audits where each represents a particular edit of the case.

      • (dict) --

        Represents the content of a particular audit event.

        • eventId (string) --

          Unique identifier of a case audit history event.

        • fields (list) --

          A list of Case Audit History event fields.

          • (dict) --

            Fields for audit event.

            • eventFieldId (string) --

              Unique identifier of field in an Audit History entry.

            • newValue (dict) --

              Union of potential field value types.

              • booleanValue (boolean) --

                Can be either null, or have a Boolean value type. Only one value can be provided.

              • doubleValue (float) --

                Can be either null, or have a Double value type. Only one value can be provided.

              • emptyValue (dict) --

                An empty value. You cannot set EmptyFieldValue on a field that is required on a case template.

                This structure will never have any data members. It signifies an empty value on a case field.

              • stringValue (string) --

                Can be either null, or have a String value type. Only one value can be provided.

              • userArnValue (string) --

                Can be either null, or have a String value type formatted as an ARN. Only one value can be provided.

            • oldValue (dict) --

              Union of potential field value types.

              • booleanValue (boolean) --

                Can be either null, or have a Boolean value type. Only one value can be provided.

              • doubleValue (float) --

                Can be either null, or have a Double value type. Only one value can be provided.

              • emptyValue (dict) --

                An empty value. You cannot set EmptyFieldValue on a field that is required on a case template.

                This structure will never have any data members. It signifies an empty value on a case field.

              • stringValue (string) --

                Can be either null, or have a String value type. Only one value can be provided.

              • userArnValue (string) --

                Can be either null, or have a String value type formatted as an ARN. Only one value can be provided.

        • performedBy (dict) --

          Information of the user which performed the audit.

          • iamPrincipalArn (string) --

            Unique identifier of an IAM role.

          • user (dict) --

            Represents the entity that performed the action.

            • customEntity (string) --

              Any provided entity.

            • userArn (string) --

              Represents the Amazon Connect ARN of the user.

        • performedTime (datetime) --

          Time at which an Audit History event took place.

        • relatedItemType (string) --

          The Type of the related item.

        • type (string) --

          The Type of an audit history event.

    • nextToken (string) --

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

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

Searches for related items that are 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'
            },
            'file': {
                'fileArn': 'string'
            },
            'sla': {
                'name': 'string',
                'status': 'Active'|'Overdue'|'Met'|'NotMet'
            }
        },
    ],
    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.

    • file (dict) --

      A filter for related items of this type of File.

      • fileArn (string) --

        The Amazon Resource Name (ARN) of the file.

    • sla (dict) --

      Filter for related items of type SLA.

      • name (string) --

        Name of an SLA.

      • status (string) --

        Status of an SLA.

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'
                },
                'file': {
                    'fileArn': 'string'
                },
                'sla': {
                    'slaConfiguration': {
                        'completionTime': datetime(2015, 1, 1),
                        'fieldId': 'string',
                        'name': 'string',
                        'status': 'Active'|'Overdue'|'Met'|'NotMet',
                        'targetFieldValues': [
                            {
                                'booleanValue': True|False,
                                'doubleValue': 123.0,
                                'emptyValue': {},
                                'stringValue': 'string',
                                'userArnValue': 'string'
                            },
                        ],
                        'targetTime': datetime(2015, 1, 1),
                        'type': 'CaseField'
                    }
                }
            },
            'performedBy': {
                'customEntity': 'string',
                'userArn': 'string'
            },
            'relatedItemId': 'string',
            'tags': {
                'string': 'string'
            },
            'type': 'Contact'|'Comment'|'File'|'Sla'
        },
    ]
}

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.

          • file (dict) --

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

            • fileArn (string) --

              The Amazon Resource Name (ARN) of a File in Amazon Connect.

          • sla (dict) --

            Represents the content of an SLA to be returned to agents.

            • slaConfiguration (dict) --

              Represents an SLA configuration.

              • completionTime (datetime) --

                Time at which an SLA was completed.

              • fieldId (string) --

                Unique identifier of a field.

              • name (string) --

                Name of an SLA.

              • status (string) --

                Status of an SLA.

              • targetFieldValues (list) --

                Represents a list of target field values for the fieldId specified in SlaConfiguration.

                • (dict) --

                  Object to store union of Field values.

                  • booleanValue (boolean) --

                    Can be either null, or have a Boolean value type. Only one value can be provided.

                  • doubleValue (float) --

                    Can be either null, or have a Double number value type. Only one value can be provided.

                  • emptyValue (dict) --

                    An empty value.

                  • stringValue (string) --

                    String value type.

                  • userArnValue (string) --

                    Represents the user that performed the audit.

              • targetTime (datetime) --

                Target time by which an SLA should be completed.

              • type (string) --

                Type of SLA.

        • performedBy (dict) --

          Represents the creator of the related item.

          • customEntity (string) --

            Any provided entity.

          • 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.

UpdateCase (updated) Link ¶
Changes (request)
{'performedBy': {'customEntity': 'string'}}

Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the CreateCase input .

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

See also: AWS API Documentation

Request Syntax

client.update_case(
    caseId='string',
    domainId='string',
    fields=[
        {
            'id': 'string',
            'value': {
                'booleanValue': True|False,
                'doubleValue': 123.0,
                'emptyValue': {}
                ,
                'stringValue': 'string',
                'userArnValue': 'string'
            }
        },
    ],
    performedBy={
        'customEntity': 'string',
        'userArn': '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 fields:

list

param fields:

[REQUIRED]

An array of objects with fieldId (matching ListFields/DescribeField) and value union data, structured identical to CreateCase.

  • (dict) --

    Object for case field values.

    • id (string) -- [REQUIRED]

      Unique identifier of a field.

    • value (dict) -- [REQUIRED]

      Union of potential field value types.

      • booleanValue (boolean) --

        Can be either null, or have a Boolean value type. Only one value can be provided.

      • doubleValue (float) --

        Can be either null, or have a Double number value type. Only one value can be provided.

      • emptyValue (dict) --

        An empty value.

      • stringValue (string) --

        String value type.

      • userArnValue (string) --

        Represents the user that performed the audit.

type performedBy:

dict

param performedBy:

Represents the entity that performed the action.

  • customEntity (string) --

    Any provided entity.

  • userArn (string) --

    Represents the Amazon Connect ARN of the user.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --