You can build a Product Recommendations for Email experience with a recommendations action that dynamically sends the filters within the recommendation strategy used in the action. This filtering performed at run time is accomplished with a pass-through parameter in the email's HTML code.
For example, you want to recommend popular products to customers via email. For the first week of the campaign, you want those recommendations filtered for brand A. For the second week you want them filtered for brand B. You can accomplish this change with a simple edit you generate for the email experience.
Adding a Run-Time Filter to a Recommendation Strategy
Follow these steps to add a run-time filter to a recommendation strategy.
- Create or navigate to the recommendation strategy you want to use in the Product Recommendations for Email experience. See Create a Recommendation Strategy for the task steps.
- Click ADD FILTER, and then select the attribute on which you want to filter the recommendations.
- Select the operator for the filter equation.
- Click USE DYNAMIC VALUE.
- Select the dynamic value option that contains with Run-Time Filter.
- Click SAVE.
The recommendation strategy is ready to add to a Product Recommendations for Email experience.
Creating the Product Recommendations for Email Experience
Follow these steps to create the Product Recommendations for Email experience.
- Click EXPERIENCES in the top navigation bar, and then select Web.
- Click the drop-down arrow to the right of CREATE EXPERIENCE, and then select Product Recommendations for Email.
- Click the pencil icon, enter a name for the experience, and then click the green checkmark icon to save the name.
- Click WHAT and then click ADD ACTION.
- Click Product Recommendations for Email on the Action Type panel.
- Click the action template that you want to use.
- Select from Rec Strategy A the recommendation strategy that contains the run-time filter.
- Configure the other settings in the Required Inputs section. See Create a Product Recommendations for Email Experience for more information.
- Click CREATE.
- Click GENERATE EMAIL HTML.
- Scroll horizontally to find each occurrence of the
$runTimeFilter
placeholder in the email HTML code. Replace each occurrence of$runTimeFilter
with the value of the attribute you selected in step 2 of Adding a Run-Time Filter to a Recommendation Strategy (for example, a specific brand name if you selected Brand for the recommendation filter). - Click COPY TO CLIPBOARD and then paste the HTML into your ESP email template.
- Replace all references to the
$customer_id
token, found in both image URLs and link URLs within the generated HTML, with your ESP's customer identifier.