Amazon Connect Cases

2025/02/06 - Amazon Connect Cases - 5 new3 updated api methods

Changes  This release adds the ability to conditionally require fields on a template. Check public documentation for more information.

CreateCaseRule (new) Link ¶

Creates a new case rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

See also: AWS API Documentation

Request Syntax

client.create_case_rule(
    description='string',
    domainId='string',
    name='string',
    rule={
        'required': {
            'conditions': [
                {
                    'equalTo': {
                        'operandOne': {
                            'fieldId': 'string'
                        },
                        'operandTwo': {
                            'booleanValue': True|False,
                            'doubleValue': 123.0,
                            'emptyValue': {}
                            ,
                            'stringValue': 'string'
                        },
                        'result': True|False
                    },
                    'notEqualTo': {
                        'operandOne': {
                            'fieldId': 'string'
                        },
                        'operandTwo': {
                            'booleanValue': True|False,
                            'doubleValue': 123.0,
                            'emptyValue': {}
                            ,
                            'stringValue': 'string'
                        },
                        'result': True|False
                    }
                },
            ],
            'defaultValue': True|False
        }
    }
)
type description:

string

param description:

The description of a case rule.

type domainId:

string

param domainId:

[REQUIRED]

Unique identifier of a Cases domain.

type name:

string

param name:

[REQUIRED]

Name of the case rule.

type rule:

dict

param rule:

[REQUIRED]

Represents what rule type should take place, under what conditions.

  • required (dict) --

    Required rule type, used to indicate whether a field is required.

    • conditions (list) -- [REQUIRED]

      List of conditions for the required rule; the first condition to evaluate to true dictates the value of the rule.

      • (dict) --

        Boolean condition for a rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

        • equalTo (dict) --

          Tests that operandOne is equal to operandTwo.

          • operandOne (dict) -- [REQUIRED]

            Represents the left hand operand in the condition.

            • fieldId (string) --

              The field ID that this operand should take the value of.

          • operandTwo (dict) -- [REQUIRED]

            Represents the right hand operand in the condition.

            • booleanValue (boolean) --

              Boolean value type.

            • doubleValue (float) --

              Double value type.

            • emptyValue (dict) --

              Empty value type.

            • stringValue (string) --

              String value type.

          • result (boolean) -- [REQUIRED]

            The value of the outer rule if the condition evaluates to true.

        • notEqualTo (dict) --

          Tests that operandOne is not equal to operandTwo.

          • operandOne (dict) -- [REQUIRED]

            Represents the left hand operand in the condition.

            • fieldId (string) --

              The field ID that this operand should take the value of.

          • operandTwo (dict) -- [REQUIRED]

            Represents the right hand operand in the condition.

            • booleanValue (boolean) --

              Boolean value type.

            • doubleValue (float) --

              Double value type.

            • emptyValue (dict) --

              Empty value type.

            • stringValue (string) --

              String value type.

          • result (boolean) -- [REQUIRED]

            The value of the outer rule if the condition evaluates to true.

    • defaultValue (boolean) -- [REQUIRED]

      The value of the rule (that is, whether the field is required) should none of the conditions evaluate to true.

rtype:

dict

returns:

Response Syntax

{
    'caseRuleArn': 'string',
    'caseRuleId': 'string'
}

Response Structure

  • (dict) --

    • caseRuleArn (string) --

      The Amazon Resource Name (ARN) of a case rule.

    • caseRuleId (string) --

      Unique identifier of a case rule.

UpdateCaseRule (new) Link ¶

Updates a case rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

See also: AWS API Documentation

Request Syntax

client.update_case_rule(
    caseRuleId='string',
    description='string',
    domainId='string',
    name='string',
    rule={
        'required': {
            'conditions': [
                {
                    'equalTo': {
                        'operandOne': {
                            'fieldId': 'string'
                        },
                        'operandTwo': {
                            'booleanValue': True|False,
                            'doubleValue': 123.0,
                            'emptyValue': {}
                            ,
                            'stringValue': 'string'
                        },
                        'result': True|False
                    },
                    'notEqualTo': {
                        'operandOne': {
                            'fieldId': 'string'
                        },
                        'operandTwo': {
                            'booleanValue': True|False,
                            'doubleValue': 123.0,
                            'emptyValue': {}
                            ,
                            'stringValue': 'string'
                        },
                        'result': True|False
                    }
                },
            ],
            'defaultValue': True|False
        }
    }
)
type caseRuleId:

string

param caseRuleId:

[REQUIRED]

Unique identifier of a case rule.

type description:

string

param description:

Description of a case rule.

type domainId:

string

param domainId:

[REQUIRED]

