Introduction
In the evolving e-commerce landscape, personalization has emerged as a successful marketing strategy, effectively transforming the way we approach our customers. It is no longer just about recommending products to customers; it is about recommending the right products, based on individual user's browsing and purchasing behavior.
In this article, we will discuss how to recommend a product to users based on their actions. Actions include viewing a product, adding it to wishlist, adding it to cart, and other related information in the attributes such as the category, price, and so on. We follow the steps below to achieve this use case:
- Create a Recommendation with "Recommended items" model.
- Create a Flow with "Product Viewed" as the entry criteria.
- Send a Push Notification with the recommended product.
Expected Result
Users receive a Push Notification on their phones, with recommendations of a product:
library_add_check |
Prerequisites
|
Create a Recommendation
In this section, let us create a recommendation based on the users action.
- Navigate to the MoEngage Dashboard and select Content > Recommendations from the left navigation. The Recommendations page is displayed. For more information, refer to Creating User Action Recommendations.
- At the top right corner, click + Create recommendation. It takes you to the first step "Select recommendation model".
- Under Predictive, click the Recommended items card. This is suitable for our use case because this model considers the previous action that the user has done (such as viewing product, adding to wishlist, adding to cart, purchasing and other related information in the attributes such as the category, price, and so on) and takes the help of SHERPA AI to predict what other products would the same user prefer.
- Click Next. It takes you to the second step "Create recommendation". Enter the following details:
- Recommendation name: Enter a name for the recommendation. For example, "Recommended Products". This will be the name through which you will refer the output of this recommendation model.
- Recommendation description: Enter a description for the recommendation. This description will help you understand what the model is aimed at.
-
Catalog: Select the catalog that has all the list of products offered by you with all the related information.
- Click Create to save the changes and run the model.
Please note that this will take 24 hours. You can find the status of the model on the Recommendations home page:
The Recommendation engine shares the set of products a user might prefer based on their historical actions.
Now that we created the recommendation, let us create our Flow to nudge people about the product that they have viewed but not purchased.
Create a Flow
In this section, let us create a Flow to nudge your customers to recommend products to your users.
Add Flow Details
- Navigate to Engage > Flows and click + Create Flow or navigate to the sidebar, click + Create new, and then click Flow.
- Click + Start with a blank canvas to start building your flow for the use case. You are taken to the first step “Details and goals”.
- Enter the following details:
- Flow name: Enter a name for the flow. For example, "Recommend Products".
- Flow tags: Select the required flow tags.
- Under the Conversion goal section, turn the Exit on conversion toggle on to exit users who convert by doing the event "Product Purchased". This is your primary conversion goal, which triggers when a user purchases a product.
- Click Next to move the second step “When will users enter the flow”. This step helps you define when to allow the user by mentioning the trigger conditions. For our example, the event can be “Product Viewed”.
- In the IF user section, select the event “Product Viewed”, which gets triggered when a user visits a product page or views it .
- In the Flow Schedule section, define a start time and an end time to the flow if required. By default, the flow will start “As soon as possible” and will never end.
- Turn the Limit user entry into this flow toggle on to define the maximum time a user can enter the flow.
Please note that the users are highly likely to match this Flow’s entry rules more often and thus might enter the flow too many times. Defining such limits helps you control users from re-entering the flow repeatedly and thus avoid spamming them too much, which in turn provides a better user experience. - Click Next to move to the third step “Who will enter the flow”. This is where you select the target audience and control groups for your Flow.
- In the Audience section, select users who have not purchased in the last 30 days.
- Click Next to move to the canvas section where you can define the Flow structure that you want the user to move through.
Define Flow Structure
- Click the + icon. A drawer is displayed from where you can choose an action campaign from the range of options under Actions including Push, Email, SMS, or WhatsApp to send a message. You can also display a banner on the On-site or In-app channel, or use Facebook or Google remarketing.
For this example, let us add a Push action and explain how to use the recommendation predicted by SHERPA of MoEngage in Flows. - Click Push to add a stage. Hover your mouse on the stage and click the edit icon to start defining the stage.
- In the Campaign Name field, enter the campaign name. For example, "Recommend Products"
- In the Target Platforms section, select Android. You can select other platforms you like to target.
- Select a template as per your wish. For this example, select Basic notification.
- Enter the required content. You can add a title or generate it using Merlin AI. For more information, refer to Generate Push Messages with Merlin AI.
- While defining the message, select the product set that is generated through the recommendation that you defined. Enter “@” and search for “RecommendedProducts”, the name of the recommendation that you built, in the Push Personalization pop-up.
- Click Done. The following JINJA code is inserted in the Message field:
- Edit the code to run a loop through each product and list down the first suggestion because the highly confident suggestions come first from the Recommendation engine. The higher the confidence the topper the product will be in the list. The final JINJA looks as follows:
{% if ProductSet.RecommendedProducts%}
{% for product in ProductSet.RecommendedProducts[0:1]%}
{{product.product_name}} at {{product.price}}
{% endfor %}
{% else %}
MOE_NOT_SEND
{% endif %} - Enter the following code to get the image of the product selected above:
{% if ProductSet.RecommendedProducts%}
{% for product in ProductSet.RecommendedProducts[0:1]%}
{{product.image_url}}
{% endfor %}
{% else %}
MOE_NOT_SEND
{% endif %} - Add a deeplink to the Push Notification by mentioning the URL that will directly take them to the mentioned product’s page or home screen of the app. This reduces the possibility of a user dropping off before finding the suggested content. For the former, the following is the JINJA code:
{% if ProductSet.RecommendedProducts%}
{% for product in ProductSet.RecommendedProducts[0:1]%}
{{product.product_url}}
{% endfor %}
{% else %}
MOE_NOT_SEND
{% endif %} - If you have additional information about the users such as their name and gender, use the same to personalize the message while editing your action campaign. Also, including such details helps making the message more contextual and thereby increasing the chance of making the user feel connected and extend their stay. For more information, refer to Personalization in Flows.
- Click Done to save your changes.
- After defining an Action campaign, add a Has done event stage to check if the user has converted by choosing the "Product Purchased" event from the drop-down list or any other goal of yours.
- Turn the Keep evaluating for the next toggle on to define the maximum time to wait for the user to execute the event. You can select any time limit that you deem fit.
- Add as many action campaigns you want to nudge the user. Make sure to have some gap between any two communications to avoid spamming the user by using a Wait stage, especially in the Yes path of your “Has done events”. For more information, refer to Add Controls to Flow.
- Click Publish.
Conclusion
In this use case, we recommended a product to users based on their actions to drive their first purchase. We created a Flow with "Product Viewed" as the entry criteria and sent a Push Notification with the recommended product.
Now that we have published the campaign for our use case using Recommendations, we can check out other possibilities of MoEngage’s Recommendations.