Workflows: waits, approvals and conditions
Steps that wait, ask for approval and branch; test runs, watching runs and going back to a version.
What a workflow is
A workflow is an automation with several steps that can wait, ask for approval and check a condition before going on. It starts like a business event (When, If), then runs its steps from top to bottom over hours or days.
For example: "When a purchase order over 10,000 is created or its total changes, ask for approval. If nobody decides within 2 business days, tell the admins. Once approved, email the vendor and mark the order sent. If rejected, tell whoever changed it."
Creating a workflow
You can also write what it should do and let the AI propose the steps: see Building a workflow by describing it.
- Open Automations and click New workflow.
- Fill in When and If as for a business event.
- Under Steps, use Add the first step… and keep adding steps in the order they should happen. Use the arrows to move a step and Remove to delete it.
- Click Save, then Test run to see what it would do, then Turn on.
The diagram
Next to List, the Diagram tab draws the workflow as a flowchart: each step is a box, and approvals and conditions split into their paths. Click a box to jump to that step in the list and edit it. Click a + on a line to add a step at exactly that point. To move a step, drag its box onto another line: the lines it may go to are dashed while you drag, and everything inside the step (its paths and their steps) moves with it. A step can't go where it isn't allowed, for example a wait inside If not decided in time. Undo puts it back. On the workflow's page, Diagram shows the version you saved.
The kinds of step
| Step | What it does |
|---|---|
| Notify people, Send an email, Change a field, Send to another system | The same actions as in a business event. Emails can also go to the vendor or customer on the record (The vendor's email address). |
| Wait | Pauses the workflow for a number of hours, days, business hours or business days. Business time follows your business calendar. |
| Check a condition | Looks at the record as it is at that moment and goes on with If yes or If no. |
| Ask for approval | Sends the record through one of your approval processes and waits for the decision, then goes on with If approved or If rejected. |
| Post in a chat | Posts a message in a connected Slack, Microsoft Teams or Google Chat channel. |
| Wait for a condition, Wait for a date | Waits until something is true of the record, or for a date on it, with a deadline if you want one. |
| Wait for another system | Waits for another system to answer a record the workflow sent it. See Other systems starting and answering automations. |
| Run side by side | Runs paths at the same time, then carries on when all, or the first, are done. |
| Repeat for each line | Does its steps for every line of the order, bill or invoice, or the lines that match. |
| Run another workflow | Runs a workflow you built once, such as a multi-level approval, on the same record. |
| Ask AI | Summarizes, sorts or picks out details from the record's text. See Asking AI in a workflow. |
| Stop | Ends the workflow there. |
How the waits, paths, lines and reused workflows work is in More workflow steps.
After the steps inside If yes, If approved and the like, the workflow carries on with the step below. A workflow can't jump back to an earlier step.
Asking for approval
Who approves, and in which order, is set in Approvals, not in the workflow: create an approval process for purchase orders (or sales orders) there (for example with the department manager as approver), then choose it in the step. Approvers see the request in Approvals as usual and decide there.
- Title of the request is what approvers see. Use Insert a field to include the order number or total.
- Do something if it isn't decided within… runs the steps under If not decided in time once, for example a reminder to the finance director, and then keeps waiting for the decision. These steps can't wait or ask for another approval.
- If the order is already waiting for approval when the workflow reaches this step, it waits for that decision instead of asking again.
- The request is made on behalf of the person whose change started the workflow, and the department and branch come from the order.
- If the approval request is cancelled in Approvals, the workflow stops.
One run per record at a time
While a workflow is running for a record (for example waiting for approval), changes to that record don't start another run of the same workflow. When the run ends, the next matching change can start a new one.
Test run
The test run page also shows how often the workflow would have started in the last 30 days and what it does in each situation it can meet: see Testing an automation before it goes live.
Open the workflow and click Test run. Type a record's number, choose how each approval would go (approved or rejected, in time or late), and click Run the test. You see every step it would take, with the dates waits and reminders would land on. Nothing is sent, changed or asked for.
Watching a run
Each record's own page also shows this in its Automations panel.
On the workflow's page, Runs lists each record it is working on. A run that is waiting shows Waiting; open it to see what it waits for (until when, or for which approval request, with a link to it) and every step done so far. Where it is draws the workflow with the steps already done ticked and the step it is on marked now.
| What you want | What to do |
|---|---|
| Stop a run for one record | Open the run and click Cancel run. An approval request it made stays open in Approvals; cancel it there if it isn't needed. |
| Stop the workflow for new records | Click Pause. Runs already started carry on. |
| Undo a change to the workflow | Under Versions, click Go back to this on an earlier version, review it and put it live. Runs already started keep the version they started with. |
If something looks wrong
| What you see | What to do |
|---|---|
| "Choose the approval process to use" | Pick one in the step. If the list is empty, create an approval process for that kind of record under Approvals first. |
| "… has no approval steps yet" | Open the process in Approvals and add at least one step with an approver. |
| A run failed at "Ask for approval" | Open the run: the reason comes from Approvals (for example no process matched). Fix it there and start the run again by changing the record. |
| The workflow didn't start for an order | Check that it was on, that the If conditions were true, and that no other run of it was still open for that order. |
| "The record was deleted, so the workflow stopped" | The record was deleted while the workflow waited. Nothing else happens for it. |
What workflows can't do yet
- Jump back to an earlier step. Waits for a condition with a deadline cover most "chase until" cases.
- Ask for approval of anything but purchase orders and sales orders.
- Create records, or change other records or the lines themselves.