---
search:
  exclude: true
---

# <a id="bitdrift.public.unary.workflows.v1.Step"></a>Step

A single step within a flow.

| Field | Type | Description |
|---|---|---|
| match_rule | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">MatchRule</i>](bitdrift_public_unary_workflows_v1_MatchRule.md#bitdrift.public.unary.workflows.v1.MatchRule){ title="bitdrift.public.unary.workflows.v1.MatchRule"}</span> | The step's match rule. This rule must be satisfied to advance to the next step in the flow. |
| exit_conditions | <span class="proto-type proto-type-message">repeated [<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">Step</i><i class="proto-type-dot">.</i><i class="proto-type-part">ExitCondition</i>](#bitdrift.public.unary.workflows.v1.Step.ExitCondition){ title="bitdrift.public.unary.workflows.v1.Step.ExitCondition"}</span> | Zero or more exit conditions for the step. If an exit condition is met, the flow resets to the  start of the flow. |
| loop_match_id | <span class="proto-type proto-type-primitive">optional string</span> | Describes an optional loop condition that allows looping back to a previous step in the flow.  Must point to the match ID in the same step or a step earlier in the flow. Specifying a looping  condition is only valid on the last step in the flow *unless* actions contains a Sankey rule  that refers to the match ID of this step as one of the nodes. |
| save_fields | <span class="proto-type proto-type-message">repeated [<i class="proto-type-part">bitdrift_public</i><i class="proto-type-dot">.</i><i class="proto-type-part">protobuf</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflow</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">SaveField</i>](bitdrift_public_protobuf_workflow_v1_SaveField.md#bitdrift_public.protobuf.workflow.v1.SaveField){ title="bitdrift_public.protobuf.workflow.v1.SaveField"}</span> | Fields to save when this step is matched. These fields can be referred to by saved_field_id  in a subsequent matcher. The ID of each SaveField must be unique within the flow. This is  used for correlation matching in which flow completion is dependent on a particular set of  field values being consistent across multiple steps in the flow. |

#### Example
```json
{
  "exit_conditions": [
    {
      "match_rule": {
        "generic_match": {
          "base_matcher": {
            "log_field": "field_name",
            "operator": "EQUAL",
            "string_value": "example"
          }
        },
        "match_id": "_i1yUnHjKfmWpCaD5Tazo",
        "sample_rate": 100
      }
    }
  ],
  "loop_match_id": "_i1yUnHjKfmWpCaD5Tazo",
  "match_rule": {
    "generic_match": {
      "base_matcher": {
        "log_field": "field_name",
        "operator": "EQUAL",
        "string_value": "example"
      }
    },
    "match_id": "_i1yUnHjKfmWpCaD5Tazo",
    "sample_rate": 100
  },
  "save_fields": [
    {
      "field_name": "",
      "id": "",
      "regex_capture": ""
    }
  ]
}
```

# <a id="bitdrift.public.unary.workflows.v1.Step.ExitCondition"></a>Step.ExitCondition

A step exit condition. When an exit condition is met, flow execution resets to the start of
 the flow and will wait to match the initial step again.

| Field | Type | Description |
|---|---|---|
| match_rule | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">MatchRule</i>](bitdrift_public_unary_workflows_v1_MatchRule.md#bitdrift.public.unary.workflows.v1.MatchRule){ title="bitdrift.public.unary.workflows.v1.MatchRule"}</span> | Exits on a match condition.<br><br>(Only one of <em>match_rule</em>, or <em>timeout</em> can be set) |
| timeout | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">Step</i><i class="proto-type-dot">.</i><i class="proto-type-part">ExitCondition</i><i class="proto-type-dot">.</i><i class="proto-type-part">TimeoutExit</i>](#bitdrift.public.unary.workflows.v1.Step.ExitCondition.TimeoutExit){ title="bitdrift.public.unary.workflows.v1.Step.ExitCondition.TimeoutExit"}</span> | Exits on a timeout condition.<br><br>(Only one of <em>timeout</em>, or <em>match_rule</em> can be set) |

#### Example
```json
{
  "match_rule": {
    "generic_match": {
      "base_matcher": {
        "log_field": "field_name",
        "operator": "EQUAL",
        "string_value": "example"
      }
    },
    "match_id": "_i1yUnHjKfmWpCaD5Tazo",
    "sample_rate": 100
  }
}
```

# <a id="bitdrift.public.unary.workflows.v1.Step.ExitCondition.TimeoutExit"></a>Step.ExitCondition.TimeoutExit

| Field | Type | Description |
|---|---|---|
| id | <span class="proto-type proto-type-primitive">string</span> | The ID of the timeout which can be referred to by actions. Must be unique within the  workflow. |
| timeout_rule | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">Rule</i><i class="proto-type-dot">.</i><i class="proto-type-part">RuleTimeout</i>](bitdrift_public_unary_workflows_v1_Rule.md#bitdrift.public.unary.workflows.v1.Rule.RuleTimeout){ title="bitdrift.public.unary.workflows.v1.Rule.RuleTimeout"}</span> | The timeout rule. |

#### Example
```json
{
  "id": "_i1yUnHjKfmWpCaD5Tazo",
  "timeout_rule": {
    "duration": 1,
    "duration_unit": "SECONDS"
  }
}
```

