Automations: when, if, then
Create an automation, turn it on, and see what it did.
What an automation is
An automation lets the ERP act on its own. You say when it starts (a purchase order is created, an invoice is changed, or every morning at 8), if it applies (the total is more than 10,000, the invoice is a week overdue) and what it does then (notify people, send an email, change a field, send the record to another system).
For example: "When a purchase order is created or changed, if its total is more than 10,000, notify the purchasing manager." Or: "Every working day at 9:00, email the customer of each invoice more than 7 days overdue."
Automations work on purchase orders, bills, sales orders, invoices and items. You find them under Automations in the menu.
Starting from a template
The quickest start is a template: open Automations, click Templates, and click Use this template on the one you want. It opens in the editor with everything filled in, sent to your company's built-in roles (Admin, Accountant, Warehouse). Change what you like, save, and turn it on.
| Template | What it does |
|---|---|
| Large purchase orders | Tells admins when a purchase order goes over 10,000. |
| Approved purchase orders to the warehouse | Tells the warehouse what is coming once an order is approved. |
| Late deliveries | Every working morning, flags orders past their promised date that haven't been received. |
| Bills due soon | Every working morning, tells accountants about unpaid bills due in the next 3 days. |
| Overdue invoice reminder | Every working morning, emails the customer once when an invoice is more than 7 days overdue. |
| Invoices put on hold | Tells accountants when someone puts an invoice on hold. |
| Large sales orders | Tells admins about new sales orders over 5,000. |
| Shipped but not invoiced | Every working morning, flags sales orders shipped more than 2 days ago without an invoice. |
| New items without a price | Tells admins when an item is added without a list price. |
| Send new bills to another system | Sends each new bill to a connection you choose (see Sending records to another system). |
Creating an automation
- Open Automations and click New automation.
- Give it a Name that says what it is for, such as "Large purchase orders".
- Under When, choose the kind of record and what happens to it.
- Under If, add conditions to limit it to the records you mean. With no conditions it runs every time.
- Under Then, add one or more actions.
- Click Save. It is saved as a draft, even if something is still missing.
Describing it instead of filling it in
If AI features are on for your company and your role may use them, the editor starts with Describe it. Write what should happen in your own words, for example "When a purchase order over 10,000 is created, tell everyone with the Admin role", and click Draft it.
- It may ask first. If something is missing or could be read two ways (which orders, over what amount, who to tell), it asks up to three short questions instead of guessing. Click a suggested answer or type your own, then Send.
- It shows a draft. You see When, If and Then in plain words, what it assumed, and anything still to sort out. Click Use this draft to fill in the three steps below, or Discard.
- You can ask for changes. After using a draft, write "also email [email protected]" or "only when the status changes". Changes you made by hand are kept.
- It says what it can't do. Parts that automations don't support yet, such as waiting two days or asking for an approval, are listed under Not possible yet.
For a workflow (waits, approvals, conditions), the AI proposes changes you accept or discard: see Building a workflow by describing it.
| Good to know | |
|---|---|
| Cost | A draft uses AI credits (the editor shows how many). Questions, and requests it can't do, are free. If a draft fails, no credits are used. |
| People | Write names as you know them ("tell Sam Lee"). If the name matches nobody, or more than one person, you are asked who you mean. Your colleagues' names are not sent to the AI: the ERP looks them up itself. |
| Email addresses | Only addresses you typed are used, or the vendor's or customer's address on the record ("email the vendor"). |
| What it knows | The kinds of records and fields automations can use, and your role names. It does not see your records. |
| Check the draft | The When, If and Then lines are written by the ERP from the draft itself, so they are exactly what will run. Read them rather than relying on the AI's summary. |
When: what starts it
| Choice | It starts |
|---|---|
| is created | Once, when a new record is saved for the first time. |
| is changed | Each time an existing record is saved with a different value in one of its fields. |
| is created or changed | In both cases. |
| is sent by another system | When another system sends a record to the automation's own address. See Other systems starting and answering automations. |
| is deleted | When the record is deleted. The conditions look at its last values. |
| is checked on a schedule | At the times you set, it looks at all records of that kind and acts on the ones that match the conditions. See below. |
For changes you can tick Only when these fields change. An automation that should react to a new status doesn't need to start when someone edits the reference. Leave all fields unticked to start on any change.
On a schedule
Use a schedule for anything about time passing: invoices overdue by a week, bills due in three days, orders not delivered by their promised date.
| Setting | What it does |
|---|---|
| Check every day, week or month, at a time | When it looks at the records, in your company's time zone. Weekly: tick the days. Monthly: choose the day, or the last day of the month. |
| Only on working days | Uses your business calendar: weekends and holidays are skipped, and a monthly check that falls on one moves to the next working day. |
| Act on each record only once, the first time it matches | Right for reminders: each invoice gets one email, not one every day. |
| Act on each record at every check while it matches | Right for repeated nagging: it acts again at each check until the record no longer matches. |
- A scheduled automation needs at least one condition, so it never acts on every record by accident.
- Its page shows the Next check. Check now runs a check straight away, without changing the next one; it acts on every record that matches, so use it when you mean it.
- A check acts on at most 500 records. If it finds more, the person who turned it on is told; with "only once", the rest are handled at the next checks.
- If the ERP was down at check time, the check runs once when it is back, not once for every missed time.
- "The person who made the change" can't be used, because nobody made one.
If: which records it applies to
Each condition compares one field with a value: Total (home currency) is more than 10000. The comparisons offered depend on the field: numbers can be more or less than a value, text can contain or start with something, dates can be before or after a day, and every field can be empty or not.
Dates can also be counted from today, in your company's time zone:
| Comparison | Example | True when |
|---|---|---|
| is today | Ship date is today | The date is today. |
| is more than … days ago | Due date is more than 7 days ago | The date is 8 or more days before today. With 0: any day before today. |
| is within the last … days | Invoice date is within the last 30 days | The date is between 30 days ago and today. |
| is within the next … days | Due date is within the next 3 days | The date is between today and 3 days from now. |
- All or any. With several conditions, choose whether all of these are true or any of these is true.
- Was changed. True when that field was changed by the save that started the automation. It is only useful when the automation starts on a change.
- Text ignores capitals. "URGENT" and "urgent" are the same.
- Your own fields. Custom fields are listed with the record's fields: to watch under When, to test under If, and to set with Change a field.
- Lines. For orders, bills and invoices, the Lines group tests their lines: the number of lines, a total over them, or any, every or no line matching ("any line's Quantity ordered is more than 100"). See More workflow steps.
Then: what it does
| Action | What it does |
|---|---|
| Notify people | Puts a notification in the ERP for the people you choose. |
| Send an email | Emails the people you choose and any outside addresses you type. Each person gets their own email, so they don't see who else received it. Emails appear in the email log. |
| Change a field | Sets a field on the record that started the automation. Only fields that are safe to change this way are offered, such as a reference. |
| Send to another system | Sends the record to a connection, such as your accounting system. See Sending records to another system. |
| Post in a chat | Posts a message in a Slack, Microsoft Teams or Google Chat channel you connected under Connections. |
Actions run from top to bottom.
Who it goes to
- A person: someone in your company.
- A role: everyone who has that role at the moment the automation runs. If you give the role to someone new next month, they are included. The company's owner counts as an Admin.
- The person who made the change: whoever saved the record. If the change was not made by a person, nobody is added.
- The address on the record (emails only): for invoices, The address in Customer email sends to the email saved on that invoice. If it is empty or not a valid address, the email is skipped and the run says so.
Putting the record's values in a message
Use Insert a field to add a placeholder such as {{ number }} to a title, subject or message. When the automation runs, it is replaced by that record's value: "Order PO-00042 needs a look."
Turning it on
- Open the automation and click Turn on.
- Read What it will do. This is exactly what will run.
- If something is listed under Fix these first, click Edit the automation, correct it and come back.
- Click Turn on.
An automation acts in the name of the person who turned it on: its emails are sent as that person, and it can only do what their role allows.
Changing an automation that is on
Edit and save as usual. The version that is on keeps running, and the automation shows Changes not live. When you are ready, click Put changes live and confirm. Runs that already started finish with the version they started with.
Pausing
Click Pause to stop new runs. Runs already started still finish. Turn it on again when you want it back.
Seeing what it did
The automation's page lists its Runs: one line for each record it acted on. Open a run to see every action, whether it worked, who was notified or emailed, and what changed on the record.
| Result | What it means |
|---|---|
| Waiting to start | The run is queued. It usually starts within a minute. |
| Done | Every action worked, or had nothing to do (shown as Skipped, for example when the record was deleted in the meantime). |
| Will try again | An action failed. It is tried again after 1 minute, then 5, then 30. Actions that already worked are not repeated. |
| Failed | It still failed after 4 tries. The person who turned the automation on gets a notification. Open the run, read the reason, fix the cause and click Try again. |
| Stopped | The change came from a chain of 5 automations, one starting the next. The chain is cut so it can't run forever. |
Who can do what
Automations have their own entries under Roles and permissions, in the Settings group. Only admins have them to begin with.
- View, Create, Edit, Delete cover looking at automations and their runs and working on drafts.
- Turn automations on and off is a separate permission, under More permissions.
- You can only automate records your role lets you see, and an automation can only change records you could change yourself.
If something looks wrong
| What you see | What to do |
|---|---|
| "This automation changes a field that starts it again, so it would run in a loop" | Under When, tick Only when these fields change and leave out the fields the automation changes itself. |
| "This would run in a loop with …" | Two automations would keep starting each other. Limit one of them to the fields it should react to. |
| "A person it goes to is no longer in the company" | Edit the automation and remove the red name under Goes to. |
| "… is not a field of this record" | A placeholder in a message has a typo. Remove it and use Insert a field. |
| It was paused by itself | It started 500 times within an hour, which usually means a condition is missing. Check the conditions, then turn it on again. |
| It did not run for a record you expected | Check that it was on at the time, that the record was saved after that, and that the conditions were true when it was saved. Changes made by imports and other bulk updates may not start automations. |
| Describe it is not on the page | AI features are off for your company, or your role may not use them. Ask an admin, or fill in When, If and Then yourself. |
| "You don't have enough AI credits for a draft" | Add credits under AI credits, or build the automation by hand. |
| "The draft didn't work this time" | Nothing was charged. Click Draft it again; if it keeps happening, build it by hand and tell your admin. |
| A notification or email didn't reach someone | Open the run. A Skipped action says why, for example that the person has no email address. |
What automations can't do yet
- A business event acts straight away. To wait, ask for approval, do something for each line or run steps side by side, make a workflow instead.
- Change other records, line items, or create records.