Workflow rules — e-mail alerts, field updates, notices, dates and schedules
Quick answerIn MAJA Books go to Settings → Workflow Rules and click New rule: choose what it watches (invoices, proformas, sales orders, credit notes, payments, purchase orders, bills, debit notes, expenses, customers, vendors or items) and when it runs — a record is created, edited, a field changes, it is approved or rejected, it reaches a date (days before or after it, at an hour), or on a schedule (every day, week, month or year). Give it criteria, then what it does: an e-mail alert, an update of a field (notes, references, dates, terms, switches or a custom field — never a figure or the ledger), an in-app notice for you, chosen roles or everyone, or a webhook — at once or hours or days later. Rules run in the order of the list; the log shows every run.
Steps — make a rule
- Click Settings, then Workflow Rules, then New rule. Give it a Rule name and choose what it Watches: Invoices, Proforma invoices, Sales orders, Credit notes, Payments received, Purchase orders, Bills, Debit notes, Expenses, Payments made, Customers, Vendors or Items.
- Choose when it runs — when a record is created, is edited, is created or edited, has a field changed (choose the field), is approved or is rejected (for the documents that are sent for approval), reaches a date, or on a schedule.
- For reaches a date: choose the date (the due date, the invoice date, a proforma's valid-until date …), how many days after or before it (or on the day), and the hour (UAE time). Each record is read once a day.
- For on a schedule: every day, every week (the weekday), every month (the day — a short month takes its last day) or every year (the day and the month), the hour, and optionally Ends after a number of runs. At each run the rule takes the records its criteria match (up to 200).
- Add Criteria (all must match, or any may) — for example the total is at least 10,000, the balance due is more than 0, the status is sent.
- Under Then add up to five actions: E-mail alert, Update a field, In-app notice or Webhook. Each runs at once, or later — a number of hours or days after the rule ran. Click Save rule.
The actions
- E-mail alert — to the customer or vendor, the company's e-mail, you, or up to five addresses; the subject and text take words in braces: {number}, {party_name}, {total}, {balance}, {date}, {due_date}, {today} and any field of the record. A schedule's e-mail lists its records: {records}, {count} and {sum}.
- Update a field — set the record's notes, order number, reference, terms, a date (to a date, or today plus some days), a customer's credit limit, payment terms or switches (active, reminders stopped, exempt from late fees), an item's reorder level, or one of the record's custom fields; or empty it. A rule never changes a figure, a status, a party or the ledger. A record that is locked keeps what it holds, and the run says so.
- In-app notice — a message in the bell at the top of MAJA Books, for you (the rule's maker), for chosen roles (only those roles and the owner see it), or for everyone.
- Webhook — calls one of your webhooks (Settings → API Keys & Webhooks) with the record, or with the list for a schedule.
The order, Run now and the log
- Rules run in the order of the list: the arrows move a rule earlier or later. When two rules set the same field, the later one stands.
- A date rule or a schedule has Run now (the ▶▶ button): a date rule reads today's records at once (each still once a day); a schedule runs its actions now and keeps its own next run.
- The last runs shows each run — the rule, the record, the event (created, edited, approved, date, schedule, later) and what was done; filter it on done, partly done or errors and take it as CSV. Waiting lists the actions that run later, with their time.
What MAJA does for you
- Runs every rule on the server, at the end of the save — whatever page, door or import made the change — once per rule, per record, per save.
- Reads dates and schedules every hour, and runs the actions that were waiting when their time comes.
- Does not run the rules again for a field a rule itself set, so two rules never feed each other.
- Keeps the day's e-mail limit of your plan, and drops an action still waiting when its rule is deleted or switched off, or its record is gone.
Good to know
- A company has up to fifty rules, of which twenty schedules. A rule does one to five things; an action waits a year at most.
- "changed" in the criteria is read only when a record is edited. A schedule's e-mail goes to the company, you or addresses — it lists many records.
- Times are UAE time. A date rule saved after its hour reads today's records at the next hour's run.
Related guides
Set approvals — rules with conditions, chains of approvers, the final wordCreate a custom roleCreate and send a tax invoiceView the audit trailPeople also ask
- Can MAJA Books update a field automatically when an invoice is created?
- How do I get a reminder three days after an invoice is due in MAJA?
- Can MAJA send me a weekly list of overdue invoices?
Still stuck? In the app, tap the ? button at the top and choose Chat with MAJA support — the screen you are on goes with your message and the reply comes to the same place (within one working day). Or write to support@majabooks.com, or ask MAJA's assistant (the round button at the bottom right of MAJA Books).