Skip to main content

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_idtitledescriptionpriceprice_numimage_urllocalesizescolors
1Product ADescription of Product A$19.9919.99https://example.org/product-a.jpgenS,M,Lred,blue
2Product BDescription of Product B$29.9929.99https://example.org/product-b.jpgenM,L,XLgreen,yellow
3Product CDescription of Product C$39.9939.99https://example.org/product-c.jpgdeS,Mblack,white
  • reference_id: Unique identifier for the product
  • title: 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.

tip

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.