---
schema_version: "1"
id: 3dd0eebe2e0ec5edeb351a6306dcbcd9e50fd4383fde8c9af4cc689e3f2224d7
title: "Example: Customize a Store Based on a Shopper's Locale"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/comm_ex_markets_customize_based_on_locale.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.comm_ex_markets_customize_based_on_locale.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9dd4f15fb9e9c0e9f4756b7ee6603fdc7910914b98baa2b825becd83d71b6a03
description: Acme Retail is a global fashion retailer that sells to customers in the United States and Europe. Acme can manage an online store in three languages (English, French, and German) by using markets and assigning locales to them. It can also offer different products, prices, promotions, entitlements, and ship-to countries for each market.
products:
  - Commerce
  - B2B Commerce
release: "264"
---
# Example: Customize a Store Based on a Shopper's Locale

Acme Retail is a global fashion retailer that sells to customers in the United States and Europe. Acme can manage an online store in three languages (English, French, and German) by using markets and assigning locales to them. It can also offer different products, prices, promotions, entitlements, and ship-to countries for each market.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.comm_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

[Which Salesforce Commerce Product Do I Have?](https://help.salesforce.com/s/articleView?id=commerce.comm_what_product.htm&language=en_US)

When a shopper selects Germany from the country picker, the website refreshes to show text in German and prices in euros. Because the locale (German | DE) is assigned to the European market, products, pricing, promotions, entitlements, and ship-to countries for the European market are used. If the shopper selects United States, the text switches to English and prices switch to dollars because the locale (United States | EN) is assigned to the United States market. Products sold in and shipped only to countries in the European market are hidden, and pricing and promotions specific to the US market are applied.

![Select your location.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_select_locale.png)

#### See Also

- [Segment a Store into Markets Based on Locale](https://help.salesforce.com/s/articleView?id=commerce.comm_markets.htm&language=en_US)
- [Connect REST API Developer Guide: Commerce Webstore Application Context](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_application_context.htm)
- [Connect REST API Developer Guide: Commerce Webstore Cart Items](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_cart_items)

## Assign Locales and Ship-To Countries to a Market

This example assumes that you have created your markets and locales, have set up your B2B store’s pricebook, entitlement policies, currencies, and ship-to countries, and have assigned them to the store.

1. In the navigation sidebar, select the Acme store from the **Store** dropdown.
2. Select **Settings | Store**, and then click **Markets**.
    
    ![Markets screen.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_select_locale_markets.png)
3. Select the Alpine Coffee D2C Europe market to assign the French and German locale‌s to it.
4. Select **Related**.
    
    ![Related screen.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_select_locale_related.png)
5. Next to Locales, select **Assign**, deselect **en\_US**, select **fr** and **de**, and click **Assign**.
    
    ![Assign locales.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_select_locale_assign.png)
6. Next to Supported Ship-To-Countries, select **Assign**, add France and Germany, and select **Submit**.
    
    ![Assign ship-to countries.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_select_locale_ship_to.png)
7. In the navigation sidebar, select **Website Design**, and at the bottom left, select the Experience Builder.
8. In the components palette, drag the Country Selector component to a page in your store. When a customer goes to your store, they can use the Country Selector to select their locale: United States | EN, France | FR, or Germany | DE.
    
    ![Select a locale from the Country Selector.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_select_locale_selector.png)
9. At the top right of the Experience Builder, select **Publish**.

## Change Shopper’s Locale with Headless API

If you don’t want to use the built-in Country Picker component in your B2B store, you can pass the `language` query parameter directly to the Connect API. All APIs that internally reference entitlements, pricing, promotions, currency, and ship-to countries support the `language` parameter. Here are two examples.

- [Commerce Webstore Application Context](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_application_context.htm)
- [Commerce Webstore Cart Items](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_cart_items.htm)

If a store is segmented into markets, these APIs look at the language parameter added to the URL to determine the shopper’s locale and return the appropriate values. In the examples, `language=de` is the German locale for the Alpine Coffee D2C Europe market.

To retrieve the market currency and the ship-to countries that can be used during checkout, use the [Commerce Webstore Application Context](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_application_context.htm) resource API.

```
https://yourInstance.salesforce.com/services/data/v63.0/commerce/webstores/0ZExx0000000001GAA/application-context?language=de
```

To use market-specific pricing and promotions when adding a product to your cart, use the [Commerce Webstore Cart Items](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_commerce_webstore_cart_items.htm) resource API.

```
/commerce/webstores/webstoreId/carts/cartStateOrId/cart-items?language=de
```