--- alias: user-guide-automation-business-scenarios-building-structure-step-condition tags: - automation - connect iot description: "This documentation outlines a component for defining conditional actions and branching logic" --- # Condition Perform an action that will determine the next step(s) | Name | Description | Mandatory | Type | Possible Values | Default Value | | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | --------------- | ------------- | | type | Type of action to | Y | `String` | | | | condition | Object with conditions to apply. The condition will be the object key and the value will be the next step. The conditions will be sequentially assessed, and the first to be true will be executed and move to the step in the value. If no conditions are true, it will fallback to the default `next` property of the step. | Y | `Object` | | | ## Example snippets ```json { "name": "Example Condition", "type": "Condition", "settings": { "conditions": { "1 == 2": "stepA", "previousAnswer == 'yes' and 2 == 2": "stepB" } }, "default": "stepC" } ``` ```json { "name": "Example Condition with Error", "type": "Condition", "settings": { "condition": { "isToMonitorSpecificFileType == true": "SpecificFileType", "isToMonitorSpecificFileType == false": "MonitorNewFiles" } }, "next": "Error" } ```