Unique identifier of a Cases domain.

type name:

string

param name:

Name of the case rule.

type rule:

dict

param rule:

Represents what rule type should take place, under what conditions.

  • required (dict) --

    Required rule type, used to indicate whether a field is required.

    • conditions (list) -- [REQUIRED]

      List of conditions for the required rule; the first condition to evaluate to true dictates the value of the rule.

      • (dict) --

        Boolean condition for a rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

        • equalTo (dict) --

          Tests that operandOne is equal to operandTwo.

          • operandOne (dict) -- [REQUIRED]

            Represents the left hand operand in the condition.

            • fieldId (string) --

              The field ID that this operand should take the value of.

          • operandTwo (dict) -- [REQUIRED]

            Represents the right hand operand in the condition.

            • booleanValue (boolean) --

              Boolean value type.

            • doubleValue (float) --

              Double value type.

            • emptyValue (dict) --

              Empty value type.

            • stringValue (string) --

              String value type.

          • result (boolean) -- [REQUIRED]

            The value of the outer rule if the condition evaluates to true.

        • notEqualTo (dict) --

          Tests that operandOne is not equal to operandTwo.

          • operandOne (dict) -- [REQUIRED]

            Represents the left hand operand in the condition.

            • fieldId (string) --

              The field ID that this operand should take the value of.

          • operandTwo (dict) -- [REQUIRED]

            Represents the right hand operand in the condition.

            • booleanValue (boolean) --

              Boolean value type.

            • doubleValue (float) --

              Double value type.

            • emptyValue (dict) --

              Empty value type.

            • stringValue (string) --

              String value type.

          • result (boolean) -- [REQUIRED]

            The value of the outer rule if the condition evaluates to true.

    • defaultValue (boolean) -- [REQUIRED]

      The value of the rule (that is, whether the field is required) should none of the conditions evaluate to true.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

BatchGetCaseRule (new) Link ¶

Gets a batch of case rules. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

See also: AWS API Documentation

Request Syntax

client.batch_get_case_rule(
    caseRules=[
        {
            'id': 'string'
        },
    ],
    domainId='string'
)
type caseRules:

list

param caseRules:

[REQUIRED]

List of case rule identifiers.

  • (dict) --

    Object containing case rule identifier information.

    • id (string) -- [REQUIRED]

      Unique identifier of a case rule.

type domainId:

string

param domainId:

[REQUIRED]

Unique identifier of a Cases domain.

rtype:

dict

returns:

Response Syntax

