Introduction

The module synchronizes customer data, order data and shopping cart information between Magento and Maileon. Magento is the primary system, which means that the customer information in Magento is considered the main information and changes to that data are synchronized with Magento. Conversely, only certain information is synchronized: the DOI confirmation and unsubscription. For order details and cart abandonments, this information is sent to Maileon as transactions (events) and can be used either to analyze data using contact filters or to activate a trigger mailing. All functions can be set via a configuration panel in Magento.

Installation

Install via Composer

The module can be installed using Composer with the following command:

composer require xqueue/module-maileon

Install via ZIP package

Below version 1.0.8

The first step is to copy the Maileon directory into the /app/code directory of the Magento installation. If the app directory doesn't already contain a code subdirectory please create it. After this the module must be enabled using the following steps:

From version 1.8.1

Copy the Maileon plugin to the Magento root folder (/sources/magento-2/Xqueue/Maileon/). Add the following line to the Magento composer.json:

"require": {
    "xqueue/module-maileon": "^1.8"
},

"repositories": [
    {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    {
        "name": "xqueue/module-maileon",
        "type": "path",
        "url": "sources/magento-2/Xqueue/Maileon"
    }
],

Run composer update at command line

Enable the module

Before enable the module, we must check to make sure Magento has recognize our module or not by enter the following at the command line:

php bin/magento module:status

If you follow above step, you will see this in the result:

List of disabled modules:
Xqueue_Maileon

This means the module has recognized by the system but it is still disabled. Run this command to enable it:

php bin/magento module:enable Xqueue_Maileon

If the above succeeded the following message is displayed:

The following modules has been enabled:
Xqueue_Maileon

This’s the first time you enable this module so Magento require to check and upgrade module database. We need to run this command:

php bin/magento setup:upgrade

If everything went well you can switch to Magento’s admin interface. The plugin settings are available in the following menu:

Stores -> Configuration -> Maileon

Configuration in Magento

The configuration can be found under “Stores” “Configuration” and, since version 1.8, can be set on Storeview level. This means, that for each Storeview, you can select an own API key, to use different Maileon accounts or you can select different DOI mail keys to send out DOIs in e.g. different languages.

General Settings

Subscriber Settings

Please note: You can only obtain significant response analyses and react appropriately when your contacts have given consent to single user tracking. Taking into account that only the double-opt-in procedure is legally safe (for German-based providers), the only permission method we can recommend is “Double Opt-in including consent to single user tracking”.

Order Confirmation Settings

After version 1.9 you do not need to disable Magento order confirmation emails in the settings. (Configuration/Sales/Sales Emails → Order)

Transaction type magento_orders_v2

Field name

Type

Description

order.id

string

Order id (incremental id)

order.date

timestamp

Order timestamp

order.status

string

Order status

order.total

float

Order grand total

order.total_tax

float

Order tax amount

order.total_no_shipping

float

Order total without shipping cost

order.currency

string

Order currency

shipping.service.name

string

Shipping method

payment.method.id

string

Payment id

payment.method.name

string

Payment name

order.items

JSON

Ordered items in json

shipping.address.firstname

string

Shipping address first name

shipping.address.lastname

string

Shipping address last name

shipping.address.phone

string

Shipping address phone

shipping.address.region

string

Shipping address region

shipping.address.city

string

Shipping address city

shipping.address.zip

string

Shipping address zip

shipping.address.street

string

Shipping address street

billing.address.firstname

string

Billing address first name

billing.address.lastname

string

Billing address last name

billing.address.phone

string

Billing address phone

billing.address.region

string

Billing address region

billing.address.city

string

Billing address city

billing.address.zip

string

Billing address zip

billing.address.street

string

Billing address street

generic.string_1

string

Store ID

generic.string_2

string

Store name

Transaction type magento_orders_v2 order.items

Field name

Type

Description

product_id

string

Product id

title

string

Product title

single_price

float

Product single price

total

float

Item total price

sku

string

Product sku

quantity

integer

Item quantity

url

string

Product url

image_url

string

Product image url

categories

string

Product categories list separated with ,

short_description

string

Product short description

Transaction type magento_orders_extended_v2

Field name

Type

Description

order.id

string

Order id (incremental id)

order.date

timestamp

Order timestamp

order.status

string

Order status

order.total

float

Order grand total

order.total_tax

float

Order tax amount

order.total_no_shipping

float

Order total without shipping cost

order.currency

string

Order currency

shipping.service.name

string

Shipping method

payment.method.id

string

Payment id

payment.method.name

string

Payment name

product.id

string

Product id

product.title

string

Product title

product.single_price

float

Product single price

product.total

float

Item total price

product.sku

string

Product sku

product.quantity

integer

Item quantity

product.image_url

string

Product image url

product.url

string

Product url

product.categories

string

Product categories list separated with ,

product.short_description

string

Product short description

shipping.address.firstname

string

Shipping address first name

shipping.address.lastname

string

Shipping address last name

shipping.address.phone

string

Shipping address phone

shipping.address.region

string

Shipping address region

shipping.address.city

string

Shipping address city

shipping.address.zip

string

Shipping address zip

shipping.address.street

string

Shipping address street

billing.address.firstname

string

Billing address first name

billing.address.lastname

string

Billing address last name

billing.address.phone

string

Billing address phone

billing.address.region

string

Billing address region

billing.address.city

string

Billing address city

billing.address.zip

string

Billing address zip

billing.address.street

string

Billing address street

generic.string_1

string

Store ID

generic.string_2

string

Store name

Customer Related Email Notification settings

Transaction type magento_account_credentials_changed_v1

Field name

Type

Description

fullname

string

Customer full name

changed_field

string

The changed field name (email, password)

store_id

string

Store id

store_name

string

Store name

store_email

string

Store email address

store_phone

string

Store phone

Transaction type magento_password_reminder_v1

Field name

Type

Description

fullname

string

Customer full name

account_url

string

Customer account url

psw_reset_url

string

Customer password reset url

store_id

string

Store id

store_name

string

Store name

Transaction type magento_password_reset_confirmation_v1

Field name

Type

Description

fullname

string

Customer full name

psw_reset_url

string

Customer password reset url

store_id

string

Store id

store_name

string

Store name

Transaction type magento_new_account_v1

Field name

Type

Description

fullname

string

Customer full name

type

string

Notification type:

  • customer/create_account/email_template : welcome email, when confirmation is disabled and password is set

  • customer/create_account/email_no_password_template : welcome email, when confirmation is disabled and password is not set

  • customer/create_account/email_confirmation_template : welcome email, when confirmation is enabled and password is set

  • customer/create_account/email_confirmed_template : email with confirmation link

account_url

string

Customer account url

account_confirm_url

string

Customer account confirmation url

psw_reset_url

string

Customer password reset url

store_id

string

Store id

store_name

string

Store name

Order Related Email Notification Settings

Transaction types magento_order_creditmemo_v1 , magento_order_creditmemo_update_v1

Field name

Type

Description

order.id

string

Order id (incremental id)

order.date

timestamp

Order timestamp

order.status

string

Order status

order.total

float

Order grand total

order.total_tax

float

Order tax amount

order.total_no_shipping

float

Order total without shipping cost

order.currency

string

Order currency

shipping.service.name

string

Shipping method

payment.method.id

string

Payment id

payment.method.name

string

Payment name

order.items

JSON

Ordered items in json

shipping.address.firstname

string

Shipping address first name

shipping.address.lastname

string

Shipping address last name

shipping.address.phone

string

Shipping address phone

shipping.address.region

string

Shipping address region

shipping.address.city

string

Shipping address city

shipping.address.zip

string

Shipping address zip

shipping.address.street

string

Shipping address street

billing.address.firstname

string

Billing address first name

billing.address.lastname

string

Billing address last name

billing.address.phone

string

Billing address phone

billing.address.region

string

Billing address region

billing.address.city

string

Billing address city

billing.address.zip

string

Billing address zip

billing.address.street

string

Billing address street

order.creditmemo.id

string

Order credit memo id

order.comment

string

Order comment

store.id

string

Store id

store.name

string

Store name

Transaction types magento_order_invoice_v1 , magento_order_invoice_update_v1

Field name

Type

Description

order.id

string

Order id (incremental id)

order.date

timestamp

Order timestamp

order.status

string

Order status

order.total

float

Order grand total

order.total_tax

float

Order tax amount

order.total_no_shipping

float

Order total without shipping cost

order.currency

string

Order currency

shipping.service.name

string

Shipping method

payment.method.id

string

Payment id

payment.method.name

string

Payment name

order.items

JSON

Ordered items in json

shipping.address.firstname

string

Shipping address first name

shipping.address.lastname

string

Shipping address last name

shipping.address.phone

string

Shipping address phone

shipping.address.region

string

Shipping address region

shipping.address.city

string

Shipping address city

shipping.address.zip

string

Shipping address zip

shipping.address.street

string

Shipping address street

billing.address.firstname

string

Billing address first name

billing.address.lastname

string

Billing address last name

billing.address.phone

string

Billing address phone

billing.address.region

string

Billing address region

billing.address.city

string

Billing address city

billing.address.zip

string

Billing address zip

billing.address.street

string

Billing address street

order.invoice.id

string

Order invoice id

order.comment

string

Order comment

store.id

string

Store id

store.name

string

Store name

Transaction type magento_order_status_changed_v1

Field name

Type

Description

order.id

string

Order id (incremental id)

order.date

timestamp

Order timestamp

order.status

string

Order status

order.total

float

Order grand total

order.total_tax

float

Order tax amount

order.total_no_shipping

float

Order total without shipping cost

order.currency

string

Order currency

shipping.service.name

string

Shipping method

payment.method.id

string

Payment id

payment.method.name

string

Payment name

order.items

JSON

Ordered items in json

shipping.address.firstname

string

Shipping address first name

shipping.address.lastname

string

Shipping address last name

shipping.address.phone

string

Shipping address phone

shipping.address.region

string

Shipping address region

shipping.address.city

string

Shipping address city

shipping.address.zip

string

Shipping address zip

shipping.address.street

string

Shipping address street

billing.address.firstname

string

Billing address first name

billing.address.lastname

string

Billing address last name

billing.address.phone

string

Billing address phone

billing.address.region

string

Billing address region

billing.address.city

string

Billing address city

billing.address.zip

string

Billing address zip

billing.address.street

string

Billing address street

order.comment

string

Order comment

store.id

string

Store id

store.name

string

Store name

Transaction types magento_order_shipment_v1 , magento_order_shipment_update_v1

Field name

Type

Description

order.id

string

Order id (incremental id)

order.date

timestamp

Order timestamp

order.status

string

Order status

order.total

float

Order grand total

order.total_tax

float

Order tax amount

order.total_no_shipping

float

Order total without shipping cost

order.currency

string

Order currency

shipping.service.name

string

Shipping method

payment.method.id

string

Payment id

payment.method.name

string

Payment name

order.items

JSON

Ordered items in json

shipping.address.firstname

string

Shipping address first name

shipping.address.lastname

string

Shipping address last name

shipping.address.phone

string

Shipping address phone

shipping.address.region

string

Shipping address region

shipping.address.city

string

Shipping address city

shipping.address.zip

string

Shipping address zip

shipping.address.street

string

Shipping address street

billing.address.firstname

string

Billing address first name

billing.address.lastname

string

Billing address last name

billing.address.phone

string

Billing address phone

billing.address.region

string

Billing address region

billing.address.city

string

Billing address city

billing.address.zip

string

Billing address zip

billing.address.street

string

Billing address street

order.shipment.id

string

Order shipment id

order.comment

string

Order comment

store.id

string

Store id

store.name

string

Store name

shipping.service.id

string

Carrier code

shipping.service.tracking.url

string

Tracking popup url

shipping.service.tracking.code

string

Tracking code

order.items json content

Field name

Type

Description

product_id

string

Product id

title

string

Product title

single_price

float

Product single price

total

float

Item total price

sku

string

Product sku

quantity

integer

Item quantity

url

string

Product url

image_url

string

Product image url

categories

string

Product categories list separated with ,

short_description

string

Product short description

Abandoned Cart Settings


Transaction type magento_abandoned_carts_v2

Field name

Type

Description

cart.id

string

The cart id (quote id)

cart.date

timestamp

The cart last updated timestamp

cart.items

JSON

Cart items

cart.product_ids

string

Cart items product ids in a list

cart.categories

string

Cart items product category names in a list

cart.total

float

Cart grand total

cart.total_tax

float

Cart tax amount

cart.currency

string

Cart currency

customer.salutation

string

Customer salutation

customer.full_name

string

Customer full name

customer.firstname

string

Customer first name

customer.lastname

string

Customer last name

customer.id

string

Customer id

generic.string_1

string

Store ID

generic.string_2

string

Store name

Configuring Custom Forms

In order to submit other standard or custom data to Maileon, the following scheme must be used:

Example: custom_MySpecialField

Enhancing Transactional Data

In some cases, it is required to add custom data transactions. E.g. if you use a plugin, which allows customizing products with names, custom images, etc., and the image shall be displayed in the order confirmation mail, you need to pass this URL to Maileon. Or this case, the plugin provides a simple way to add data to the transactions by overriding class Maileon\SyncPlugin\Helper\External\Data from an external plugin.

To ease development, we provide a test plugin that shows a minimalistic setup. In di.xml, the class is overwritten with an own implementation:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <preference for="Maileon\SyncPlugin\Helper\External\Data" type="Maileon\TestPlugin\Helper\External\Data" />

</config>

Investigating class Maileon\TestPlugin\Helper\External\Data, which is provided by the test package and can be also named freely, there are different methods that can be used.

This value can then be used in a mailing to print it, use it as a link or an image URL.

The installation of the plugin is as expected done by using Composer. Install in the same way as the current plugin (see above)

If everything was installed as expected, the next time e.g. an order is triggered, some additional data should be attached to it.

Webhook Settings in Maileon

Changed parameters in version 1.8:
Since Magento 2.4, an email can be added as newsletter subscriber for each storeview, thus, the email can exist multiple times in the Magento newsletter module. As of version 1.8 of the plugin, configuration is based on storeview level, thus, an email can be added to different Maileon newsletter accounts based on its origin. Thus, when Maileon reports back a DOI confirmation or unsubscription, it needs to identify the correct storeview for a given contact. This is done by adding a new parameter “storeview_id”.

Unsubscription Webhook Setup

The unsubscription webhook is used to synchronize Maileon unsubscribers back to Magento. To set this up in Maileon you must navigate to Settings/Webhooks. In this panel click Create new webhook. Select Unsubscription from the event dropdown. Enter the following for HTTP post URL (substituting your own domain):

https://<my domain>/rest/V1/maileon/webhook-unsubscribe

e.g.: https://maileonmagento.com/rest/V1/maileon/webhook-unsubscribe

Add the following URL parameters:

The token must match the value given for the Unsubscribe Hook Token given in Magento settings.

Please note: To now anonymize the contact field “magento_storeview_id” in case of an unsubscription, it is required to configure Maileon accordingly.

DOI Confirmation Webhook Setup

The DOI confirmation webhook is used to synchronize Maileon DOI confirmations back to Magento. To set this up in Maileon you must navigate to Settings/Webhooks. In this panel click Create new webhook. Select DOI Confirmation from the event dropdown. Enter the following for HTTP post URL (substituting your own domain):

https://<my domain>/rest/V1/maileon/webhook-doi-confirm

eg.: https://maileonmagento.com/rest/V1/maileon/webhook-doi-confirm

Add the following URL parameters:

The token must match the value given for the DOI Hook Token given in Magento settings.

Changelog

2025.04.08 - v1.9.6

2024.12.02 - v1.9.5

2024.10.22 - v1.9.4

2023.11.02 - v1.9.3

2023.10.16 - v1.9.2

2023.08.25 - v1.9.1

2023.06.14 - v1.9.0

2023.04.06 - v1.8.12

2022.12.06 - v1.8.11

2022.10.25 - v1.8.10

2022.08.30 – v1.8.9

2022.05.13 – v1.8.8

2022.05.11 – v1.8.7

2022.01.25 – v1.8.6

2022.01.18 – v1.8.5

2021.11.19 – v1.8.4.1

2021.11.17 – v1.8.4

2021.09.13 – v1.8.3

2021.09.10 – v1.8.2

2021.07.13 – v1.8.1

2021.07.07 – v1.8

2021.02.04 – v1.7

2021.01.27 – v1.6

2021.01.15 – v1.5

2020.11.24 – v1.4