Skip to main content

Modify Your Design Based on Discount Percentage

Updated yesterday

You can use the discount percentage value from your feed to automatically modify elements in your design — for example, to highlight stronger promotions with different colors or styles.

A common use case is changing the badge color when a product crosses a certain discount threshold (e.g., >30%). This helps you visually emphasize high-value deals in your ads without manually editing anything.

Step 1: Make sure discount_percentage is available

Cropink automatically calculates and exposes a variable called discount_percentage when your feed contains:

  • price, and

  • sale_price

Example:

id

price

sale_price

discount_percentage

101

100

70

30

102

200

120

40

103

79

79

0

You can use this variable in Conditional Properties to modify visuals based on discount level.

Step 2: Apply conditional properties in Cropink

  1. Open your project → select the design.

  2. Click Edit in Design Manager → open Manageable Layers.

  3. Select the promo_badge layer.

  4. Choose Conditional Properties.

  5. Create a new rule:

if discount_percentage is greater than 30 then Fill Color #FF0000

You can choose any color you want — for example red, orange, gold, etc.

This rule changes the badge color only for products with a discount above 30%.

Step 3: Add more variations (optional)

You can add multiple thresholds to create more advanced visual logic:

Examples:

High discount (>50%)

Fill Color #D40000

Medium discount (between 20% and 50%)

Fill Color #FF9900

Low discount (<20%)

Fill Color #F2CC00

This lets you build a traffic-light style discount system directly inside your creatives.

Step 4: Save & preview

Click Save Changes and check your preview.
Products with higher discount percentages will now automatically display with the new badge color you’ve defined.

💡 Tip: You can use discount_percentage not only for color changes, but also for:

  • changing text style (i.e. color/font)

  • changing border color

  • showing or hiding entire promotional sections

That’s it!
You've just created a dynamic visual rule based on discount percentage — a powerful way to highlight promotions automatically and make your ads more engaging.

Did this answer your question?