> ## Documentation Index
> Fetch the complete documentation index at: https://voucherify-mk-currency-discount.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create discounts dependable on currency

> Use dynamic discounts to apply discount values based on customer 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. 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 in **Project settings** > **Metadata schema** with the following settings:

* **Property name (key)**: `Currency`
* **Requirement**: optional
* **Value**: single
* **Type**: String
* **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 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.

<Steps>
  <Step title="Select amount discount">
    In the discount builder, select an amount discount.

    In **Discount Type**, select **Amount discount: Apply to whole cart**.
  </Step>

  <Step title="Build formula">
    Enter the default discount value for the campaign.

    Use **Build formula** next to **Discount Amount (USD)**.
  </Step>

  <Step title="Select switch operator">
    Use the `switch` logical operator in the dynamic discount formula.

    Set the switch expression to the customer metadata `Currency`.
  </Step>

  <Step title="Add currency cases">
    Add one case for each currency you support.

    In this example:

    * `USD` returns `20`
    * `EUR` returns `15`
    * `GBP` returns `17`
  </Step>

  <Step title="Set the formula fallback value">
    Set the fallback value to `20`.

    The fallback value is used when none of the currency cases match.
  </Step>
</Steps>

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.

## 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

<AccordionGroup>
  <Accordion title="Dynamic formula builder">
    Use [dynamic formula builder](/optimize/dynamic-formula-builder) to calculate discount values from metadata and logical operators, such as `switch`.
  </Accordion>
</AccordionGroup>
