6Configure Email

About Email Templates

The provided email widget templates enable you to display widgets for product recommendations in your emails to consumers. Using the widgets, your emails will contain references to specific URLs to render the correct product image and direct consumers to the correct product page when they click recommendations.

The following figure illustrates the flow from launching email sent to consumers to the consumer clicking the link that leads to the recommended product in the storefront. Actions by consumers, such as opening email and clicking image URLs, are recorded and fed back as data for continuous machine learning.

The flow controlled by the email template.

Important aspects related to the email flow are:
  • You create images for email widgets during configuration on the Connections page.

  • Your email service provider contributes to click-tracking fed back to adaptive intelligence using tracking parameters appended to the URL. Recorded events include when a consumer opens email, clicks a link in email for a recommended product, adds the product to their cart, and purchases the recommended product.

Configure Email Widgets

Important: Your email service provider must be able to insert the consumer's email address as a SHA256-hashed value into the image and link URLs as a text replacement field. Contact your email service provider directly to understand if they meet this minimum requirement.

To configure email widgets for integrated email applications, you must perform the following steps:

  1. On the navigation menu, under Connections, select Email Widgets.

    Email templates page showing options to select the number of products to display, layout, and to edit templates styles

  2. Select the number of products you want displayed.

  3. Select the layout of product images that you want.

    The layout selections change depending on the number of products you selected.

  4. Select the strategy you want or select None (Default) to use the default personalized recommendations.

    Note: The Also Bought and Trending strategies use simple algorithms with no personalization. If you want to use personalization, use the default instead of selecting Also Bought or Trending here. You can then modify the code to apply a product filter to show only items bought together or trending items. There's more information about this later in this procedure.
  5. Optionally, to edit styles such as font size, colors, and alignment:

    1. Click Edit Template Styles.

    2. On the Image tab, Name tab, and Sale Price tab, enter the same settings as your existing style, or change the style if you want.

    3. On the List Price tab, set the style you want for the list price for when items aren’t on sale. For example, you might want the list price to display as large or bold text.

    4. On the same tab, set the style you want for the list price for when items are on sale. For example, you might want the list price to display as small strike-through text.

    5. Click Save.

    6. Click Publish Now to immediately start generating updated images based on your changes. Or, you can wait for the scheduled update process to generate updated images for the products on your marketing application. By default, the scheduled updates are every fifteen minutes.

  6. Click Copy to Clipboard to copy the HTML code and paste it into your email service provider's template.

  7. Replace the variables in the HTML code with appropriate values. For example, replace ${EMAIL_HASH_SHA256_} with the appropriate code from your email service provider to insert the hashed email address value into the URLs. Optionally, add product filters as URL parameters

  8. To add other URL parameters such as product filters, see Email Template Code for more information.

  9. If you are using Oracle Responsys, see Configure Oracle Responsys for information about event tracking, dynamic variables for product default values, and other considerations.

If you want to make further changes to style, edit and change the layout of the generated HTML code to make it fit with your existing email templates. Consult your email HTML designer who will be able to modify the placement of the image and link URLs provided.

Email Template Code

The email templates provide code that defines two URL, one for the link and one to the source image file for that link. Both URLs follow the same structure with the URL path being everything before the first question mark (?) and the URL parameters, after the first question mark. The following sections describe the URL path and URL parameters to help you modify the URLs to meet your requirements.

Example Code

The following examples show the code provided in the template for different strategy selections.

Default Personalization (No Strategy)
<a href="https://my-apps-domain.com/offers/widget/email/${SITE_ID}/link/1?n=${TOTAL_NUM_RECS}
 <img src="https://my-apps-domain.com/offers/widget/email/${SITE_ID}/image/1?n=${TOTAL_NUM_RECS}
Also Bought Strategy
<a href="https://my-apps-domain.com/offers/widget/email/${SITE_ID}/ab/link/1?n=${TOTAL_NUM_RECS}
 <img src="https://my-apps-domain.com/offers/widget/email/${SITE_ID}/ab/image/1?n=${TOTAL_NUM_RECS}
