# ConditionalBranchProperty

A set of actions that Amazon Lex should run if the condition is matched.

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';

declare const slotValueOverrideProperty_: lex.CfnBot.SlotValueOverrideProperty;
const conditionalBranchProperty: lex.CfnBot.ConditionalBranchProperty = {
  condition: {
    expressionString: 'expressionString',
  },
  name: 'name',
  nextStep: {
    dialogAction: {
      type: 'type',

      // the properties below are optional
      slotToElicit: 'slotToElicit',
      suppressNextMessage: false,
    },
    intent: {
      name: 'name',
      slots: [{
        slotName: 'slotName',
        slotValueOverride: {
          shape: 'shape',
          value: {
            interpretedValue: 'interpretedValue',
          },
          values: [slotValueOverrideProperty_],
        },
      }],
    },
    sessionAttributes: [{
      key: 'key',

      // the properties below are optional
      value: 'value',
    }],
  },

  // the properties below are optional
  response: {
    messageGroupsList: [{
      message: {
        customPayload: {
          value: 'value',
        },
        imageResponseCard: {
          title: 'title',

          // the properties below are optional
          buttons: [{
            text: 'text',
            value: 'value',
          }],
          imageUrl: 'imageUrl',
          subtitle: 'subtitle',
        },
        plainTextMessage: {
          value: 'value',
        },
        ssmlMessage: {
          value: 'value',
        },
      },

      // the properties below are optional
      variations: [{
        customPayload: {
          value: 'value',
        },
        imageResponseCard: {
          title: 'title',

          // the properties below are optional
          buttons: [{
            text: 'text',
            value: 'value',
          }],
          imageUrl: 'imageUrl',
          subtitle: 'subtitle',
        },
        plainTextMessage: {
          value: 'value',
        },
        ssmlMessage: {
          value: 'value',
        },
      }],
    }],

    // the properties below are optional
    allowInterrupt: false,
  },
};
```

## Properties

- `condition`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBot.ConditionProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lex.CfnBot.ConditionProperty.html) (required) — Contains the expression to evaluate.

  If the condition is true, the branch's actions are taken.

- `name`: string (required) — The name of the branch.

- `nextStep`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBot.DialogStateProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lex.CfnBot.DialogStateProperty.html) (required) — The next step in the conversation.

- `response`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBot.ResponseSpecificationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lex.CfnBot.ResponseSpecificationProperty.html) — Specifies a list of message groups that Amazon Lex uses to respond the user input.
