Importing Recommendations for Personalization

Prev Next

Goal

Upload recommended product records to Mapp Engage so you can use them in personalization blocks and Segmentation Builder.


Prerequisites

To complete this task, you need:

  • Mapp Engage with Datastore enabled.

  • A recommendation file that is correctly formatted and ready to upload.


Procedure

  1. Select the recommendations you want to upload.

  2. Create your recommendation file in the required format.

    Use the formatting details in /v1/docs/creating-recommended-products-using-stored-attributes#the-related-data-format and /v1/docs/creating-recommended-products-using-stored-attributes#import-file-format to ensure the file is valid.

  3. In Mapp Engage, go to Administration > E-commerce > Recommended Products.

  4. Enter the Engage Contact ID to find products for a particular user.

  5. Upload the data as a recommendation file, just as you do for your Product Catalog.

  6. Use the uploaded recommendations as personalization blocks in your email send-out or in Segmentation Builder.


Related Data Format

  • The dataset name follows this pattern: mappdefaultrecommendedproduct.

  • In the dataset metadata, set the “restricted” field to “true”.

Field

Description

userId

The internal Mapp Engage user (or contact) identifier, the same as for the rest of the restricted datasets.

productSKU

The product identifier should match the one in the Product Catalog and Transactions dataset.

accuracy

The prediction accuracy. Expressed as integers in the range [0, 1000]. Lower values mean lower accuracy. Example: if the accuracy is 0.5843521 (range (0; 1.0]), store it as 584. If not provided, the default value 1000 should be stored (or left empty and interpreted as the default).

model

The identifier of the model. This is an integer without special storage requirements. If not provided, the default value 0 should be stored (or left empty and interpreted as the default).


Import File Format

Create a CSV file with:

  • A header row with column names

  • One row per record

  • A comma (,) as the separator

Field

Description

key

The contact’s email or the Mapp Engage userId. If the value is a number, the import assumes it is the userId. Otherwise, it is treated as an email. During import, emails are translated into the userId (the same as for the rest of the restricted datasets).

productSKU

The product identifier should match the one in the Product Catalog and Transactions dataset.

accuracy

The prediction accuracy. Expressed as integers in the range [0, 1000]. Lower values mean lower accuracy. Example: if the accuracy is 0.5843521 (range (0; 1.0]), store it as 584. If not provided, the default value 1000 will be stored.

model

The identifier of the model. This is an integer without special storage requirements. If not provided, the default value 0 will be stored.


Example of a personalization block

Your recommendation block is called ecx:recommendedProducts. It must include:

  • a source (PRECALC)

  • User ID

  • Model ID

  • a minimum accuracy between 0 and 1,000

<%ForEach var="recommendedProduct" items="${ecx:recommendedProducts('PRECALC', user.pk, '3', 500)}"%>
                    <%${recommendedProduct.productName}%> - <%${recommendedProduct.productPrice}%>
                    <%/ForEach%>