Skip to main content
When a shopper changes shipping country on Global-e checkout, the storefront can reload in the locale that is mapped to the new country (URL, language, currency, and locale-specific configuration). Out of the box the cartridges send locale-aware SendCartV2 PlatformURLs and, when Global-e reports a country change, 302 the shopper back to SFCC checkout (Checkout-Begin) with glCountry and glCurrency. See also: Checkout flow, Hooks → globale.getPlatformURLs, Client JS SDK, Metadata → GLOBALE_COUNTRIES
This is an optional feature. The SFCC cartridges include the storefront behaviour, but it is not available in production until Global-e enables shipping-country change for your merchant account. Contact Global-e Merchant Support to request enablement before go-live. There is no SFCC site preference to turn it on.

Overview

  1. SendCartV2 includes PlatformURLs: home (Home-Show / SEO home), cart (Cart-Show / SEO cart), and payment callback (Globale-PaymentRedirect), built in the current request locale.
  2. If the shopper changes shipping country on Global-e checkout, Global-e calls Globale-PaymentRedirect with shippingCountryChanged=true, glCountry, and glCurrency.
  3. SFCC resolves the destination from GLOBALE_COUNTRIES.siteUrl for that country (pipeline form action|SiteID|locale) and redirects to Checkout-Begin with glCountry / glCurrency so Global-e init and SendCart run again in the matching locale.
Globale-CheckoutPaymentRedirect (the SFCC include used when checkout already has a cart token) does not issue this locale 302.

Prerequisites

Configuration

Global-e

Contact Global-e Merchant Support to enable shipping-country change on your merchant account before configuring SFCC.

Country site URL

Merchant Tools → Custom Objects → GLOBALE_COUNTRIES (populated by the GlobaleSettings job) The siteUrl attribute controls where SFCC sends the shopper after a country change: Example pipe values (same convention as the country switcher):
Keep siteUrl in sync with how you map operated countries to storefront locales. Run GlobaleSettings after Global-e country configuration changes.

Custom PlatformURLs

Register globale.getPlatformURLs only when the OOTB home / cart / Globale-PaymentRedirect URLs are wrong for your storefront (typical for headless). The handler must return { SiteURL, RedirectToCartURL, PaymentCallbackURL } or null. See Hooks → globale.getPlatformURLs. Do not put a literal @@LOCALE@@ token in these URLs. Global-e does not substitute that token on MAS storefront URLs.

Storefront architectures

Limitations

  • If the SFCC shopper session expires before the shopper changes shipping country (the platform hard session timeout, typically 8 hours), the country-change 302 still runs, then checkout finds no basket and sends the shopper to the empty cart page.
  • An unknown or invalid glCountry does not fail closed: SFCC still 302s to Checkout-Begin on the current locale. Global-e init ignores a country code that is not in GLOBALE_COUNTRIES (or not allowed for the site) and falls back to geo / default country.
  • The country-change 302 does not pass the cart token. SendCart on the following checkout request issues a new token.

See also