2023/07/20 - Amazon Connect Cases - 4 updated api methods
Changes This release adds the ability to assign a case to a queue or user.
{'fields': {'value': {'emptyValue': {}}}}
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.
Note
The following fields are required when creating a case:
<ul> <li> <p> <code>customer_id</code> - You must provide the full customer profile ARN in this format: <code>arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID</code> </p> </li> <li> <p> <code>title</code> </p> </li> </ul> </note>
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' } }, ], templateId='string' )
string
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.
string
[REQUIRED]
The unique identifier of the Cases domain.
list
[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.
string
[REQUIRED]
A unique identifier of a template.
dict
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.
{'fields': {'value': {'emptyValue': {}}}}
Returns information about a specific case if it exists.
See also: AWS API Documentation
Request Syntax
client.get_case( caseId='string', domainId='string', fields=[ { 'id': 'string' }, ], nextToken='string' )
string
[REQUIRED]
A unique identifier of the case.
string
[REQUIRED]
The unique identifier of the Cases domain.
list
[REQUIRED]
A list of unique field identifiers.
(dict) --
Object for unique identifier of a field.
id (string) -- [REQUIRED]
Unique identifier of a field.
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
{ 'fields': [ { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {}, 'stringValue': 'string' } }, ], 'nextToken': 'string', 'tags': { 'string': 'string' }, 'templateId': 'string' }
Response Structure
(dict) --
fields (list) --
A list of detailed field information.
(dict) --
Object for case field values.
id (string) --
Unique identifier of a field.
value (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 number value type. Only one value can be provided.
emptyValue (dict) --
An empty value.
stringValue (string) --
String value type.
nextToken (string) --
The token for the next set of results. This is null if there are no more results to return.
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) --
templateId (string) --
A unique identifier of a template.
{'filter': {'field': {'contains': {'value': {'emptyValue': {}}}, 'equalTo': {'value': {'emptyValue': {}}}, 'greaterThan': {'value': {'emptyValue': {}}}, 'greaterThanOrEqualTo': {'value': {'emptyValue': {}}}, 'lessThan': {'value': {'emptyValue': {}}}, 'lessThanOrEqualTo': {'value': {'emptyValue': {}}}}, 'orAll': [{'andAll': [()], 'field': {'contains': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string'}}, 'equalTo': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string'}}, 'greaterThan': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string'}}, 'greaterThanOrEqualTo': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string'}}, 'lessThan': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string'}}, 'lessThanOrEqualTo': {'id': 'string', 'value': {'booleanValue': 'boolean', 'doubleValue': 'double', 'emptyValue': {}, 'stringValue': 'string'}}}, 'not': (), 'orAll': ()}]}}Response
{'cases': {'fields': {'value': {'emptyValue': {}}}}}
Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents.
Note
For customer_id you must provide the full customer profile ARN in this format: arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID .
See also: AWS API Documentation
Request Syntax
client.search_cases( domainId='string', fields=[ { 'id': 'string' }, ], filter={ 'andAll': [ {'... recursive ...'}, ], 'field': { 'contains': { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {} , 'stringValue': 'string' } }, 'equalTo': { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {} , 'stringValue': 'string' } }, 'greaterThan': { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {} , 'stringValue': 'string' } }, 'greaterThanOrEqualTo': { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {} , 'stringValue': 'string' } }, 'lessThan': { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {} , 'stringValue': 'string' } }, 'lessThanOrEqualTo': { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {} , 'stringValue': 'string' } } }, 'not': {'... recursive ...'}, 'orAll': [ {'... recursive ...'}, ] }, maxResults=123, nextToken='string', searchTerm='string', sorts=[ { 'fieldId': 'string', 'sortOrder': 'Asc'|'Desc' }, ] )
string
[REQUIRED]
The unique identifier of the Cases domain.
list
The list of field identifiers to be returned as part of the response.
(dict) --
Object for unique identifier of a field.
id (string) -- [REQUIRED]
Unique identifier of a field.
dict
A list of filter objects.
andAll (list) --
Provides "and all" filtering.
(dict) --
A filter for cases. Only one value can be provided.
field (dict) --
A list of fields to filter on.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
not (dict) --
A filter for cases. Only one value can be provided.
orAll (list) --
Provides "or all" filtering.
(dict) --
A filter for cases. Only one value can be provided.
integer
The maximum number of cases to return. The current maximum supported value is 25. This is also the default value when no other value is provided.
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.
string
A word or phrase used to perform a quick search.
list
A list of sorts where each sort specifies a field and their sort order to be applied to the results.
(dict) --
A structured set of sort terms.
fieldId (string) -- [REQUIRED]
Unique identifier of a field.
sortOrder (string) -- [REQUIRED]
A structured set of sort terms
dict
Response Syntax
{ 'cases': [ { 'caseId': 'string', 'fields': [ { 'id': 'string', 'value': { 'booleanValue': True|False, 'doubleValue': 123.0, 'emptyValue': {}, 'stringValue': 'string' } }, ], 'tags': { 'string': 'string' }, 'templateId': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
cases (list) --
A list of case documents where each case contains the properties CaseId and Fields where each field is a complex union structure.
(dict) --
A list of items that represent cases.
caseId (string) --
A unique identifier of the case.
fields (list) --
List of case field values.
(dict) --
Object for case field values.
id (string) --
Unique identifier of a field.
value (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 number value type. Only one value can be provided.
emptyValue (dict) --
An empty value.
stringValue (string) --
String value type.
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) --
templateId (string) --
A unique identifier of a template.
nextToken (string) --
The token for the next set of results. This is null if there are no more results to return.
{'fields': {'value': {'emptyValue': {}}}}
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' } }, ] )
string
[REQUIRED]
A unique identifier of the case.
string
[REQUIRED]
The unique identifier of the Cases domain.
list
[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.
dict
Response Syntax
{}
Response Structure
(dict) --