Multi-Currency Sites

The Salesforce B2C Commerce multi-currency sites feature enables you to sell products in multiple countries or regions. You use the feature so that your customers can browse products and checkout carts in their preferred purchase currencies.

You can sell in multiple countries using different currencies with a single site. A single multi-currency site can support up to 150 currencies.

Consider using this feature when:

  • You want to have multi-currency sites where product prices, shipping methods, shipping costs, payment methods, and promotions vary by currency.
  • Your site logic and design, catalog and content, search and merchandising rules, customers, inventory, third-party integrations, and order management are the same across all currencies.

Support for multi-currency sites is Limited to certain areas of B2C Commerce.

Session Currency

Multi-currency sites depend on Session Currency. Before Release 14.2, B2C Commerce used the site currency to perform functions such as price lookups, basket calculations, checkout operations, order placement, and calculations. Starting with Release 14.2, B2C Commerce can use the session currency instead.

When a customer first accesses your storefront, the customer's session currency is initialized with the default currency for your site. B2C Commerce uses the default currency as the session currency unless the customer selects a different preferred currency. You use custom business logic to give the customer this ability.

B2C Commerce always remembers and properly restores the session currency when a customer returns to the storefront. However, the session currency for a given customer can become invalid. For example, if the site administrator removes an allowed currency. In this and similar scenarios, B2C Commerce resets the session currency to the default site currency the next time the customer accesses the storefront.

The session currency must be one of the allowed currencies configured for the site. The customer can’t check out or create an order with an invalid currency.

Reports and Analytics

The following features that report revenue amounts support multi-currency sites:

Feature Comments
A/B Testing If the order is placed in the context of an A/B test, A/B test statistics reflect the converted monetary value.
Active Data Customer active data for the customer placing the order and product active data for the ordered products are changed to reflect the converted money values.
Reports & Dashboards You can change the realm currency setting so that aggregated realm data for all your sites shows in the selected currency.

These features use storefront purchase data to provide revenue metrics that you can view or use for search sorting or customer segmentation. When B2C Commerce records a revenue event, all monetary values are converted to the site's default currency. The conversion uses the exchange rate applicable for that day.

For example, a site's default currency is US Dollar (USD), but the site supports both USD and Euro (EUR). When a customer places an order using Euro for payment, the order values are converted from EUR to USD using that day's exchange rate.

B2C Commerce does not provide separate reporting for each currency. The exchange rate service is internal to B2C Commerce and not viewable in Business Manager or available through the B2C Commerce API. Because the values are based on an exchange rate service that is regularly updated, the metrics provided by these subsystems are appropriate in a multi-currency scenario.

Implementation Considerations

Consider the following implementation tasks when planning a multi-currency site:

Implementation task Description Who does it?
Configure allowed currencies for the site When a site is first created, a single default currency is specified. After the site is created, you can add allowed currencies for the site. Merchant
Create price books for each currency B2C Commerce looks up prices using the session currency, and each price book is specific to a single currency. If you want to support three currencies, you must create at least three price books, one for each currency. Merchant
Configure promotions to account for currency When you configure a promotion, you can optionally specify a currency. If the promotion applies to all currencies, for example, 10% off, you can either select a specific currency, for example, EURO, or 'All'. You can create a promotion for a specific currency. However, the promotion applies only when the customer selects the specified currency as the session currency. Merchant
Configure payment methods to specify a currency When you configure a payment method, you can optionally specify one or more allowed currencies. If you don't specify a currency, when you create a payment method, all allowed currencies are accepted by default. You can restrict the payment method to one or more currencies. However, the payment method only applies when the customer selects one of the specified currencies as the session currency. You also can specify minimum and maximum payment ranges for each allowed currency. Merchant
Configure shipping methods to specify a currency When you configure a shipping method, you can optionally specify an allowed currency. If you don't specify a currency, the default currency for the site is used instead. The shipping method applies only when the customer selects the specified currency as the session currency. Merchant
Customize your storefront to enable the customer to select a preferred currency

Your storefront must enable customers to select a preferred currency from a list of allowed currencies. You can use the dw.system.Session B2C Commerce Script API object to set the session currency. See APIs for Multi-Currency Sites later in this topic.

Developer
Modify your import process to account for changes related to multi-currency sites For more information, see Import and Export for Multiple-Currency Sites later in this topic. Developer

Import and Export for Multiple-Currency Sites

The following XML schemas elements support multi-currency sites:

  • shipping.xsd: the shipping element child element, currency.
  • promotion.xsd: the promotion element child element, currency.
  • paymentmethod.xsd: the payment-method and payment-card elements have two child elements: currencies and ranges.

APIs for Multi-Currency Sites

B2C Commerce Script API and Pipelet API support multi-currency sites as follows:

API Object Description

dw.system.Site

Provides a getAllowedCurrencies() method to obtain a list of allowed currencies for the site.

dw.system.Session

Provides getCurrency() and setCurrency(newCurrency : Currency) methods to get and set the session currency.

dw.order.ShippingMethod

Provides getCurrencyMnemonic() to obtain the ISO 4217 mnemonic currency code for the shipping method.

dw.order.ShippingMgr

The following methods filter by session currency:

  • getAllShippingMethods()
  • getDefaultShippingMethod()

dw.campaign.Promotion

Provides a getCurrency() method to obtain the currency for the promotion.

dw.campaign.PromotionMgr

The following methods filter by session currency:

  • applyDiscounts(lineItemCtnr : LineItemCtnr)
  • getActiveCustomerPromotions()
  • getActiveCustomerPromotionsForCampaign(campaign : Campaign , from : Date, to : Date)
  • getDiscounts( lineItemCtnr : LineItemCtnr )
  • getDiscounts( lineItemCtnr : LineItemCtnr, promotionPlan : PromotionPlan )
  • getUpcomingCustomerPromotions( previewTime : int )

dw.order.PaymentMethod

The isApplicable(customer : Customer, countryCode : String, paymentAmount : Number) filters payment methods by currencies and currency-specific price ranges.

dw.order.PaymentCard

The isApplicable(customer : Customer, countryCode : String, paymentAmount : Number) method filters payment methods by currencies and currency-specific price ranges.

GetBasket pipelet

When baskets are created, they are initialized with the current session currency. When fetching a basket, the pipelet compares the basket's currency to the session currency. If they differ, the pipelet changes the basket's currency to match the session currency; the pipelet also removes all payment instruments and shipping methods in the basket, because they are currency-specific.

SetSessionCurrency pipelet

Sets the session currency.

Feature Limitation to Be Addressed in Future Releases

Support for multiple currencies isn't yet available for all areas of B2C Commerce. Specifically, for Analytics, purchase reports are across all orders in all currencies. They do not differentiate by currency.