Email Marketing

Campaigns

MarketplaceContent and documentsVersion 0.1.0manifest

What it is for ​

Keep mailing lists with each contact's consent status and date, and prepare campaigns. Sending reaches real people and cannot be undone, so it always needs a human approval.

What the package does and does not do ​

Mailing lists, the contacts on them with their consent status and date, and campaigns with a draft, scheduled, sent flow. Sending is irreversible and reaches real people, so it needs a human approval from a manager; agents may only propose it. Campaign statistics are numbers entered or imported, not computed. Contacts are personal data: keep consent_status and consent_date accurate and never mail a contact that is not opted_in.

Models ​

email_marketing_list ​

A mailing list contacts can belong to

Read group: email_marketing.user. Write group: email_marketing.manager.

FieldKindData classPersonal dataGroupAgents seeDescription
nametextnonenoemail_marketing.userin clearList name, for example Newsletter
descriptionlongtextnonenoemail_marketing.userin clearWhat subscribers receive
is_publicboolnonenoemail_marketing.userin clearWhether visitors can subscribe themselves

email_marketing_contact ​

A person on a mailing list

Read group: email_marketing.user. Write group: email_marketing.user.

FieldKindData classPersonal dataGroupAgents seeDescription
list_idref → email_marketing_listnonenoemail_marketing.userin clearThe list the contact is on
emailtextinternalyesemail_marketing.usermaskedEmail address
nametextinternalyesemail_marketing.usermaskedName of the contact
consent_statusselect (pending, opted_in, opted_out, bounced)internalyesemail_marketing.usermaskedPermission to mail: pending, opted_in, opted_out, bounced
consent_datedateinternalyesemail_marketing.usermaskedDay the contact gave or withdrew permission (YYYY-MM-DD)
consent_sourcetextinternalyesemail_marketing.usermaskedWhere consent was collected, for example website signup form

email_marketing_campaign ​

One mailing sent to a list

Read group: email_marketing.user. Write group: email_marketing.user.

FieldKindData classPersonal dataGroupAgents seeDescription
nametextnonenoemail_marketing.userin clearInternal campaign name
subjecttextnonenoemail_marketing.userin clearEmail subject line
preview_texttextnonenoemail_marketing.userin clearShort text shown after the subject in inboxes
from_nametextnonenoemail_marketing.userin clearSender name shown to recipients
from_emailtextnonenoemail_marketing.userin clearSender address shown to recipients
list_idref → email_marketing_listnonenoemail_marketing.userin clearThe list the campaign goes to
bodylongtextnonenoemail_marketing.userin clearEmail content (HTML or Markdown, as the sender expects)
scheduled_fordatenonenoemail_marketing.userin clearDay the campaign is to be sent (YYYY-MM-DD)
sent_ondatenonenoemail_marketing.userin clearDay the campaign was sent (YYYY-MM-DD)
sent_countnumbernonenoemail_marketing.userin clearEmails handed to the mail server
delivered_countnumbernonenoemail_marketing.userin clearEmails accepted by recipients' servers
opened_countnumbernonenoemail_marketing.userin clearRecipients who opened the email
clicked_countnumbernonenoemail_marketing.userin clearRecipients who clicked a link
bounced_countnumbernonenoemail_marketing.userin clearEmails that bounced
unsubscribed_countnumbernonenoemail_marketing.userin clearRecipients who unsubscribed because of this campaign
stateselect (draft, scheduled, sent, cancelled)nonenoemail_marketing.userin clearCampaign status: draft, scheduled, sent, cancelled

Workflows ​

email_marketing_campaign ​

ActionMovesWho may run itApproval
email_marketing_campaign.schedulestate: draft → scheduledemail_marketing.userno
email_marketing_campaign.sendstate: scheduled → sentemail_marketing.manageryes
email_marketing_campaign.send_nowstate: draft → sentemail_marketing.manageryes
email_marketing_campaign.unschedulestate: scheduled → draftemail_marketing.userno
email_marketing_campaign.cancelstate: scheduled → cancelledemail_marketing.userno

Permission groups ​

Groups used by this app:

  • email_marketing.manager
  • email_marketing.user

Approval steps ​

Steps an agent can only propose:

  • email_marketing_campaign.send
  • email_marketing_campaign.send_now

What agents can and cannot do ​

An agent can read, search, create and update records of this app, and run the actions that need no approval, within the permission groups of its token.

It can only propose these steps, and a person must approve them: email_marketing_campaign.send, email_marketing_campaign.send_now, email_marketing_list.delete, email_marketing_contact.delete, email_marketing_campaign.delete.

Personal data is masked as placeholder tokens: email_marketing_contact.email, email_marketing_contact.name, email_marketing_contact.consent_status, email_marketing_contact.consent_date, email_marketing_contact.consent_source.

Dependencies ​

None.

Install ​

Install it from the Customize app (Marketplace), or from the command line:

bash
obop modules install-from email_marketing

Needs a database and administrator rights.

Build your own ​

The module guide shows how apps like this one are written