Magento has announced that they'd stop supporting the Magento 1.x platform, and has finally sunset the version 1 on June 2020. More info here.
Following this announcement, we have stopped supporting our integration with Magento 1 as well.
How subscription preferences are kept up-to-date
Your store customers may subscribe and unsubscribe in different ways. Here is how newsletter subscription preferences are synchronized between MailUp and Magento, depending on where the subscription preference is changed.
Preference changed in the Magento-powered store
Event | Action | Data transferred |
---|---|---|
Customer registers (i.e. creates an account outside of the checkout process) | If customer opts to receive the store newsletter, it is added to MailUp immediately after the customer account is created in Magento. Specifically:
Note that the extension does not wait for the next, scheduled data transfer. It contacts MailUp immediately. | Customer email only. The rest of the customer data is transferred during the next, scheduled data transfer. |
Customer places an order | If customer opts in during checkout, it is added to MailUp at the time the order is placed
Note that the extension does not wait for the next, scheduled data transfer. It contacts MailUp immediately. | Customer email only. Note that the extension does not wait for the next, scheduled data transfer. It contacts MailUp immediately. |
Customer views newsletter tab of customer account area | Customer's latest subscription status is retrieved from MailUp:
| Latest subscription status retrieved from MailUp |
Customer updates subscription preference in newsletter tab of customer account area | Customer's latest subscription preference is updated in MailUp | New subscription preference pushed to MailUp |
Preference changed in MailUp
When a customer unsubscribes from a newsletter or other message in the footer of the message, that subscription preference is not immediately transferred to the Magento-powered store, unless you are using Webhooks (see below).
However, when the customer logs into his/her account in the storefront, the latest subscription preference is retrieved from MailUp and displayed correctly to the customer (see table above).
This means that the subscription preference in the admin area of Magento may not be in sync with MailUp:
- if the customer has not recently logged into his/her account
- and webhooks are not being used
Using Webhooks for near real-time unsubscribe in Magento
With version 2.2 and above of the MailUp Extension for Magento, you can leverage Webhooks in MailUp to update a customer's subscription preference in Magento.
The callback URL that you will enter when you create the Webhook in MailUp changes depending on the action that you want Magento to perform.
Action | Endpoint |
---|---|
Subscribe | http://[store_URL]/mailup/webhook/subscribe |
Unsubscribe | http://[store_URL]/mailup/webhook/unsubscribe |
... where [store_URL] is the URL of the Magento storefront.
The parameter to pass to the callback URL is "customerEmail", with the customer's email as the value. Here is a visual example of how an unsubscribe Webhook would be set up in MailUp. In this example, the store_URL is http://mailupcommerce.com (a fictitious store).
Multiple stores, same subscription preference
Multi-List Subscription in Magento
We are making additional changes to the Magento integration to support multi-list subscriptions, including "hidden" lists (i.e. the same customer is added both to a "Newsletter" list and to a "Triggered Messages" list). There is no ETA on this release yet.
Notifying Magento of a subscriber's email update in MailUp
MailUp handles a change in a subscriber's email as two connected events:
- Unsubscribing the old email
- Subscribing the new email with the "old" subscriber's data
In other words, the "old" email is unsubscribed from the List(s), the new email is added as a new subscriber to the same List(s), and the data stored in the custom fields is transferred over to the new subscriber's profile.
For this reason, there is no "email changed" Webhook that can be triggered. That said, because a "subscribe" event does indeed occur when there is a change in the email address, you can pass this information to Magento together with Magento's customer ID and, if the ID exists in Magento, the email will be updated.
The first step, if you haven't already set it up so, is mapping Magento's Customer ID to a MailUp recipient field (you can use MailUp's default "Customer ID" recipient field or any other field of your choice). Then, you only need to trigger a "subscribe" Webhook that passes to the external system's callback URL:
- "customerEmail", with the customer's email as the value
- "CustomerID" with MailUp recipient field mapped to Magento's "customerID" as the value
Related articles
Back to an overview of the MailUp Extension for Magento.