Amazon Connect Cases

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.

CreateCase (updated) Link ¶
Changes (request)
{'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'
)
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.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

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.

GetCase (updated) Link ¶
Changes (response)
{'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'
)
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]

A list of unique field identifiers.

  • (dict) --

    Object for unique identifier of a field.

    • id (string) -- [REQUIRED]

      Unique identifier of a field.

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

{
    '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.

          Note

          This is a Tagged Union structure. Only one of the following top level keys will be set: booleanValue, doubleValue, emptyValue, stringValue. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

          'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
          • 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.

SearchCases (updated) Link ¶
Changes (request, response)
Request
{'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'
        },
    ]
)
type domainId

string

param domainId

[REQUIRED]

The unique identifier of the Cases domain.

type fields

list

param fields

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.

type filter

dict

param filter

A list of filter objects.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not, orAll.

  • andAll (list) --

    Provides "and all" filtering.

    • (dict) --

      A filter for cases. Only one value can be provided.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not, orAll.

  • field (dict) --

    A list of fields to filter on.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: contains, equalTo, greaterThan, greaterThanOrEqualTo, lessThan, lessThanOrEqualTo.

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

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

        Note

        This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not, orAll.

  • orAll (list) --

    Provides "or all" filtering.

    • (dict) --

      A filter for cases. Only one value can be provided.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: andAll, field, not, orAll.

type maxResults

integer

param maxResults

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.

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.

type searchTerm

string

param searchTerm

A word or phrase used to perform a quick search.

type sorts

list

param sorts

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

rtype

dict

returns

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.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: booleanValue, doubleValue, emptyValue, stringValue. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
              • 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.

UpdateCase (updated) Link ¶
Changes (request)
{'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'
            }
        },
    ]
)
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.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: booleanValue, doubleValue, emptyValue, stringValue.

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

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --