In this example, we will add a "bestseller" badge that will be reflected on products that are our bestsellers. When you followed the above steps, you may start creating a new layer inside Figma where you will design your badge according to your needs. For the sake of this example, we can name the element "bestseller_badge". First, you will need to map your data within Figma using Cropink's dedicated plugin. The following article describes the entire process - Mapping layers with data in Figma.
Once you are finished with the design, make sure to add it in the "Manageable Layers" tab in the Cropink's plugin window. Next, simply hit "Publish in Cropink".
Once published, head back to Cropink and select your design. Next, click on on "Edit in Design Manager" and then on "Layers Settings". In there, you will see the elements that have been mapped to parameters imported from your source feed.
In order to properly filter out our products by bestsellers, inside the feed we will need a parameters which differentiates them from the rest and defines them as products. Intuitively, such parameter can be named "bestseller" and contain a value of "yes", "1" etc.
Once we have everything set, click the + symbol next to the "bestseller_badge" element which we just imported from our Figma project, and select "Data Mapping" and choose the parameter you want to map it with. In this case it will be the "bestseller" parameter from our source feed. Next, click the + symbol again and this time choose "Conditional Settings". Once done, go by the following setting:
if bestseller is empty
then Hide
This way, we have successfully filtered out products on which the bestseller badge will be displayed and, of course, it will only be visible for our bestsellers.