Object event trigger
An object event trigger reacts to Dolibarr hooks when a record is created, updated, or deleted. It is the real-time counterpart to Cron for ERP data.
⚡ Configuration
- Add an Object event trigger node at the top of the workflow.
- Pick the Dolibarr object (invoice, third party, order, etc.).
- Select verbs: create, update, delete (one or more).
- Activate the workflow.
Run context typically includes ID, event type, and a useful field snapshot.
⚡ Concrete examples
| Scenario | Object | Verb | Downstream |
|---|---|---|---|
| Welcome new third party | Third party | create | Email welcome |
| Invoice validated | Customer invoice | update (validated status) | HTTP to warehouse |
| Order archived | Order | update | Logic + internal notice |
| Cleanup | Product | delete | Logic audit (no blind cascade) |
Use Logic If to filter a field (e.g. status == validated) and skip useless runs.
⚡ Performance
An object event on a very busy object (stock line, agenda) can spawn thousands of runs. Mitigations:
- filter early with Logic;
- batch via Cron + queue if immediate latency is not required;
- disable the workflow during bulk Dolibarr imports.
⚡ Multi-entity and rights
The event respects the record’s entity. The run uses hook context rights; ensure a limited user cannot trigger admin actions through Knot.
⚡ Idempotency
A Dolibarr update may fire multiple times (computed field, third-party trigger). Design for duplicates:
- stable business key;
- Get + compare before Email or HTTP POST.