More workflow steps
Wait for a condition or a date, run paths side by side, repeat for each line, reuse a workflow, stop.
What these steps are for
Besides waiting, asking for approval and checking a condition, a workflow can wait for something to happen on the record, wait for one of its dates, run paths at the same time, go through the record's lines one by one, run another workflow, and stop. You add them like any other step: Add a step… in the list, or a + on a line in the diagram.
The steps are grouped in the list: Do something, Wait and Control the path. A step that isn't allowed somewhere isn't offered there.
Wait for a condition
Waits until something is true of the record, for example "until Balance is 0" or "until Status is Received", then goes on with Once it is true. It looks again every time the record changes, and every hour for conditions about dates.
- Add Wait for a condition and add the condition to wait for.
- To stop waiting after a while, tick Give up waiting after and choose how long. Add what should happen then under If it isn't true in time.
- After either path, the workflow carries on with the next step.
Without a deadline it waits as long as it takes, up to a year.
Wait for a date
Waits until a date on the record, or a number of days, business days or hours before or after it: "2 business days before Due date". Use 0 for the date itself. A date is counted from the start of your working day.
- If the date changes while it waits, it waits for the new date.
- If the date has already passed, or the record has none, it carries on at once and says so in the run.
Run side by side
Runs two or more paths at the same time (up to 10). Name each path, then add its steps. A path that waits, for an approval for example, doesn't hold up the others.
| Carry on | What happens |
|---|---|
| when all paths are done | The workflow goes on once every path has finished. If a path fails, the workflow fails. |
| as soon as one path is done | The first path to finish wins; the others are stopped. |
For example: a credit check approval in one path and a request for the customer's tax certificate in the other, then "activate the customer" once both are done.
Repeat for each line
Runs its steps once for every line of the order, bill or invoice, or only for the lines that match its conditions, for example "Quantity ordered is more than 100". In a message, {{ line.field }} is the line's value, and Insert a field lists them under This line.
- The steps for each line can notify, email, change a field, send, post in a chat, check a condition or stop. They can't wait.
- At most 200 lines are gone through.
Conditions on lines
Under If and in Check a condition, the field list has a Lines group:
| Condition | Example |
|---|---|
| Number of lines | "Number of lines is more than 20" |
| Total of line … | "Total of line quantity ordered is more than 500" |
| A line field, with any line, every line or no line | "any line's Quantity still to receive is more than 0" |
Lines are read as they are when the condition is checked. Look back on the test run page uses today's lines too, because lines aren't kept with each change.
Run another workflow
Runs another workflow on the same record. Build a multi-level approval once, in a workflow that starts with is passed on by another workflow, and run it from every workflow that needs it.
- Make the workflow to reuse. Under When, choose is passed on by another workflow. Turn it on: it never starts by itself.
- In the other workflow, add Run another workflow and choose it.
- Tick Wait for it to finish before carrying on to go on only once it has finished.
A workflow can't run itself, or run one that comes back to it. Workflows running workflows stop at 5 deep.
Stop
Ends the workflow there: nothing after it runs. Use it inside a path, for example after a rejection. In a path side by side, it ends the whole workflow and the other paths.
If something looks wrong
| What you see | What to do |
|---|---|
| A wait for a condition never ends | Open the run: it says what it waits for and until when. Check the condition against the record, or add a deadline. |
| "The path “…” failed" | Open the run: each path's steps are listed with the reason. Fix the step, then Try again. |
| "“…” is not on" | The workflow it runs must be on. Turn it on first. |
| "The steps for each line can't include …" | Move that step outside Repeat for each line. |