In this example we will add a Top Rated badge to our highest rated products. In order for this to work, we will need to have a parameter which contains the rating value of our products as well as the badge itself designed in Figma. For the sake of the example, let's assume our rating parameter is called star_rating and our badge is called Top rated badge.
We want to assign the Top Rated badge only to products that have a rating of 4 or higher.
First step is to select the project and design which you want to apply the above settings to. Select the project under the Teams section and then click on the design of your choice. Next, head over to the design manager by clicking on Edit in Design Manager on your left hand side (under the design image).
Select the Layer Settings and click the + sign next to the Top rated badge element. From the dropdown list select Conditional Settings and use the following formula:
if star_rating number greater than 4
then Show
Next, click on "Add action" below the newly created setting, and use the following:
if star_rating number less than 4
then Hide
This way, we have successfully assigned the Top Rated badge on all of the products that have a star rating higher than 4. Keep in mind that the above case is just an example and can be used in variety of ways without being limited to elements like badges etc.