---
title: "How to Personalize Emails with eCommerce and Related Data Tables"
slug: "how-to-personalize-emails-with-ecommerce-and-related-data-tables"
updated: 2025-03-27T13:02:37Z
published: 2025-03-27T13:02:37Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Personalize Emails with eCommerce and Related Data Tables

## General Information

This page describes how to personalize Email messages in Mapp Engage, combining data from related data and eCommerce tables.

> [!NOTE]
> Note that [eCommerce triggers](/v1/docs/triggers) cannot be set up using Related Data. To do that, you must use the Product Catalog.

## Steps

1. **Create a Related Data table**: *Administration > Attributes > Related Data*
  - Create a new related data table called "myrdlistwithproductdata".
  - The table must use a unique unlinked key.
  - Add two String fields to the table:
    - `description`
    - `price`
  - Documentation: [Create Related Data Set](/v1/docs/create-related-data-set)
2. **Import sample data** into this related data table. For more information, see [Import Data Into Related Data Set](/v1/docs/import-data-into-related-data-set).
3. **Import eCommerce Data**: *Administration > eCommerce > Product Catalog / Triggers / System Transactions / Wishlist / Abandoned Cart / Abandoned Browse / Recommended Products*
  - Import data into the Recommended Product, Wishlist, and Abandoned Cart eCommerce tables. You can do this manually or using Mapp Connect:
    - [Manual Import & Search of eCommerce Data](/v1/docs/manual-import-search-of-ecommerce-data)
    - [Set Up Data Imports (Data Feeds)](/v1/docs/set-up-data-imports-data-feeds)
  - Ensure that the `productSKU` in the eCommerce tables is the same as the `productId` in the related data table.
  - Verify that the products have been added to the eCommerce tables. For more information, see [Testing eCommerce Tables](/v1/docs/testing-ecommerce-tables).
4. **Create an email message**: *Create New > Message > Email Message*
  - Go to the message Compose section and use a sample template for testing.

**Email code sample**

```xml
<html>
    <head>
        <title>
        </title>
    </head>
    <body>
            Hello <%user.Email%><br>
            <%ForEach var="test" items="${user.wishlistProductsRD['myrdlistwithproductdata']}" %>
            WL description: <%${test['description']}%><br>
            WL price: <%${test['price']}%><br><br>
            <%/ForEach%>
       
            <%ForEach var="test" items="${user.abandonedCartProductsRD['myrdlistwithproductdata']}" %>
            AC description: <%${test['description']}%><br>
            AC price: <%${test['price']}%><br><br>
            <%/ForEach%>
       
            <%ForEach var="test" items="${user.recommendedProductsRD['myrdlistwithproductdata']}" %>
            RP description: <%${test['description']}%><br>
            RP price: <%${test['price']}%><br><br>
            <%/ForEach%>
    </body>
</html>
```
5. **Test the personalization**.
  - Click **Preview**, select a test contact, and click **Update.**
  - The message is now personalized based on the imported data.
  - For more information, see:
    - [Using eCommerce Data for Email Personalization](/v1/docs/using-ecommerce-data-for-email-personalization)
    - [Email Message Preview (window)](/v1/docs/email-message-preview-window)
