Amazon Connect Cases

2026/03/23 - Amazon Connect Cases - 1 new 1 updated api methods

Changes  You can now use the UpdateRelatedItem API to update the content of comments and custom related items associated with a case.

UpdateRelatedItem (new) Link ¶

Updates the content of a related item associated with a case. The following related item types are supported:

  • Comment - Update the text content of an existing comment

  • Custom - Update the fields of a custom related item. You can add, modify, and remove fields from a custom related item. There's a quota for the number of fields allowed in a Custom type related item. See Amazon Connect Cases quotas.

Important things to know

  • When updating a Custom related item, all existing and new fields, and their associated values should be included in the request. Fields not included as part of this request will be removed.

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

  • System case fields cannot be used in a custom related item.

Endpoints: See Amazon Connect endpoints and quotas.

See also: AWS API Documentation

Request Syntax

client.update_related_item(
    domainId='string',
    caseId='string',
    relatedItemId='string',
    content={
        'comment': {
            'body': 'string',
            'contentType': 'Text/Plain'
        },
        'custom': {
            'fields': [
                {
                    'id': 'string',
                    'value': {
                        'stringValue': 'string',
                        'doubleValue': 123.0,
                        'booleanValue': True|False,
                        'emptyValue': {}
                        ,
                        'userArnValue': 'string'
                    }
                },
            ]
        }
    },
    performedBy={
        'userArn': 'string',
        'customEntity': 'string'
    }
)
type domainId:

string

param domainId:

[REQUIRED]

The unique identifier of the Cases domain.

type caseId:

string

param caseId:

[REQUIRED]

A unique identifier of the case.

type relatedItemId:

string

param relatedItemId:

[REQUIRED]

Unique identifier of a related item.

type content:

dict

param content:

[REQUIRED]

The content of a related item to be updated.

  • comment (dict) --

    Represents the updated content of a Comment related item.

    • body (string) -- [REQUIRED]

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

  • custom (dict) --

    Represents the updated content of a Custom related item.

    • fields (list) -- [REQUIRED]

      List of updated field values for the Custom related item. All existing and new fields, and their associated values should be included. Fields not included as part of this request will be removed.

      • (dict) --

        Object for case field values.

        • id (string) -- [REQUIRED]

          Unique identifier of a field.

        • value (dict) -- [REQUIRED]

          Union of potential field value types.

          • stringValue (string) --

            String value type.

          • doubleValue (float) --

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

          • booleanValue (boolean) --

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

          • emptyValue (dict) --

            An empty value.

          • userArnValue (string) --

            Represents the user that performed the audit.

type performedBy:

dict

param performedBy:

Represents the user who performed the update of the related item.

  • userArn (string) --

    Represents the Amazon Connect ARN of the user.

  • customEntity (string) --

    Any provided entity.

rtype:

dict

returns:

Response Syntax

{
    'relatedItemId': 'string',
    'relatedItemArn': 'string',
    'type': 'Contact'|'Comment'|'File'|'Sla'|'ConnectCase'|'Custom',
    'content': {
        'contact': {
            'contactArn': 'string',
            'channel': 'string',
            'connectedToSystemTime': datetime(2015, 1, 1)
        },
        'comment': {
            'body': 'string',
            'contentType': 'Text/Plain'
        },
        'file': {
            'fileArn': 'string'
        },
        'sla': {
            'slaConfiguration': {
                'name': 'string',
                'type': 'CaseField',
                'status': 'Active'|'Overdue'|'Met'|'NotMet',
                'fieldId': 'string',
                'targetFieldValues': [
                    {
                        'stringValue': 'string',
                        'doubleValue': 123.0,
                        'booleanValue': True|False,
                        'emptyValue': {},
                        'userArnValue': 'string'
                    },
                ],
                'targetTime': datetime(2015, 1, 1),
                'completionTime': datetime(2015, 1, 1)
            }
        },
        'connectCase': {
            'caseId': 'string'
        },
        'custom': {
            'fields': [
                {
                    'id': 'string',
                    'value': {
                        'stringValue': 'string',
                        'doubleValue': 123.0,
                        'booleanValue': True|False,
                        'emptyValue': {},
                        'userArnValue': 'string'
                    }
                },
            ]
        }
    },
    'associationTime': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    },
    'lastUpdatedUser': {
        'userArn': 'string',
        'customEntity': 'string'
    },
    'createdBy': {
        'userArn': 'string',
        'customEntity': 'string'
    }
}