{
    'caseRules': [
        {
            'caseRuleArn': 'string',
            'caseRuleId': 'string',
            'createdTime': datetime(2015, 1, 1),
            'deleted': True|False,
            'description': 'string',
            'lastModifiedTime': datetime(2015, 1, 1),
            'name': 'string',
            'rule': {
                'required': {
                    'conditions': [
                        {
                            'equalTo': {
                                'operandOne': {
                                    'fieldId': 'string'
                                },
                                'operandTwo': {
                                    'booleanValue': True|False,
                                    'doubleValue': 123.0,
                                    'emptyValue': {},
                                    'stringValue': 'string'
                                },
                                'result': True|False
                            },
                            'notEqualTo': {
                                'operandOne': {
                                    'fieldId': 'string'
                                },
                                'operandTwo': {
                                    'booleanValue': True|False,
                                    'doubleValue': 123.0,
                                    'emptyValue': {},
                                    'stringValue': 'string'
                                },
                                'result': True|False
                            }
                        },
                    ],
                    'defaultValue': True|False
                }
            },
            'tags': {
                'string': 'string'
            }
        },
    ],
    'errors': [
        {
            'errorCode': 'string',
            'id': 'string',
            'message': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • caseRules (list) --

      List of detailed case rule information.

      • (dict) --

        Detailed case rule information. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

        • caseRuleArn (string) --

          The Amazon Resource Name (ARN) of the case rule.

        • caseRuleId (string) --

          Unique identifier of a case rule.

        • createdTime (datetime) --

          Timestamp when the resource was created.

        • deleted (boolean) --

          Indicates whether the resource has been deleted.

        • description (string) --

          Description of a case rule.

        • lastModifiedTime (datetime) --

          Timestamp when the resource was created or last modified.

        • name (string) --

          Name of the case rule.

        • rule (dict) --

          Represents what rule type should take place, under what conditions.

          • required (dict) --

            Required rule type, used to indicate whether a field is required.

            • conditions (list) --

              List of conditions for the required rule; the first condition to evaluate to true dictates the value of the rule.

              • (dict) --

                Boolean condition for a rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

                • equalTo (dict) --

                  Tests that operandOne is equal to operandTwo.

                  • operandOne (dict) --

                    Represents the left hand operand in the condition.

                    • fieldId (string) --

                      The field ID that this operand should take the value of.

                  • operandTwo (dict) --

                    Represents the right hand operand in the condition.

                    • booleanValue (boolean) --

                      Boolean value type.

                    • doubleValue (float) --

                      Double value type.

                    • emptyValue (dict) --

                      Empty value type.

                    • stringValue (string) --

                      String value type.

                  • result (boolean) --

                    The value of the outer rule if the condition evaluates to true.

                • notEqualTo (dict) --

                  Tests that operandOne is not equal to operandTwo.

                  • operandOne (dict) --

                    Represents the left hand operand in the condition.

                    • fieldId (string) --

                      The field ID that this operand should take the value of.

                  • operandTwo (dict) --

                    Represents the right hand operand in the condition.

                    • booleanValue (boolean) --

                      Boolean value type.

                    • doubleValue (float) --

                      Double value type.

                    • emptyValue (dict) --

                      Empty value type.

                    • stringValue (string) --

                      String value type.

                  • result (boolean) --

                    The value of the outer rule if the condition evaluates to true.

            • defaultValue (boolean) --

              The value of the rule (that is, whether the field is required) should none of the conditions evaluate to true.

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

    • errors (list) --

      List of case rule errors.

      • (dict) --

        Error for batch describe case rules API failure. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

        • errorCode (string) --

          Error code from getting a case rule.

        • id (string) --

          The case rule identifier that caused the error.

        • message (string) --

          Error message from getting a case rule.

ListCaseRules (new) Link ¶

Lists all case rules in a Cases domain. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

See also: AWS API Documentation

Request Syntax

client.list_case_rules(
    domainId='string',
    maxResults=123,
    nextToken='string'
)
type domainId:

string

param domainId:

[REQUIRED]

Unique identifier of a Cases domain.

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

{
    'caseRules': [
        {
            'caseRuleArn': 'string',
            'caseRuleId': 'string',
            'description': 'string',
            'name': 'string',
            'ruleType': 'Required'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • caseRules (list) --

      A list of field summary objects.

      • (dict) --

        Summary information of this case rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

        • caseRuleArn (string) --

          The Amazon Resource Name (ARN) of the case rule.

        • caseRuleId (string) --

          Unique identifier of a case rule.

        • description (string) --

          Description of a case rule.

        • name (string) --

          Name of the case rule.

        • ruleType (string) --

          Possible types for a rule.

    • nextToken (string) --

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

DeleteCaseRule (new) Link ¶

Deletes a case rule. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

See also: AWS API Documentation

Request Syntax

client.delete_case_rule(
    caseRuleId='string',
    domainId='string'
)
type caseRuleId:

string

param caseRuleId:

[REQUIRED]

Unique identifier of a case rule.

type domainId:

string

param domainId:

[REQUIRED]

Unique identifier of a Cases domain.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateTemplate (updated) Link ¶
Changes (request)
{'rules': [{'caseRuleId': 'string', 'fieldId': 'string'}]}

Creates a template in the Cases domain. This template is used to define the case object model (that is, to define what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive templates cannot be used to create cases.

Other template APIs are:

See also: AWS API Documentation

Request Syntax

client.create_template(
    description='string',
    domainId='string',
    layoutConfiguration={
        'defaultLayout': 'string'
    },
    name='string',
    requiredFields=[
        {
            'fieldId': 'string'
        },
    ],
    rules=[
        {
            'caseRuleId': 'string',
            'fieldId': 'string'
        },
    ],
    status='Active'|'Inactive'
)
type description:

string

param description:

A brief description of the template.

type domainId:

string

param domainId:

[REQUIRED]

The unique identifier of the Cases domain.

type layoutConfiguration:

dict

param layoutConfiguration:

Configuration of layouts associated to the template.

  • defaultLayout (string) --

    Unique identifier of a layout.

type name:

string

param name:

[REQUIRED]

A name for the template. It must be unique per domain.

type requiredFields:

list

param requiredFields:

A list of fields that must contain a value for a case to be successfully created with this template.

  • (dict) --

    List of fields that must have a value provided to create a case.

    • fieldId (string) -- [REQUIRED]

      Unique identifier of a field.

type rules:

list

param rules:

A list of case rules (also known as case field conditions) on a template.

  • (dict) --

    An association representing a case rule acting upon a field. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

    • caseRuleId (string) -- [REQUIRED]

      Unique identifier of a case rule.

    • fieldId (string) -- [REQUIRED]

      Unique identifier of a field.

type status:

string

param status:

The status of the template.

rtype:

dict

returns:

Response Syntax

{
    'templateArn': 'string',
    'templateId': 'string'
}

Response Structure

  • (dict) --

    • templateArn (string) --

      The Amazon Resource Name (ARN) of the newly created template.

    • templateId (string) --

      A unique identifier of a template.

GetTemplate (updated) Link ¶
Changes (response)
{'rules': [{'caseRuleId': 'string', 'fieldId': 'string'}]}

Returns the details for the requested template. Other template APIs are:

See also: AWS API Documentation

Request Syntax

client.get_template(
    domainId='string',
    templateId='string'
)
type domainId:

string

param domainId:

[REQUIRED]

The unique identifier of the Cases domain.

type templateId:

string

param templateId:

[REQUIRED]

A unique identifier of a template.

rtype:

dict

returns:

Response Syntax

{
    'createdTime': datetime(2015, 1, 1),
    'deleted': True|False,
    'description': 'string',
    'lastModifiedTime': datetime(2015, 1, 1),
    'layoutConfiguration': {
        'defaultLayout': 'string'
    },
    'name': 'string',
    'requiredFields': [
        {
            'fieldId': 'string'
        },
    ],
    'rules': [
        {
            'caseRuleId': 'string',
            'fieldId': 'string'
        },
    ],
    'status': 'Active'|'Inactive',
    'tags': {
        'string': 'string'
    },
    'templateArn': 'string',
    'templateId': 'string'
}

Response Structure

  • (dict) --

    • createdTime (datetime) --

      Timestamp at which the resource was created.

    • deleted (boolean) --

      Denotes whether or not the resource has been deleted.

    • description (string) --

      A brief description of the template.

    • lastModifiedTime (datetime) --

      Timestamp at which the resource was created or last modified.

    • layoutConfiguration (dict) --

      Configuration of layouts associated to the template.

      • defaultLayout (string) --

        Unique identifier of a layout.

    • name (string) --

      The name of the template.

    • requiredFields (list) --

      A list of fields that must contain a value for a case to be successfully created with this template.

      • (dict) --

        List of fields that must have a value provided to create a case.

        • fieldId (string) --

          Unique identifier of a field.

    • rules (list) --

      A list of case rules (also known as case field conditions) on a template.

      • (dict) --

        An association representing a case rule acting upon a field. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

        • caseRuleId (string) --

          Unique identifier of a case rule.

        • fieldId (string) --

          Unique identifier of a field.

    • status (string) --

      The status of the template.

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

    • templateArn (string) --

      The Amazon Resource Name (ARN) of the template.

    • templateId (string) --

      A unique identifier of a template.

UpdateTemplate (updated) Link ¶
Changes (request)
{'rules': [{'caseRuleId': 'string', 'fieldId': 'string'}]}

Updates the attributes of an existing template. The template attributes that can be modified include name, description, layoutConfiguration, requiredFields, and status. At least one of these attributes must not be null. If a null value is provided for a given attribute, that attribute is ignored and its current value is preserved.

Other template APIs are:

See also: AWS API Documentation

Request Syntax

client.update_template(
    description='string',
    domainId='string',
    layoutConfiguration={
        'defaultLayout': 'string'
    },
    name='string',
    requiredFields=[
        {
            'fieldId': 'string'
        },
    ],
    rules=[
        {
            'caseRuleId': 'string',
            'fieldId': 'string'
        },
    ],
    status='Active'|'Inactive',
    templateId='string'
)
type description:

string

param description:

A brief description of the template.

type domainId:

string

param domainId:

[REQUIRED]

The unique identifier of the Cases domain.

type layoutConfiguration:

dict

param layoutConfiguration:

Configuration of layouts associated to the template.

  • defaultLayout (string) --

    Unique identifier of a layout.

type name:

string

param name:

The name of the template. It must be unique per domain.

type requiredFields:

list

param requiredFields:

A list of fields that must contain a value for a case to be successfully created with this template.

  • (dict) --

    List of fields that must have a value provided to create a case.

    • fieldId (string) -- [REQUIRED]

      Unique identifier of a field.

type rules:

list

param rules:

A list of case rules (also known as case field conditions) on a template.

  • (dict) --

    An association representing a case rule acting upon a field. In the Amazon Connect admin website, case rules are known as case field conditions. For more information about case field conditions, see Add case field conditions to a case template.

    • caseRuleId (string) -- [REQUIRED]

      Unique identifier of a case rule.

    • fieldId (string) -- [REQUIRED]

      Unique identifier of a field.

type status:

string

param status:

The status of the template.

type templateId:

string

param templateId:

[REQUIRED]

A unique identifier for the template.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --