This module allows to automate several process according to some rules.
Odoo core provides base_automation, which is well suited for
simple, isolated rules triggered by internal record changes
(e.g. on create, on update, on delete, or timed conditions).
When processes become more complex (multiple steps, different timings,
conditional paths), it can be harder to understand and maintain the
whole flow in base_automation.
automation_oca focuses on workflow-based automations, where the
full process is defined as a sequence of steps with timings and
dependencies, and can also react to external events such as
email interactions (opened, replied, clicked, bounced, etc).
In short:
- use ``base_automation`` for simple automations driven by internal
record updates
- use ``automation_oca`` for multi-step workflows with timings,
dependencies, and external events
Steps can trigger one of the following options:
- Mail: Sends an email using a template.
- Server Action: Executes a server action.
- Activity: Creates an activity to the related record.
All the steps need to specify the moment of execution. We will set the
number of hours/days and a trigger type:
- Start of workflow: It will be executed at the
previously-configured time after we create the record.
- Execution of another step: It will be executed at the
previously-configured time after the previous step is finished
properly.
- Mail opened: It will be executed at the previously-configured time
after the mail from the previous step is opened.
- Mail not opened: It will be executed at the previously-configured
time after the mail from the previous step is sent if it is not opened
before this time.
- Mail replied: It will be executed at the previously-configured
time after the mail from the previous step is replied.
- Mail not replied: It will be executed at the previously-configured
time after the mail from the previous step is opened if it has not
been replied.
- Mail clicked: It will be executed at the previously-configured
time after the links of the mail from the previous step are clicked.
- Mail not clicked: It will be executed at the previously-configured
time after the mail from the previous step is opened and no links are
clicked.
- Mail bounced: It will be executed at the previously-configured
time after the mail from the previous step is bounced back for any
reason.
- Activity has been finished: It will be executed at the
previously-configured time after the activity from the previous action
is done.
- Activity has not been finished: It will be executed at the
previously-configured time after the previous action is executed if
the related activity is not done.
Important to remember to define a proper template when sending the
email. It will the template without using a notification template. Also,
it is important to define correctly the text partner or email to field
on the template
Records are created using a cron action. This action is executed every 6
hours by default.
Steps are executed using a cron action. This action is executed every
hour by default. On the record view, you can execute manually an action.
There is a way to enforce step execution when finalize the previous one.
If we set a negative value on the period, the execution will be
immediate without a cron.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
feedback.
Do not contact contributors directly about support or help with technical issues.