Response Structure

  • (dict) --

    • relatedItemId (string) --

      The unique identifier of the updated related item.

    • relatedItemArn (string) --

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

    • type (string) --

      Type of the updated related item.

    • content (dict) --

      Represents the content of the updated related item.

      • contact (dict) --

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

        • contactArn (string) --

          A unique identifier of a contact in Amazon Connect.

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

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

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

          • name (string) --

            Name of an SLA.

          • type (string) --

            Type of SLA.

          • status (string) --

            Status of an SLA.

          • fieldId (string) --

            Unique identifier of a field.

          • targetFieldValues (list) --

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

            • (dict) --

              Object to store union of Field values.

              • stringValue (string) --

                String value type.

              • doubleValue (float) --

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

              • booleanValue (boolean) --

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

              • emptyValue (dict) --

                An empty value.

              • userArnValue (string) --

                Represents the user that performed the audit.

          • targetTime (datetime) --

            Target time by which an SLA should be completed.

          • completionTime (datetime) --

            Time at which an SLA was completed.

      • connectCase (dict) --

        Represents the Amazon Connect case to be created as a related item.

        • caseId (string) --

          A unique identifier of the case.

      • custom (dict) --

        Represents the content of a Custom type related item.

        • fields (list) --

          List of field values for the Custom related item.

          • (dict) --

            Object for case field values.

            • id (string) --

              Unique identifier of a field.

            • value (dict) --

              Union of potential field value types.

              • stringValue (string) --

                String value type.

              • doubleValue (float) --

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

              • booleanValue (boolean) --

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

              • emptyValue (dict) --

                An empty value.

              • userArnValue (string) --

                Represents the user that performed the audit.

    • associationTime (datetime) --

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

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

    • lastUpdatedUser (dict) --

      Represents the last user that updated the related item.

      • userArn (string) --

        Represents the Amazon Connect ARN of the user.

      • customEntity (string) --

        Any provided entity.

    • createdBy (dict) --

      Represents the creator of the related item.

      • userArn (string) --

        Represents the Amazon Connect ARN of the user.

      • customEntity (string) --

        Any provided entity.

GetCaseAuditEvents (updated) Link ¶
Changes (response)
{'auditEvents': {'type': {'RelatedItem.Deleted', 'RelatedItem.Updated'}}}

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. When no value is provided, 25 is the default.

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

Response Structure

  • (dict) --

    • nextToken (string) --

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

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

        • type (string) --

          The type of audit history event.

          Valid Values: Case.Created | Case.Updated | RelatedItem.Created | RelatedItem.Updated | RelatedItem.Deleted

        • relatedItemType (string) --

          The Type of the related item.

        • performedTime (datetime) --

          Time at which an Audit History event took place.

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

            • oldValue (dict) --

              Union of potential field value types.

              • stringValue (string) --

                Can be either null, or have a String 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.

              • booleanValue (boolean) --

                Can be either null, or have a Boolean 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.

              • userArnValue (string) --

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

            • newValue (dict) --

              Union of potential field value types.

              • stringValue (string) --

                Can be either null, or have a String 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.

              • booleanValue (boolean) --

                Can be either null, or have a Boolean 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.

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

          • user (dict) --

            Represents the entity that performed the action.

            • userArn (string) --

              Represents the Amazon Connect ARN of the user.

            • customEntity (string) --

              Any provided entity.

          • iamPrincipalArn (string) --

            Unique identifier of an IAM role.