From 6d51e9c8f752e59f9d838893638f37fa4e1eb2e6 Mon Sep 17 00:00:00 2001 From: MaciekVoucherify <130568368+MaciekVoucherify@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:36:22 +0200 Subject: [PATCH 1/3] Currency discount --- .../discounts-dependable-on-currency.mdx | 84 +++++++++++++++++++ documentation/docs.json | 1 + 2 files changed, 85 insertions(+) create mode 100644 documentation/build/discounts-dependable-on-currency.mdx diff --git a/documentation/build/discounts-dependable-on-currency.mdx b/documentation/build/discounts-dependable-on-currency.mdx new file mode 100644 index 000000000..86309cf66 --- /dev/null +++ b/documentation/build/discounts-dependable-on-currency.mdx @@ -0,0 +1,84 @@ +--- +title: "Create discounts dependable on currency" +description: "Use dynamic discounts to apply discount values based on customer currency" +keywords: ['dynamic discounts', 'currency', 'metadata', 'discounts', 'campaigns'] +--- + +When you sell in multiple currencies, a fixed amount discount may not have the same value for every customer. For example, a \$20 discount in one currency may need an equivalent value in EUR, PLN, or another currency. + +With dynamic discounts, you can set different discount values based on customer currency metadata. + +## 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](/prepare/metadata). + +In this example, create customer metadata with the following settings: + +- **Property name (key)**: `Currency` +- **Requirement**: optional +- **Value**: single +- **Type**: String +- **Allowed values**: `USD`, `EUR`, `PLN` + +The discount formula uses this metadata to return the correct discount value for each currency. + +## Create a dynamic discount + +Create an amount discount and use a dynamic formula to calculate the discount value based on customer currency metadata. + + + + In the discount builder, select an amount discount. + + In **Apply discount to**, select **Apply discount to whole cart**. + + + + Set the default discount value for the campaign. + + In this example, the default discount is `$20` off the entire order. + + + + Use the `switch` logical operator in the dynamic discount formula. + + Set the switch expression to the customer metadata `Currency`. + + + + Add one case for each currency you support. + + In this example: + + - `usd` returns `20` + - `eur` returns `15` + - `pln` returns `100` + + + + Set the default value to `20`. + + The default value is used when none of the currency cases match. + + + +After you save the formula, Voucherify applies the discount value that matches the customer's currency metadata. Each currency can have a different discount value that is equivalent to the default currency discount. + +You can use discounts dependable on currency with every discount type, including product-specific promotions. + +## 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 + + + + Use [dynamic formula builder](/optimize/dynamic-formula-builder) to calculate discount values from metadata and logical operators, such as `switch`. + + \ No newline at end of file diff --git a/documentation/docs.json b/documentation/docs.json index 179562614..24744d7d9 100644 --- a/documentation/docs.json +++ b/documentation/docs.json @@ -229,6 +229,7 @@ "build/create-discount-coupons", "build/create-discount-promotions", "build/discount-types-and-effects", + "build/discounts-dependable-on-currency", "build/discount-code-import", "build/product-bundles" ] From 4d0e26d9069c93355469cb4649f182aa88e5f8f8 Mon Sep 17 00:00:00 2001 From: MaciekVoucherify <130568368+MaciekVoucherify@users.noreply.github.com> Date: Fri, 12 Jun 2026 13:51:10 +0200 Subject: [PATCH 2/3] Update discounts-dependable-on-currency.mdx --- .../discounts-dependable-on-currency.mdx | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/documentation/build/discounts-dependable-on-currency.mdx b/documentation/build/discounts-dependable-on-currency.mdx index 86309cf66..08314d147 100644 --- a/documentation/build/discounts-dependable-on-currency.mdx +++ b/documentation/build/discounts-dependable-on-currency.mdx @@ -4,42 +4,46 @@ description: "Use dynamic discounts to apply discount values based on customer c keywords: ['dynamic discounts', 'currency', 'metadata', 'discounts', 'campaigns'] --- -When you sell in multiple currencies, a fixed amount discount may not have the same value for every customer. For example, a \$20 discount in one currency may need an equivalent value in EUR, PLN, or another currency. +When you sell in multiple currencies, a fixed amount discount may not have the same value for every customer. For example, a \$20 discount in USD may need an equivalent value in EUR, GBP, or another currency. -With dynamic discounts, you can set different discount values based on customer currency metadata. +With dynamic discounts, you can set different discount values based on customer currency metadata. You can use discounts dependable on currency with every discount type that supports dynamic discounts, including product-specific promotions. ## 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](/prepare/metadata). -In this example, create customer metadata with the following settings: +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`, `PLN` +- **Allowed values**: `USD`, `EUR`, `GBP` The discount formula uses this metadata to return the correct discount value for each currency. ## Create a dynamic discount -Create an amount discount and use a dynamic formula to calculate the discount value based on customer currency metadata. +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. In the discount builder, select an amount discount. - In **Apply discount to**, select **Apply discount to whole cart**. + In **Discount Type**, select **Amount discount: Apply to whole cart**. - - Set the default discount value for the campaign. + + Enter the default discount value for the campaign. In this example, the default discount is `$20` off the entire order. + + Use **Build formula** next to **Discount Amount (USD)**. - + Use the `switch` logical operator in the dynamic discount formula. Set the switch expression to the customer metadata `Currency`. @@ -50,9 +54,9 @@ Create an amount discount and use a dynamic formula to calculate the discount va In this example: - - `usd` returns `20` - - `eur` returns `15` - - `pln` returns `100` + - `USD` returns `20` + - `EUR` returns `15` + - `GBP` returns `17` @@ -64,8 +68,6 @@ Create an amount discount and use a dynamic formula to calculate the discount va After you save the formula, Voucherify applies the discount value that matches the customer's currency metadata. Each currency can have a different discount value that is equivalent to the default currency discount. -You can use discounts dependable on currency with every discount type, including product-specific promotions. - ## Example use cases You can use discounts dependable on currency in scenarios such as: From b5fbe82cbb8b9ebf3babdee366c0bfc90701cc7f Mon Sep 17 00:00:00 2001 From: MaciekVoucherify <130568368+MaciekVoucherify@users.noreply.github.com> Date: Fri, 19 Jun 2026 14:41:59 +0200 Subject: [PATCH 3/3] Update discounts-dependable-on-currency.mdx --- documentation/build/discounts-dependable-on-currency.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/documentation/build/discounts-dependable-on-currency.mdx b/documentation/build/discounts-dependable-on-currency.mdx index 08314d147..fdc43a8f6 100644 --- a/documentation/build/discounts-dependable-on-currency.mdx +++ b/documentation/build/discounts-dependable-on-currency.mdx @@ -38,8 +38,6 @@ In this example, create an amount discount with `$20` off the entire order as th Enter the default discount value for the campaign. - In this example, the default discount is `$20` off the entire order. - Use **Build formula** next to **Discount Amount (USD)**. @@ -59,10 +57,10 @@ In this example, create an amount discount with `$20` off the entire order as th - `GBP` returns `17` - - Set the default value to `20`. + + Set the fallback value to `20`. - The default value is used when none of the currency cases match. + The fallback value is used when none of the currency cases match.