marketing_automation
This page combines editorial guidance with evidence extracted from the selected official branch. Always test the flow with your own permissions and configuration.
Purpose
The Marketing Automation Module allows to automate marketing actions like sending emails based on events.
The analysis found 11 Python files, 22 XML files, 18 views, 40 actions, 1 menus, and 1 reports.
Functional user guide
Who should use it
This module is relevant to people responsible for marketing automation processes, company configuration, and result review. Administrators should participate whenever dependencies, permissions, or sequences are introduced.
What you will be able to do
After configuration, you will be able to identify the records added by marketing_automation, execute actions in the correct state, produce its reports, and understand the information shared with other modules.
Requirements and preparation
Before activation, verify company, currency, users, and groups. Install and configure required dependencies first. When real data exists, rehearse activation and upgrades on a restored copy.
Activate dependencies first, review company configuration, and rehearse the complete workflow before production use.
Required dependencies
ir— must be installed and configured before testing this module.marketing— must be installed and configured before testing this module.party— must be installed and configured before testing this module.res— must be installed and configured before testing this module.web_shortener— must be installed and configured before testing this module.
Optional integrations
sale— enables an additional integration; test the combination explicitly.
Recommended initial configuration
- Activate the module and sign in again to load menus and permissions.
- Review new company configuration options and defaults.
- Assign groups to test users using least privilege.
- Create small, verifiable master data before bulk imports.
- Run one complete scenario from draft to final state and inspect related records.
Module objects and concepts
- ir.cron: groups 1 model(s), including
ir.cron. These records form the information users inspect or modify during the process. - ir.email: groups 1 model(s), including
ir.email. These records form the information users inspect or modify during the process. - marketing.automation: groups 8 model(s), including
marketing.automation.activity,marketing.automation.record,marketing.automation.record.activity,marketing.automation.reporting.activity,marketing.automation.reporting.context. These records form the information users inspect or modify during the process. - party.party: groups 1 model(s), including
party.party. These records form the information users inspect or modify during the process. - party.party-unsubscribed-marketing: groups 1 model(s), including
party.party-unsubscribed-marketing.automation.scenario. These records form the information users inspect or modify during the process. - sale.sale: groups 1 model(s), including
sale.sale. These records form the information users inspect or modify during the process. - web.shortened_url: groups 1 model(s), including
web.shortened_url. These records form the information users inspect or modify during the process.
Typical workflow
- Select the correct company and date before creating a document.
- Complete master data before lines or details.
- Use form buttons for state changes; saving is not the same as validating or posting.
- Review warnings, totals, related documents, and traceability.
- Generate the report and compare it with the record before delivery.
Actions, states, and wizards
block— action or transition that starts block. Check permissions, current state, and related records before running it.draft— action or transition that starts draft. Check permissions, current state, and related records before running it.on_email_clicked— action or transition that starts on email clicked. Check permissions, current state, and related records before running it.on_email_opened— action or transition that starts on email opened. Check permissions, current state, and related records before running it.run— action or transition that starts run. Check permissions, current state, and related records before running it.stop— action or transition that starts stop. Check permissions, current state, and related records before running it.cancelled— action or transition that starts cancelled. Check permissions, current state, and related records before running it.done— action or transition that starts done. Check permissions, current state, and related records before running it.running— action or transition that starts running. Check permissions, current state, and related records before running it.stopped— action or transition that starts stopped. Check permissions, current state, and related records before running it.
Controls before production
- Define who creates, reviews, confirms, cancels, and reads.
- Test closed periods, unauthorized users, and incomplete data.
- Verify numbering, currency, rounding, and time zone where applicable.
- Document error correction without direct database edits.
- Include its tables and files in backup and restore procedures.
Troubleshooting
- If a menu is missing, verify activation, module-list update, groups, and a new login session.
- If a field rejects a value, inspect its domain, company, state, and configured dependencies.
- If a button is hidden or disabled, check permissions and valid transitions; never change state with SQL.
- If results differ, reproduce a minimal case and compare related records before and after.
- Keep the full traceback, version, active modules, and minimal data needed to diagnose an error.
Developer guide
Architecture and extension points
The package contains 17 Python classes and declares or extends 14 models. It uses Boolean, Char, Date, DateTime, Float, Function, Integer, Many2Many, Many2One, One2Many, Reference, Selection, Text, TimeDelta. Developers should first determine whether a class creates a model or uses PoolMeta to extend one, preserve super() calls, and avoid duplicating dependency rules.
Registered or extended models
ir.cronir.emailmarketing.automation.activitymarketing.automation.recordmarketing.automation.record.activitymarketing.automation.reporting.activitymarketing.automation.reporting.contextmarketing.automation.reporting.scenariomarketing.automation.scenariomarketing.automation.unsubscribeparty.partyparty.party-unsubscribed-marketing.automation.scenariosale.saleweb.shortened_url
Field types used
BooleanCharDateDateTimeFloatFunctionIntegerMany2ManyMany2OneOne2ManyReferenceSelectionTextTimeDelta
Detected classes and public methods
Classes: Abstract, Activity, ConditionError, Context, Cron, DomainError, Email, MarketingAutomationMixin, Party, PartyUnsubscribedScenario, Record, RecordActivity, Sale, Scenario, ShortenedURL, TemplateError, Unsubscribe
Methods: block(), cancel(), check_condition(), check_domain(), check_email_template(), check_email_title(), default_blocked(), default_domain(), default_email_clicked(), default_email_opened(), default_from_date(), default_period(), default_state(), default_to_date(), default_unsubscribable(), default_uuid(), do(), draft(), email_context(), eval(), execute(), execute_send_email(), get(), get_activity_actions(), get_marketing_party(), get_models(), get_on(), get_parent_actions(), get_rate(), get_rec_name(), get_record_count(), get_user(), language(), marketing_access_context(), on_change_on(), on_change_with_activity_action(), on_change_with_parent_action(), on_email_clicked(), on_email_opened(), preprocess_values(), process(), run(), search_marketing_party(), set_delay(), set_on(), stop(), table_query(), trigger(), validate_fields(), view_attributes()
Code map
Detected 11 Python files, 22 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.
__init__.pydoc/conf.pyexceptions.pyir.pyir.xmlmarketing_automation.pymarketing_automation.xmlmarketing_automation_reporting.pymarketing_automation_reporting.xmlmessage.xmlmixin.pyparty.pyparty.xmlroutes.pysale.pyview/activity_form.xmlview/activity_tree.xmlview/ir_email_form.xmlview/party_form.xmlview/record_activity_form.xmlview/record_activity_list.xmlview/record_form.xmlview/record_list.xmlview/reporting_activity_graph_count.xmlview/reporting_activity_graph_rate.xmlview/reporting_activity_list.xmlview/reporting_context_form.xmlview/reporting_scenario_graph_count.xmlview/reporting_scenario_graph_rate.xmlview/reporting_scenario_list.xmlview/scenario_form.xmlview/scenario_list.xmlweb.py
Test plan
- Activation on an empty database and upgrade from the previous revision.
- Create, update, copy, and delete according to state and access rights.
- Every button, transition, and wizard with valid and invalid scenarios.
- Applicable multi-company rules, translations, time zones, and currencies.
- Combined installation with required and optional dependencies.
- Backup and restore of records, attachments, and generated reports.
Compatibility and upgrades
Keep server and modules on series 8.0. Before upgrading, compare tryton.cfg, __register__ migrations, state changes, XML IDs, and permissions. A successful build does not replace a rehearsed migration or functional data reconciliation.
Official documentation evidence
Topics found: Configuration · email_from · automation_base · Design · Scenario · Scenario Reporting · Activity · Actions · Send EMail · Activity Reporting · Reports · Unsubscribe · Record · Record Activity · Marketing Automation Module
-
- doc/configuration.rst: The Marketing Automation Module uses some settings from the
[marketing]section of thetrytond:topics-configuration.
- doc/configuration.rst: The Marketing Automation Module uses some settings from the
-
- doc/design.rst: The Marketing Automation Module introduces the following concepts:
-
- doc/index.rst: The Marketing Automation Module allows to automate marketing actions like sending emails based on events.