Skip to content

How do I make something happen on its own when an event occurs?

A schedule can also be triggered when an event occurs: an order is confirmed, an invoice is issued, an email arrives, a task is completed. It can wait a few minutes, act only if a condition is met, and use the event’s data in its steps. This is what turns a chain of work (‘order confirmed → task in the warehouse → notice to whoever made the sale’) into something that happens on its own.

What do I need before I start?

The same as for any schedule: edit permission in the module, and knowing that it runs in your name. If you haven’t made one yet, start with schedule something by the clock: the form is the same except for the When block.

How do I do it?

  1. In Tasks → Schedules, New schedule, with its name, scope and steps.
  2. In When, choose When an event occurs.
  3. In When… choose the event. They are grouped by module and described in plain language (‘A sales order is confirmed’). Below it the Data available for that event appears.
  4. Optional, Only if…: add conditions with + Add condition. Each one is a piece of data, an operator (=, !=, >, >=, <, <=, contains) and a value. All of them have to be met.
  5. Optional, Delay (min): how many minutes to wait after the event occurs before acting.
  6. In each step’s details you can type {{evento.campo}} with any of the available data: Prepare order {{evento.numero}}, Order from {{evento.cliente}} for {{evento.importe}} €. They are replaced with the values of the particular event.
  7. Preview, Save and, if it writes, Approve and start.

What events are there?

EventModuleData it brings
A sales order is confirmedSalesnumber, customer, amount, date, whether it involves production
A sales order is fully deliveredSalesthe same
A delivery note is issuedSalesthe same
A sales invoice is issuedSalesthe same
A receipt instalment is marked as returned or unpaidTreasurycustomer, amount, due date, document
An item’s stock falls below its minimumWarehouseitem, warehouse, stock, minimum
A production order is closedProductionnumber, item, quantity, source order
An email has arrived in a mailboxEmailsender, subject, mailbox, whether the sender is a customer
An incoming email now has an intent and toneEmailthe above plus intent, tone and confidence
A contact has been created in the CRMCRMname, source, owner
A contact changes statusCRMname, previous status, new status
A card moves to another column on a boardCRMboard, source and destination column, title
A task has been createdTaskstitle, scope, origin, owner, what it refers to
A task has been marked as doneTaskstitle, scope, who completed it, what it refers to
A task arrives in a board columnTaskstitle, scope, board, column it leaves and column it arrives in (by name), what it refers to
A page on the company website has been publishedSearch visibilityaddress, title, scope, cluster, language, content type
Two pages on the company website overlapSearch visibilitywhy they overlap, the two addresses and titles, how much they overlap, the evidence, whether it is a conflict that comes back
A website page has been reviewed before publishingSearch visibilityaddress, title, traffic light, how many reds and ambers, the findings, status on the website, who requested it

A credit note doesn’t confirm, deliver or hand over anything: it doesn’t trigger any event in the sales chain.

‘A task arrives in a column’ is produced by any board: when a task is dragged to another column and when it is placed on a board for the first time (then there is no column it leaves). Dropping it in the column where it already was doesn’t count. For the schedule to act only on a particular board, filter by the column (it is compared ignoring capitals, but with its accents: ‘Revisión SEO’, not ‘Revision SEO’) and by what it refers to (PaginaWeb, Documento…), or by the board.

The screen also offers ‘A direct debit batch is returned by the bank’ and ‘A message has arrived on a channel other than email’. You can schedule on them, but the ERP doesn’t produce them yet: the first is waiting for the return of direct debit batches to record it, and the second for the installation to have a messaging channel connected.

What happens when I do it?

Each time the event occurs, the ERP records it in the same operation that produces it: an order that never gets confirmed leaves no trace, and one that is confirmed always does. A minute later, the scheduler matches the recorded events with the active schedules waiting for them, checks the filter and the delay, and queues one run for each pair. The same event can trigger several schedules.

An event that nobody is waiting for is treated as handled and isn’t looked at again. A schedule created after the event occurs does not see earlier events.

The delay is counted from when the event occurred. If the ERP was stopped and the delay has already expired, it triggers as soon as it comes back.

What examples does a new company come with?

Three event-based schedules, paused, so you can look at them, edit them and activate them with one click:

They are a starting point, not what the ERP does out of the box: a new company doesn’t yet know which inboxes it uses or who its sales agent is.

Search visibility brings its own when you create its publishing board: review a page when it reaches the Revisión SEO column, warn about a new conflict and explain with the assistant a review that comes out red. They are also created paused.

If something goes wrong

What you seeWhat has happenedWhat to do
‘An event-based schedule needs to know which event triggers it.’You didn’t choose the eventChoose one in When…
It never triggers even though the event occursA condition in Only if… looks at data that event doesn’t bring: it always fails, also with !=Remove the condition or use a piece of data from the list
You move a task to another column and it doesn’t triggerThe condition’s value isn’t the column name exactly (an accent is missing, there is an extra space)Copy the column name from the board
It triggers but the step gives ‘Error’ and mentions {{evento.…}}The step uses data that event doesn’t bringCorrect the data name in the step
It triggers later than you expectedDelay (min) has a value, or the scheduler runs every minuteThat is normal; lower the delay if it is too long
The event occurred before the schedule was created and it didn’t triggerOnly events that occur with the schedule already active are looked atRepeat the event, or Run now if it doesn’t depend on the data
It is Pending approval and doesn’t triggerIt writes and nobody has approved itApprove and start

See also: Schedule something by the clock · Assign a task · Organising work with tasks and schedules