Trending Strategy
<a href="https://my-apps-domain.com/offers/widget/email/${SITE_ID}/tr/link/1?n=${TOTAL_NUM_RECS}
 <img src="https://my-apps-domain.com/offers/widget/email/${SITE_ID}/tr/image/1?n=${TOTAL_NUM_RECS}

URL Path

The URL path includes three important details:

  • The unique domain used for your instance of Oracle Adaptive Intelligent Apps for CX.

    This value never changes and is in all your email template URLs.

  • The type of URL, either link or image.

  • The number representing the placement identifier, such as 1.

    This value ensures that the first recommended product appears in position one, the second in position two, and so on. For example, if you're showing three recommended products and all URLs had a placement value of 1, then all three positions would show the exact same product.

URL Parameters

URL parameters are based on elements you can include in your URLs. The application uses these parameters to identify the consumer. If the consumer is unknown, the application uses a cached default ID to identify the consumer until it obtains enough data to create the consumer profile. The cached ID ensures the relevant content is viewed in the future until the cache is cleared.

The following table describes each URL parameter with sample values. Values for all parameters are required.

Parameter Description Value Example
e The SHA256 hash email address of the email recipient ${EMAIL_SHA256_HASH_} fa07e998e86f7f7a27ae3
eid A unique string ID representing the email recipient and the email campaign. This value ensures that you capture a unique identifier for the recipient and campaign when the consumer opens the email for the first time. ${RIID_}${campaign.id?html}${launch.id?html}
d The default product ID to display when the consumer email address is unknown. Increment the numeric value to represent the position in your email. Must be defined last. ${DEFAULT_PRODUCT_ID_#} product123
n The maximum number of product recommendations in the email. ${TOTAL_NUM_RECS} 6
pf Product filter applied after running adaptive intelligence algorithms. ${PRODUCT_FILTER}

{"strategy": "alsoBought", "id": "product-123"}

{"strategy": "trending", "minPrice": 0.99, "minOrders": 4, "interval": "WEEK"}

pid The ID of the product that Also Bought is based on. ${PRODUCT_ID} product345

Configuring Oracle Responsys

This topic describes best practices and steps in Oracle Responsys to configure event tracking, set dynamic variables for product default values, and address any responsive design considerations.

Event Tracking

It's best practice to configure event tracking in Oracle Responsys by creating a link table for your email campaign. This way you can manually add rows for each product placement position. Adding the rows directly to the link table as shown in these steps instead of generating them automatically avoids duplication of work and manual edits to HTML files.

  1. Create a link table and add a row for each product placement position. Use link names that you can easily identify in your reports as shown in this example.

    Link tracking page listing link name examples: AI_RECS_PLACEMENT_1, AI_RECS_PLACEMENT_2, AI_RECS_PLACEMENT_3

  2. Within your email design in the rules editor, apply the href value for your links, using the following format:

    ${clickthrough('AI_RECS_PLACEMENT_1','SITE_ID','TOTAL_NUM_RECS','EMAIL_SHA256_HASH_','PRODUCT_FILTER','RIID_','DEFAULT_PRODUCT_ID_1', 'launch.id','campaign.id')}

    Rules editor window showing three different placements of the clickthrough href

  3. Apply the values for image source URLs as you would for any other image in the email.

  4. To apply styling and scaling to make the images fit within your existing template, add the appropriate HTML code. For example, <img style="border:none;" width="320" src="img_url">

Default Values and Dynamic Variables

It's best practice to configure default values and dynamic variables on the Data Sources page in Oracle Responsys. The dynamic variables determine which recommendations to display based on the values you provide.

Data sources page showing three defined dynamic variables: DEFAULT_PRODUCT_ID_1, DEFAULT_PRODUCT_ID_2, DEFAULT_PRODUCT_ID_3, CATEGORIES_FILTER

Important: The template code expects variables named DEFAULT_PRODUCT_ID_# where the # is replaced by the placement number. When supplying multiple values, such as IDs in PRODUCT_FILTER, ensure to use use comma separators with no leading or trailing space characters.

Responsive Design

You can apply any mobile optimization or responsive design in Oracle Responsys, as required. For example, you might want alternative content flows for mobile devices, such as wraps, hidden, or visible. Work with your HTML designer to manage mobile optimization or responsive design within your email template.