> For the complete documentation index, see [llms.txt](https://docs.distro.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distro.so/workflows/logic.md).

# Logic, timing, and human steps

Use logic steps to choose the next path, prepare values, wait, or ask someone to decide.

## Branch

Add **Branch** when different data should produce different outcomes.

Name each branch and configure its conditions. Specific conditions should come before broad ones. The first matching branch is selected; **Otherwise** handles runs that match none.

For example, branch by region or qualification before choosing the scheduler. Add a presence condition if missing values should not qualify.

A disconnected Otherwise path ends there. Connect it to follow-up or a clear completion when your process needs one.

## Split Traffic

Use **Split Traffic** to distribute runs between weighted experiment paths. Name the variants, set the shares, and connect each outcome.

Use it for an experiment, such as two follow-up approaches. Use queue weights for member distribution; traffic splitting and rep rotation solve different problems.

## Set Variables and Shift Date

**Set Variables** creates named values for later steps. Choose a clear name and the appropriate type.

**Shift Date** transforms a date using the supported settings. Select its output in a later reminder, message, or record update.

## Wait

Use **Wait** to pause a workflow until the configured time. Where supported, choose working-time behavior and review the timezone and schedule.

Resolve the visitor's immediate response before a durable wait. A prospect should receive the scheduler or redirect before your workflow pauses for later follow-up.

Do not assume a wait creates a meeting reminder that tracks every later reschedule. Use event messaging or a lifecycle workflow suited to the result you need.

## Request approval

Add **Request approval** when a person must approve or reject the next action. Configure the approver, request, and supported deadline, then connect the decision outcomes.

Use approval before a consequential action, such as enrolling a prospect in a special campaign. The run stays waiting until the decision or deadline outcome.

## Request input

Use **Request input** when a teammate must supply missing information. Define the requested fields and connect the resulting path.

Later steps can use the submitted values. Keep the request short and explain why the information is needed.

## Review waiting runs

Open workflow **Logs** to see the wait, human task, and next step. A waiting run has not failed merely because it is unfinished.

See [Logs and troubleshooting](/workflows/logs.md) for blocked external deliveries and cancellation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.distro.so/workflows/logic.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
