Skip to content
View as Markdown

Workflow

Field Type Description
id string A unique identifier for the workflow. This is set automatically by the server upon workflow creation and is immutable.
name string A human readable title for the workflow.
flows repeated bitdrift.public.unary.explorations.v1.Flow The flows that make up this workflow. Each flow is a sequence of steps. Flows can be thought of as independent paths through the workflow graph. Each step contains one match rule. Steps can also contain exit conditions that allow resetting to the initial step in the flow based on match rules or timeouts.
actions repeated bitdrift.public.unary.explorations.v1.ActionRule The actions that make up this workflow. Each action is associated with one or more match IDs that are embedded in the steps of the flows. Individual actions may have restrictions on what referential match IDs they can be associated with. See the documentation for each action type for more details.
state bitdrift.public.unary.explorations.v1.Workflow.WorkflowState The current deployment state of the workflow.
created_at google.protobuf.Timestamp Creation date of the workflow.
updated_at google.protobuf.Timestamp Last update date of the workflow.
owner bitdrift.public.unary.common.v1.Owner The user this workflow belongs to.
deployed_at google.protobuf.Timestamp Last deploy date of the workflow.
platform_targets repeated bitdrift.public.shared.platform.v1.Platform The platform targets for this workflow. If empty, this will match any platform.
group_by_fields repeated string Additional group by values that are collected for each collected metric within the workflow.
deployment_expiration_time google.protobuf.Timestamp The time at which the deployment expires based on the deployment_expiration condition. This is set automatically by the server and will be null if the deployment does not expire or if the workflow has not been deployed yet. Note that due to how LastSeen works, reading the workflow data counts as a "last seen" and will reset the expiration time.

Example

JSON
{
  "actions": [
    {
      "metric_chart_rule": {
        "time_series": [
          {
            "aggregated_id": "abc-123-def",
            "rate": {
              "denominator": {
                "match_id": "match-abc",
                "name": "My Workflow"
              },
              "denominator_id": "abc-123-def",
              "group_by": {
                "values": [
                  {
                    "log_body": false
                  }
                ]
              },
              "numerator": {
                "match_id": "match-abc",
                "name": "My Workflow"
              },
              "numerator_id": "abc-123-def"
            },
            "track_unique": {
              "device_id": true
            }
          }
        ]
      },
      "rule_id": "actn_ghi789"
    }
  ],
  "created_at": "2024-01-15T09:30:00Z",
  "deployed_at": "2024-01-15T09:30:00Z",
  "deployment_expiration_time": "2024-01-15T09:30:00Z",
  "flows": [
    {
      "exclusive": {},
      "steps": [
        {
          "exit_conditions": [
            {
              "match_rule": {
                "generic_match": {
                  "base_matcher": {
                    "log_field": "field_name",
                    "operator": "EQUAL",
                    "string_value": "example"
                  }
                },
                "match_id": "match-abc",
                "sample_rate": 100
              }
            }
          ],
          "loop_match_id": "match-abc",
          "match_rule": {
            "generic_match": {
              "base_matcher": {
                "log_field": "field_name",
                "operator": "EQUAL",
                "string_value": "example"
              }
            },
            "match_id": "match-abc",
            "sample_rate": 100
          },
          "save_fields": [
            {}
          ]
        }
      ]
    }
  ],
  "group_by_fields": [
    "field_name"
  ],
  "id": "wrkf_abc123",
  "name": "My Workflow",
  "owner": {
    "email": "user@example.com",
    "id": "usr_abc123",
    "name": "Jane Doe"
  },
  "platform_targets": [
    {
      "apple": {
        "apps": [
          {
            "app_id": "com.example.app"
          }
        ]
      }
    }
  ],
  "state": "LIVE",
  "updated_at": "2024-01-15T09:30:00Z"
}

Workflow.WorkflowState

Name Number Description
IDLE 0 The workflow is not currently running and it has not been deployed.
LIVE 1 The workflow has been deployed and it’s currently live.
DEPLOYING 2 The workflow is in the process of being deployed and it has not reached most live clients yet.
EXPIRED 3 The workflow has been deployed but it has expired and is no longer deployed. This is similar to IDLE but it indicates that the workflow was not explicitly stopped.