Data syncing: Data mapping

Important

Editing any of your data mapping settings after you already have contacts synced to dotmailer will reset all of your contacts in Magento to re-sync with the new corresponding contact data fields.

Contents

Mapping Magento data to contact data fields
  » Mapping newsletter subscribers' opt-in types from Magento to dotmailer
Adding new custom attributes
Creating a new contact data field
Data field definitions
System values
FAQs

Summary

As standard, the normal synchronisation process will only synchronise your customers' and subscribers' email addresses. However, the connector provides you with the ability to map other key retail information that you store on contacts from your Magento website to your dotmailer account.
This can be general customer information, which includes title, customer ID, first name, last name, etc., including the total number of reviews a customer has left and the date they last left a review.

Note: The full contact data field information outlined below will only sync for your registered customers. Contacts who are subscribers or guests will be limited to having just an email address, website and store name synced to dotmailer.

Subscriber status can also be mapped, enabling you to send relevant dynamic content based on whether a customer is subscribed or not.

Furthermore, you can map address and sales information, including a customer's last quote ID, enabling you to send relevant product recommendations as dynamic content based on a customer's last abandoned basket/cart. In addition to this, customer trend data can be synced and mapped, such as most frequent day/month of purchase and most purchased category/brand.

Custom Magento attributes can also be added and then mapped to dotmailer contact data fields.

If you integrate with Sweet Tooth, then you can also map a customer's Sweet Tooth rewards information to your dotmailer contact data fields.

Mapping Magento data to contact data fields

  1. Create contact data fields in your dotmailer account.
  2. Go to STORES > Configuration > DOTMAILER, and click Data Mapping.
  3. From the available dropdown next to each of your Magento fields, select the dotmailer contact data field you want to map to.

    mag2_data_mapping_data_fields_mapping.png
  4. Click Save Config in the top right when satisfied with your mappings. Magento will then confirm that the settings have been saved. The next time your scheduled synchronisation runs, these contact data fields will be included and mapped to.

Mapping newsletter subscribers' opt-in types from Magento to dotmailer

When newsletter subscribers are synchronised to dotmailer, the synchronised contacts have a single opt-in type or a double opt-in type in dotmailer, depending on your Magento store's 'Need to confirm' subscription option.

To check the subscription option, go to STORES > Configuration > Customers > Newsletter > Need to Confirm.

When the subscription option is Yes, new newsletter subscribers are sent a confirmation email that asks them to confirm their email address. Then, those newsletter subscribers are given a double opt-in type in dotmailer.

When this subscription option is No, new newsletter subscribers are given a single opt-in type in dotmailer.

Adding new custom attributes

You can also add any custom attributes that you've created in Magento for capturing customer information and map this to your dotmailer contact data fields.

To do this, click Add under 'Custom Attributes'. Dropdowns will then become available to select your custom 'Attribute' and accompanying 'DataField' to map to.

mag2_data_mapping_data_fields_mapping_custom_attributes.png

Choose these as appropriate. After adding one, you can add further new custom attributes, as well as delete any, with the buttons provided.

Once happy with your new custom attributes and mappings, click Save Config in the top right.

Creating a new contact data field

It could be that you don't have an appropriate existing contact data field to map an attribute to in your dotmailer account. In which case, you have the ability to create a new dotmailer contact data field within the connector, which saves you from having to go off to dotmailer to create it.

Scroll down and click Create Data field. The view will expand so you can enter the name of your new contact data field, select a contact data field value type from the dropdown, enter a default value if you wish to (useful for campaign personalisation purposes), and choose the visibility of the field.

mag2_data_mapping_create_data_field.png

Note: Make sure you select the appropriate data field type to match the sort of data that is going to be stored in the new data field: string, numeric, date or Boolean (true/false or yes/no).

When happy, click Create New Data Field. The new data field will be created in your dotmailer account and will subsequently be available to map to your Magento fields from the dropdown.

Alternatively, an automapping function for contact data fields is available.

Data field definitions

The definitions for the data fields are as follows:

