Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Using the Plugin

Installation

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:

...

  • Add a custom field to contact: magento_storeview_id

  • Add a custom field to contact: magento_source
    Can be newsletter, order_confirmation and abandoned_cart


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.

...

Figure 1: Plugin Settings

General Settings

Image RemovedImage Added

Figure 2: General settings

...

  • Maileon Api Key: The API key associated with the Maileon account you wish to use.

  • Print CURL Debug Data: Enabling this will log Maileon API responses. Useful for debugging.

Subscriber Settings

Image RemovedImage Added

Figure 3: Subscriber settings

...

  • Doi Mailing ID: If the permission above is set to DOI or DOI-Plus the newsletter subscriber will be sent a confirmation mailing using Maileon. This field can be used to customize which DOI mailing will be sent from Maileon. Leaving it empty means that the default DOI confirmation will be sent. (A default DOI confirmation mailing must be set in Maileon in order for this to work.)

  • Unsubscribe Hook Token: This token is used to synchronize Maileon unsubscribers back to Magento. This field must be a unique string. (Think of it as a password.) The hook setup will be detailed later.

  • Doi Hook Token: This token is used to synchronize Maileon DOI confirmations back to Magento. If set the Magento subscriber state will match the Maileon subscription state of each customer. This field must be a unique string. (Think of it as a password.) The hook setup will be detailed later.

  • At storeview all emails should be unsubscribed: Since Magento 2.4, an email can be registered multiple times with Magento (one time for each storeview). When Maileon reports back unsubscribers to Magento it passes along the storeview ID but if that data gets deleted or is not added in the webhook configuration, Magento does not know from which storeview to unsubscribe the contact of. This option allows to unsubscribe all contacts with a given email address (from all storeviews) if ambiguous or if required (e.g. by law).

  • Disable confirmation request email: Used to disable the built-in Magento DOI confirmation email.

  • Disable success email: Used to disable the built-in Magento DOI success email.

  • Disable unsubscription email: Used to disable the built-in Magento unsubscriber email.

Order Settings

Image RemovedImage Added

Figure 4: Order Confirmation Mail Settings

...

If the user did not choose to retrieve a mail, there is also the possibility to give a certain permission, e.g. SOI, to those contacts so they will get mails with contents of special interest, as they are real customers with a business interest.


Abandoned Cart Settings

Image RemovedImage Added

Figure 7: Shopping Cart Abandonnment Mail Settings

...

Figure 8: Transactiontype for Cart Abandonnments



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.

...

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

Image RemovedImage Added

Figure 9: Additional information attached to a transaction



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”.

...

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

Image RemovedImage Added

Figure 10: Webhook Settings for Unsubscriptions

...

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

Image RemovedImage Added

Figure 11: Webhook Settings for DOI-Confirmations


Changelog

30.08.2022 – v 1.8.9

Added payment method ID and name to order transactions

...