For the complete documentation index, see llms.txt. This page is also available as Markdown.

Recommendation

Render personalized product recommendations from customer behavior and selected records.

Documentation

Overview

With the ff-recommendation you can display a set of records which are presented to users based on their search history and their last purchased products as well as their product views.

The recommendation service learns the shopping behavior for each user and creates a list of records which can be displayed to them.

Inside the ff-recommendation element you define an ff-record-list to display the recommended products. This ff-record-list does not listen to the default search result and gets its records from the recommendation service.

<ff-recommendation>
    <div class="recommendationHeader">Recommendations</div>

    <ff-record-list subscribe="false">
        <!-- In this demo, a click on the product sets the recommendation product. -->
        <ff-record>
            <img data-image="{{record.ImageName}}">
            <div>
                <a href="https://www.bergfreunde.de/{{record.Deeplink}}" data-action="redirect">
                    {{record.Title}}
                </a>
                <div>Price: <strong>{{record.Price}} €</strong></div>
            </div>
        </ff-record>
    </ff-record-list>
</ff-recommendation>

Attributes

max-results

The max-results attribute defines how many records should load. It defaults to 4.

record-id

Set record-id to load records recommended for one product. Use a comma-separated list for several record IDs.

subscribe

Use subscribe to control whether ff-recommendation listens to the recommendation service. It defaults to true.

use-perso

Use use-perso to control personalization for this recommendation. It defaults to false and overrides the ff-communication setting.

Demo

API code

Properties

Properties
Name
Description

record-id (String, default: empty)

Product record ID used to load recommendations. Separate several IDs with commas.

max-results (Number, default: 4)

Maximum number of recommended products.

use-perso (String, default: "false")

Enables personalization for this component. Overrides ff-communication.

subscribe (String, default: "true")

Controls whether the element receives recommendation events.

Methods

Methods
Name
Description

getRecommendations()

Loads product recommendations again.

Last updated

Was this helpful?