---
search:
  exclude: true
---

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

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L216-L232`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L216-L232>)

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| from | <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">StateCondition</i>](bitdrift_public_unary_workflows_v1_StateCondition.md "bitdrift.public.unary.workflows.v1.StateCondition")</span> | Match conditions for the previous state. Leave empty to only match on the new value. |
| to | <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">StateCondition</i>](bitdrift_public_unary_workflows_v1_StateCondition.md "bitdrift.public.unary.workflows.v1.StateCondition")</span> | Match conditions for the updated state. Leave empty to only match on the old value. |
| scope | <span class="proto-type proto-type-enum">[<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">StateScope</i>](bitdrift_public_unary_workflows_v1_StateScope.md "bitdrift.public.unary.workflows.v1.StateScope")</span><br><em class="proto-field-annotation">must be a defined enum value</em> | The scope of the state value being observed. |
| key | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">up to 100 chars</em> | The key of the state value within the given scope. |
| generic_match | <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">GenericMatch</i>](bitdrift_public_unary_workflows_v1_GenericMatch.md "bitdrift.public.unary.workflows.v1.GenericMatch")</span> | Additional match conditions for this OOTB event. This is an AND in addition to the  previously defined event. |

</section>
#### Example
```json
{
  "from": {
    "match_type": "STRING",
    "operator": "GREATER_THAN",
    "value": "example"
  },
  "generic_match": {
    "base_matcher": {
      "log_field": "field_name",
      "operator": "EQUAL",
      "string_value": "example"
    }
  },
  "key": "example-key",
  "scope": "GLOBAL_STATE",
  "to": {
    "match_type": "STRING",
    "operator": "GREATER_THAN",
    "value": "example"
  }
}
```

