Apply per-currency discounts with Shopify Markets
In this tutorial, let's use Shopify Markets and Talon.One to apply a discount that depends on the customer's currency.
Let's imagine you want to give customers paying in Argentine Peso (ARS) a 20% discount, and customers paying in all other currencies a 10% discount. You can do this by creating a market in Shopify and a rule in Talon.One that checks the customer's market currency.
Talon.One requirements
- You are an admin user.
- You have set up an Application and a campaign.
Shopify requirements
- Discount effects require network access for Shopify Functions, which is available with Shopify for enterprise. Shopify support must explicitly enable network access for Shopify Functions.
- Discounts are applied via the Storefront API
using the
@deferdirective. If a store uses the Ajax API to manage the cart, discounts won't be visible until the customer reaches checkout. - Discounts are managed in Talon.One and not synchronized to Shopify. They are applied and displayed in the storefront, but won't appear in the Discounts section of the Shopify admin.
- The Shopify integration only supports case insensitive coupons. In the Application settings, ensure the Case Insensitive, stored in uppercase (recommended) option is selected.
- You cannot apply multiple coupons offering the same type of discount to the same order. For example, you cannot apply two coupons that both offer shipping discounts to the same order.
- If you are using both shipping and order/item discounts, ensure your campaign evaluation order is set up so that shipping discounts are evaluated after order/item discounts.
- You are an administrator user.
- You have completed the basic setup of the Talon.One Shopify app and enabled Shopify Markets support.
Set up the integration
Set up markets in Shopify
Ensure your markets are set up in Shopify. You can use existing markets or create new ones as needed.
- In Shopify, open Settings > Markets.
- Review or create markets with the currencies you want to target. For this example, ensure you have a market that uses the Argentine Peso (ARS $) currency.
Create rules in Talon.One
Let's create two rules in Talon.One that apply a discount depending on the customer's currency.
The currency is stored as a three-letter currency code, so we check for ARS to apply the
discount for Argentine Peso.
-
Create a rule that applies a 20% discount to customers paying in Argentine Peso:
What Name Properties Conditions Check attribute value - shopify currency (Current Session) is equal to
ARSEffects Discount session total - Discount name:
ARS discount - Discount value: [Session.Total]
* 20%
- Discount name:
-
Create another rule that applies a 10% discount to customers paying in all other currencies:
What Name Properties Conditions Check attribute value - shopify currency (Current Session) is not equal to
ARSEffects Discount session total - Discount name:
Other currencies discount - Discount value: [Session.Total]
* 10%
- Discount name:
-
Save the rules.
-
Activate the campaign.
Test the integration
- In Shopify, add a product to your cart and proceed to checkout.
- Set your checkout address to a market that uses Argentine Peso (ARS) currency.
- Verify that the 20% discount is applied to your order.
- Repeat the checkout with an address in a market that uses a different currency and verify that the 10% discount is applied instead.