# Build and run your first workflow

> Build a refund review workflow. Run a routine request, then send a policy exception to the Inbox for approval.

Build a workflow that recommends a refund for purchases made within 30 days and sends older purchases to a reviewer. You’ll enter two sample requests in the Inbox and follow each one through the workflow. The workflow produces a recommendation as text.

Use a project where you have edit access and a workspace with enough credits for the AI blocks. This example uses a practice policy and sample requests.

## Create the workflow

1. Open **Workflows** and select **New workflow**.
2. Choose an editable project. In **Name**, enter `Refund review practice`, then select **Create workflow**.
3. Right-click the canvas to open the block palette. As you add blocks in the next section, connect them by dragging from an output handle to the next block’s input handle.

```text
Start (Manual) "Start a run" → Pause (For input) "Enter a request" → Route (Yes / No) "Within 30 days?"
  yes → Think "Recommend a refund"
  no → Pause (For approval) "Review the exception" → Think "Record the exception"
```

- **Yes path:** Recommend a refund under the policy.
- **No path:** Wait for approval, then recommend a refund as a reviewed exception.

## Add the request and decision blocks

1. Add **Start** → **Manual**. This lets you start each practice run yourself.
2. Add **Pause** → **For input** and connect it after **Manual**. In **Prompt**, enter `Enter the order number and how many days ago the purchase was made.` Turn on **Answer required**.
3. Add **Route** → **Yes / No** and connect it after **For input**. In **Instructions**, enter the practice policy.

   > Answer yes if the request says the purchase was made 30 days ago or less. Answer no if the purchase is older or the request does not say how many days ago it was made.

The **For input** block passes your answer to **Yes / No**. The Route block sends the same request down the selected branch.

## Connect the two outcomes

1. Connect the **Yes** output to a **Think** block. In **Instructions**, enter `Write a one-sentence recommendation to approve the refund under the 30-day policy. Include the order number and purchase age from the request.`
2. Connect the **No** output to **Pause** → **For approval**. In **Approval message**, enter `Check the request and decide whether to approve an exception to the 30-day refund policy.` Leave **Who can approve** set to **Anyone with edit access** so you can review the practice request yourself.
3. Connect the approval block to a second **Think** block. In **Instructions**, enter `Write a one-sentence recommendation to approve the refund as a reviewed exception. Include the order number from the request.`
4. Select **Publish**. If the validation dialog reports an issue, use it to find the affected block or connection. When the workflow is published, **Run** appears in the header.

## Run a routine request

1. Select **Run**. Open the **Inbox** and select the input request for **Refund review practice**.
2. In **Answer**, enter `Order R-101 was purchased 12 days ago.` Select **Send answer**.
3. Open the run and inspect the result. The decision should take the **Yes** path and the first **Think** block should recommend a refund for order R-101. This path finishes without asking for approval.

## Run a policy exception

1. Return to **Refund review practice** and select **Run** again.
2. In the **Inbox**, answer the new input request with `Order R-102 was purchased 45 days ago.` Select **Send answer**.
3. Check that the run takes the **No** path and waits at **For approval**. Open the approval item in the **Inbox**, review the request, and select **Approve**.
4. Inspect the run again. The second **Think** block should recommend a refund for order R-102 as a reviewed exception. To try the other review outcome, repeat the sample and select **Reject**. The branch stops at approval, so the second **Think** block does not run.

If either sample takes an unexpected path, check the answer you sent, the **Yes / No** instructions, and which block is connected to each output.

When you’re ready to use your team's own policy, [set authoritative guidance](https://outwin.ai/docs/knowledge/set-authoritative-guidance/) and [test your examples before publishing](https://outwin.ai/docs/run/test-before-publishing/).
