Configure currency metadata
Voucherify needs to receive the customer currency value before it can use it in a dynamic discount formula. The metadata definition and data flow should be handled by your integration team. Learn more about metadata. In this example, create customer metadata in Project settings > Metadata schema with the following settings:- Property name (key):
Currency - Requirement: optional
- Value: single
- Type: String
- Allowed values:
USD,EUR,GBP
Create a dynamic discount
Create a discount and use a dynamic formula to calculate the discount value based on customer currency metadata. In this example, create an amount discount with$20 off the entire order as the default discount. Currency cases in the formula change this value when the customer metadata matches a supported currency.
1
Select amount discount
In the discount builder, select an amount discount.In Discount Type, select Amount discount: Apply to whole cart.
2
Build formula
Enter the default discount value for the campaign.Use Build formula next to Discount Amount (USD).
3
Select switch operator
Use the
switch logical operator in the dynamic discount formula.Set the switch expression to the customer metadata Currency.4
Add currency cases
Add one case for each currency you support.In this example:
USDreturns20EURreturns15GBPreturns17
5
Set the formula fallback value
Set the fallback value to
20.The fallback value is used when none of the currency cases match.Example use cases
You can use discounts dependable on currency in scenarios such as:- promotions run in different countries with multiple currencies
- POS and online shopping
- product-specific promotions
- customer segments based on preferences or profile data
Related features
Dynamic formula builder
Dynamic formula builder
Use dynamic formula builder to calculate discount values from metadata and logical operators, such as
switch.
