---
title: "POST /domains/{domainId}/case-rules"
method: POST
path: "/domains/{domainId}/case-rules"
---

# POST /domains/{domainId}/case-rules

`POST /domains/{domainId}/case-rules`

Creates a new case rule. In the Amazon Connect admin website, case rules are known as <i>case field conditions</i>. For more information about case field conditions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/case-field-conditions.html">Add case field conditions to a case template</a>.

## Path parameters

- `domainId` string, required

## Request body

- object
  - `name` string, required — Name of the case rule.
  - `description` string — The description of a case rule.
  - `rule` object, required — Represents what rule type should take place, under what conditions. In the Amazon Connect admin website, case rules are known as <i>case field conditions</i>. For more information about case field conditions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/case-field-conditions.html">Add case field conditions to a case template</a>.
    - `required` object — Required rule type, used to indicate whether a field is required.
      - `defaultValue` boolean, required — The value of the rule (that is, whether the field is required) should none of the conditions evaluate to true.
      - `conditions` BooleanCondition[], required — List of conditions for the required rule; the first condition to evaluate to true dictates the value of the rule.
        - `equalTo` object — Tests that operandOne is equal to operandTwo.
          - `operandOne` object, required — Represents the left hand operand in the condition.
            - `fieldId` string — The field ID that this operand should take the value of.
          - `operandTwo` object, required — Represents the right hand operand in the condition.
            - `stringValue` string — String value type.
            - `booleanValue` boolean — Boolean value type.
            - `doubleValue` number, double — Double value type.
            - `emptyValue` object — Empty value type.
          - `result` boolean, required — The value of the outer rule if the condition evaluates to true.
        - `notEqualTo` object — Tests that operandOne is not equal to operandTwo.
          - `operandOne` object, required — Represents the left hand operand in the condition.
            - `fieldId` string — The field ID that this operand should take the value of.
          - `operandTwo` object, required — Represents the right hand operand in the condition.
            - `stringValue` string — String value type.
            - `booleanValue` boolean — Boolean value type.
            - `doubleValue` number, double — Double value type.
            - `emptyValue` object — Empty value type.
          - `result` boolean, required — The value of the outer rule if the condition evaluates to true.
        - `andAll` object — Combines multiple conditions with AND operator. All conditions must be true for the compound condition to be true.
          - `conditions` BooleanCondition[], required — <p>The list of conditions to combine using the logical operator.</p> <note> <p>For API users: A case rule can have a maximum of 5 conditions, spread across a maximum of 2 levels of nesting.</p> </note>
        - `orAll` object — Combines multiple conditions with OR operator. At least one condition must be true for the compound condition to be true.
          - `conditions` BooleanCondition[], required — <p>The list of conditions to combine using the logical operator.</p> <note> <p>For API users: A case rule can have a maximum of 5 conditions, spread across a maximum of 2 levels of nesting.</p> </note>
    - `fieldOptions` object — Which options are available in a child field based on the selected value in a parent field.
      - `parentFieldId` string — The identifier of the parent field that controls options.
      - `childFieldId` string — The identifier of the child field whose options are controlled.
      - `parentChildFieldOptionsMappings` ParentChildFieldOptionsMapping[], required — A mapping between a parent field option value and child field option values.
        - `parentFieldOptionValue` string, required — The value in the parent field.
        - `childFieldOptionValues` ParentChildFieldOptionValue[], required — A list of allowed values in the child field.
    - `hidden` object — Whether a field is visible, based on values in other fields.
      - `defaultValue` boolean, required — Whether the field is hidden when no conditions match.
      - `conditions` BooleanCondition[], required — A list of conditions that determine field visibility.
        - `equalTo` object — Tests that operandOne is equal to operandTwo.
          - `operandOne` object, required — Represents the left hand operand in the condition.
            - `fieldId` string — The field ID that this operand should take the value of.
          - `operandTwo` object, required — Represents the right hand operand in the condition.
            - `stringValue` string — String value type.
            - `booleanValue` boolean — Boolean value type.
            - `doubleValue` number, double — Double value type.
            - `emptyValue` object — Empty value type.
          - `result` boolean, required — The value of the outer rule if the condition evaluates to true.
        - `notEqualTo` object — Tests that operandOne is not equal to operandTwo.
          - `operandOne` object, required — Represents the left hand operand in the condition.
            - `fieldId` string — The field ID that this operand should take the value of.
          - `operandTwo` object, required — Represents the right hand operand in the condition.
            - `stringValue` string — String value type.
            - `booleanValue` boolean — Boolean value type.
            - `doubleValue` number, double — Double value type.
            - `emptyValue` object — Empty value type.
          - `result` boolean, required — The value of the outer rule if the condition evaluates to true.
        - `andAll` object — Combines multiple conditions with AND operator. All conditions must be true for the compound condition to be true.
          - `conditions` BooleanCondition[], required — <p>The list of conditions to combine using the logical operator.</p> <note> <p>For API users: A case rule can have a maximum of 5 conditions, spread across a maximum of 2 levels of nesting.</p> </note>
        - `orAll` object — Combines multiple conditions with OR operator. At least one condition must be true for the compound condition to be true.
          - `conditions` BooleanCondition[], required — <p>The list of conditions to combine using the logical operator.</p> <note> <p>For API users: A case rule can have a maximum of 5 conditions, spread across a maximum of 2 levels of nesting.</p> </note>

## Response `200`

Success

- CreateCaseRuleResponse
  - `caseRuleId` string, required — Unique identifier of a case rule.
  - `caseRuleArn` string, required — The Amazon Resource Name (ARN) of a case rule.

## Other responses

- `480` — InternalServerException
- `481` — ResourceNotFoundException
- `482` — ValidationException
- `483` — ThrottlingException
- `484` — AccessDeniedException
- `485` — ConflictException
- `486` — ServiceQuotaExceededException

---

[API](https://skmtc.net/aws/apis/connectcases.md) · [All operations](https://skmtc.net/aws/apis/connectcases/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/connectcases/versions/2533502f9155/schema)
