2025/09/30 - Amazon Connect Cases - 3 updated api methods
Changes This release adds support for two new related item types: ConnectCase for linking Amazon Connect cases and Custom for user-defined related items with configurable fields.
{'content': {'connectCase': {'caseId': 'string'}, 'custom': {'fields': [{'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}]}}, 'type': {'ConnectCase', 'Custom'}}
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( domainId='string', caseId='string', type='Contact'|'Comment'|'File'|'Sla'|'ConnectCase'|'Custom', content={ 'contact': { 'contactArn': 'string' }, 'comment': { 'body': 'string', 'contentType': 'Text/Plain' }, 'file': { 'fileArn': 'string' }, 'sla': { 'slaInputConfiguration': { 'name': 'string', 'type': 'CaseField', 'fieldId': 'string', 'targetFieldValues': [ { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' }, ], 'targetSlaMinutes': 123 } }, 'connectCase': { 'caseId': 'string' }, 'custom': { 'fields': [ { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, ] } }, performedBy={ 'userArn': 'string', 'customEntity': 'string' } )
string
[REQUIRED]
The unique identifier of the Cases domain.
string
[REQUIRED]
A unique identifier of the case.
string
[REQUIRED]
The type of a related item.
dict
[REQUIRED]
The content of a related item to be created.
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.
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.
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.
name (string) -- [REQUIRED]
Name of an SLA.
type (string) -- [REQUIRED]
Type of SLA.
fieldId (string) --
Unique identifier of a field.
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.
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.
targetSlaMinutes (integer) -- [REQUIRED]
Target duration in minutes within which an SLA should be completed.
connectCase (dict) --
Input content for a related Connect case
caseId (string) -- [REQUIRED]
The unique identifier of the case to be related
custom (dict) --
Input content for a custom related item
fields (list) -- [REQUIRED]
List of field values for the custom related item
(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.
dict
Represents the creator of the related item.
userArn (string) --
Represents the Amazon Connect ARN of the user.
customEntity (string) --
Any provided entity.
dict
Response Syntax
{ 'relatedItemId': 'string', 'relatedItemArn': 'string' }
Response Structure
(dict) --
relatedItemId (string) --
The unique identifier of the related item.
relatedItemArn (string) --
The Amazon Resource Name (ARN) of the related item.
{'auditEvents': {'relatedItemType': {'ConnectCase', 'Custom'}}}
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' )
string
[REQUIRED]
A unique identifier of the case.
string
[REQUIRED]
The unique identifier of the Cases domain.
integer
The maximum number of audit events to return. When no value is provided, 25 is the default.
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.
dict
Response Syntax
{ 'nextToken': 'string', 'auditEvents': [ { 'eventId': 'string', 'type': 'Case.Created'|'Case.Updated'|'RelatedItem.Created', '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 an audit history event.
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.
{'filters': {'connectCase': {'caseId': 'string'}, 'custom': {'fields': {'andAll': [()], 'field': {'contains': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}, 'equalTo': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}, 'greaterThan': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}, 'greaterThanOrEqualTo': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}, 'lessThan': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}, 'lessThanOrEqualTo': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}}, 'not': (), 'orAll': [()]}}}}Response
{'relatedItems': {'content': {'connectCase': {'caseId': 'string'}, 'custom': {'fields': [{'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string', 'userArnValue': 'string'}}]}}, 'type': {'ConnectCase', 'Custom'}}}
Searches for related items that are associated with a case.
See also: AWS API Documentation
Request Syntax
client.search_related_items( domainId='string', caseId='string', maxResults=123, nextToken='string', filters=[ { 'contact': { 'channel': [ 'string', ], 'contactArn': 'string' }, 'comment': {} , 'file': { 'fileArn': 'string' }, 'sla': { 'name': 'string', 'status': 'Active'|'Overdue'|'Met'|'NotMet' }, 'connectCase': { 'caseId': 'string' }, 'custom': { 'fields': { 'field': { 'equalTo': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'contains': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'greaterThan': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'greaterThanOrEqualTo': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'lessThan': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'lessThanOrEqualTo': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } } }, 'not': {'... recursive ...'}, 'andAll': [ {'... recursive ...'}, ], 'orAll': [ {'... recursive ...'}, ] } } }, ] )
string
[REQUIRED]
The unique identifier of the Cases domain.
string
[REQUIRED]
A unique identifier of the case.
integer
The maximum number of results to return per page.
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.
list
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.
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.
comment (dict) --
A filter for related items of type Comment.
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.
connectCase (dict) --
Filter for related items of type Connect case
caseId (string) --
The unique identifier of the case to filter by
custom (dict) --
Filter for related items of type Custom
fields (dict) --
Filter conditions for custom fields
field (dict) --
A filter for fields. Only one value can be provided.
equalTo (dict) --
Object containing field identifier and value information.
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.
contains (dict) --
Object containing field identifier and value information.
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.
greaterThan (dict) --
Object containing field identifier and value information.
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.
greaterThanOrEqualTo (dict) --
Object containing field identifier and value information.
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.
lessThan (dict) --
Object containing field identifier and value information.
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.
lessThanOrEqualTo (dict) --
Object containing field identifier and value information.
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.
not (dict) --
Excludes items matching the filter
andAll (list) --
Matches items that satisfy all of the specified filter conditions
(dict) --
A filter for fields in related items of type Custom
orAll (list) --
Matches items that satisfy any of the specified filter conditions
(dict) --
A filter for fields in related items of type Custom
dict
Response Syntax
{ 'nextToken': 'string', 'relatedItems': [ { 'relatedItemId': 'string', 'type': 'Contact'|'Comment'|'File'|'Sla'|'ConnectCase'|'Custom', 'associationTime': datetime(2015, 1, 1), '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' } }, ] } }, 'tags': { 'string': 'string' }, 'performedBy': { 'userArn': 'string', 'customEntity': '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.
relatedItems (list) --
A list of items related to a case.
(dict) --
A list of items that represent RelatedItems.
relatedItemId (string) --
Unique identifier of a related item.
type (string) --
Type of a related item.
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.
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) --
Content for a related Connect case
caseId (string) --
The unique identifier of the related case
custom (dict) --
Content for a custom 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.
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) --
performedBy (dict) --
Represents the creator of the related item.
userArn (string) --
Represents the Amazon Connect ARN of the user.
customEntity (string) --
Any provided entity.