Marketing Automation

Rational

Marketing Automation could be a good addition to Tryton as it has all the data of the company and especially those linked to customers. This blueprint propose to add the functionality to automate the communication.

Proposal

The feature is mainly a workflow engine based on selected records. The workflow activity starts an action for a record and the result of this action move the record to the next activity.
The action is by default about to send an email to the party linked to the record (it may later be extended to support other actions like phone call etc.). The result of sending an email can be “email opened”, “email action clicked”, “reply” or “bounce”. Each result can be triggered for its opposite after a delay.

Marketing Scenario

Scenario

  • Name
  • Model (having a specific Mixin)
  • Domain (to select record to run)
  • State: Draft/Running/Stopped

Activity

  • Name
  • Scenario
  • Parent
  • Condition: result of the parent action (email opened, action clicked etc.)
  • Delay, Hour & Day: start the activity after the condition of the parent is valid.
  • Domain: limit to record validating this domain
  • Action: send email,…

The activities without parent does not have a condition (or the condition is always valid).

Record

  • Scenario
  • Record
  • Blocked

There is a unique constraint on Scenario and Record

Record Activity

  • Activity
  • Record
  • Parent
  • State: Waiting, Done, Cancel
  • Date

A cron task search regularly for new Record to create for each scenario.
When a new record is created, the scheduled record activities are created for the first level of activities that validate the domain.
Another cron task search regularly for waiting record activities with a date in the past to process them. When an activity is processed, it cancels the negative activity sibling and it creates new children record activities.

To track the opening of the e-mail, a transparent image will be added to the HTML content (this is not an accurate method as many MUA block such image but it is the only available). The link will point to a hook that will trigger the right record activity. To track the action of an e-mail, the href attribute of the tags <a/> will be replaced by specific URL that will trigger the record activity and redirect to the original URL.

In the template rendering context, an URL will be available that will block the record. When the record is blocked, no more processing will be performed for it. And of course the context will also contain the record.

Implementation

https://bugs.tryton.org/issue7929

1 Like

Why not use the transactional queue instead of a cron?

Because it is time based process.

Does this proposal replace the Marketing email proposal?

I do not think. Marketing email is to send manually email to a list and this is to have automated scenario. But of course, the marketing.email could be used for a scenario (ex: a welcome scenario).

Will Actions and Action Results be configurable? For example, in addition to email actions, user could also create Phone Call Action and it’s results: called, not reached etc.

See:

But I plan to implement only sending email for now.

I created a technical module: URL Shortener for this purpose ; the review is available. I plan to go on working on this (and probably merge the review later on).

It seems the review is private (or at least I do not have permision to see it). Could you please re-check if it’s really available? :stuck_out_tongue:

The review is public now, sorry for the delay (my upload.py for tryton makes all review private in fact).

This topic was automatically closed after 14 days. New replies are no longer allowed.