Customer Information

  • Title - The customer's title.
  • Customer ID - The Magento database ID for a customer.
  • First Name - The customer's first name.
  • Last Name - The customer's last name.
  • D.O.B - The customer's date of birth.
  • Gender - The customer's gender.
  • Created At - The date/time the customer's account was created.
  • Last Logged In Date - The date/time the customer last logged into their account.
  • Customer Group - The customer group the customer is currently assigned to.
  • Review Count - The number of approved reviews the customer has left.
  • Last Review Date - The date of the customer's last approved review.
  • Subscriber Status - The customer's subscriber status as taken from 'Newsletter Subscribers'.

Address

  • Billing Address Line 1 - The customer's default billing address line 1.
  • Billing Address Line 2 - The customer's default billing address line 2.
  • Billing State - The customer's default billing state/region.
  • Billing Country - The customer's default billing country.
  • Billing Zip/Postcode - The customer's default billing zip/postcode.
  • Billing Telephone - The customer's default billing telephone.
  • Billing Company – The customer’s default billing company.
  • Delivery Address Line 1 - The customer's default delivery address line 1.
  • Delivery Address Line 2 - The customer's default delivery address line 2.
  • Delivery City - The customer's default delivery city.
  • Delivery State - The customer's default delivery state/region.
  • Delivery Country - The customer's default delivery country.
  • Delivery Zip/Postcode - The customer's default delivery zip/postcode.
  • Delivery Telephone - The customer's default delivery telephone.
  • Delivery Company - The customer's default delivery company.

Sales

  • Total Number of Orders - The number of orders the customer has placed as a customer. The orders used in the calculation can be configured in the 'Data Fields' section in 'Configuration'.
  • Average Order Value - The average order value of the customer's orders. The orders used in calculation can be configured in the 'Data Fields' section in 'Configuration'.
  • Total Spend - The total value of the customer's orders. The orders used in calculation can be configured in the 'Data Fields' section in 'Configuration'.
  • Last Purchase Date - The date of the last order the customer placed as a customer.
  • Last Increment ID - The friendly order number of the customer's last order.
  • Total Refund - The total amount the customer has had refunded via Magento.
  • Most Purchased Category - The category a customer has most frequently purchased from based on their history. If there's no clear winner then the category with the highest spend wins.
  • Most Purchased Brand - The brand a customer has most frequently purchased from based on their history. If there's no clear winner then the brand with the highest spend wins. The attribute used to define brand can be altered in the 'Data Fields' section in 'Configuration'.
  • Most Frequent Day of Purchase - The most frequent day of the week the customer makes an order on. If there's no clear winner then the day with the highest spend wins.
  • Most Frequent Month of Purchase - The most frequent month of the year the customer makes orders in. If there's no clear winner then the month with the highest spend wins.
  • First Category Purchased - The first category the customer purchased from. If the order contained multiple categories then the highest value category wins.
  • Last Category Purchased - The last category the customer purchased from. If the order contained multiple categories then the highest value category wins.
  • First Brand Purchased - The first brand the customer purchased from. If the order contained multiple brands then the highest value brand wins. The attribute used to define brand can be can be altered in the 'Data Fields' section in 'Configuration'.
  • Last Brand Purchased - The last brand the customer purchased from. If the order contained multiple brands then the highest value brand wins. The attribute used to define brand can be altered in in the 'Data Fields' section in 'Configuration'.

System Values

These values need to be mapped for all of the URLs within the 'Dynamic Content' section to work. These data fields only get updated via the connector as and when an email is triggered that requires the values to be populated with the corresponding data for the email:

  • Website name - The website the contact originated from.
  • Store name - The store name the contact originated from.
  • Last Order ID - The database ID of the last order the customer placed.
  • Last Quote ID - The database ID of the last quote the customer had.
  • Abandoned Product Name - The most expensive product's name for the current abandoned cart.

FAQs

The dropdowns to map to dotmailer contact data fields is empty. Why is that?

You need to ensure you have valid and saved dotmailer API credentials (https://developer.dotmailer.com/docs/getting-started-with-the-api#section-setting-up-your-api-user).

Why do I only have a couple of contact data fields to pick from?

You need to create corresponding contact data fields in your dotmailer account.

Have more questions? Submit a request

Comments