Product Recommendations
You can use LoyJoy to provide personalized product recommendations to your customers based on their preferences, behavior, or other criteria. Here's how you can do it.
See also this questionnaire-based product feed template and this AI product recommender template that you can easily import into your LoyJoy account for a working example.
1. Upload Products to the Product Database
First you have to upload the products to the LoyJoy product database via Excel/CSV upload or API.
Each product should have a unique identifier (reference_id), such as a product
ID, and relevant information such as title, description, price, image URL, and
any other fields you want to use for filtering or displaying the products.
Example:
| reference_id | title | description | price | price_num | image_url | locale | sizes | colors |
|---|---|---|---|---|---|---|---|---|
| 1 | Product A | Description of Product A | $19.99 | 19.99 | https://example.org/product-a.jpg | en | S,M,L | red,blue |
| 2 | Product B | Description of Product B | $29.99 | 29.99 | https://example.org/product-b.jpg | en | M,L,XL | green,yellow |
| 3 | Product C | Description of Product C | $39.99 | 39.99 | https://example.org/product-c.jpg | de | S,M | black,white |
reference_id: Unique identifier for the producttitle: Name of the product (shown in chat)description: Description of the product (shown in chat)price: Price of the product (text with currency symbol, shown in chat)image_url: URL to the product image (shown in chat)locale: Locale of the product (used for displaying the correct product based on user's locale)price_num,sizes,colors: Additional fields for filtering products (not shown in chat)
You can add more products by adding more rows to this table. You can also include custom fields that are relevant to your products and use them for filtering or displaying the products in a specific way.
By setting the reference_id, you can always upload your products again and the existing products will be updated instead of duplicated. This way, you can keep your product database up to date by regularly uploading the latest product information.
2. Use the Product Feed Module to Display Recommendations
To display product recommendations in the chat, you can use the Product Feed
module. This module allows you
to show a list of products that match certain criteria, such as user preferences
or behavior. Simply add a questionnaire module in which you save the user's
preferences in variables (e.g. size, color, price) and then add a Product
Feed module that is connected to the product database. In the Product Feed
module, you set the connector to the product database and add an SQL query that
filters the products based on the user's preferences, see also here. For example:
SELECT * FROM products WHERE sizes LIKE '%${size}%' AND colors LIKE '%${color}%' AND price_num <= ${price};
3. Use the AI Agent Module for Personalized Recommendations
Alternatively, you can use the AI Agent
module to provide personalized product
recommendations. You can set up an AI agent with a products_search tool that
queries the product database based on user input or preferences. The AI agent
can then reply with the product information or use the products_display tool
to show the search results in a product gallery format.