> ## Documentation Index
> Fetch the complete documentation index at: https://docs.global-e.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Price Calculation (Pricing Strategies)

Global-e routes each operated country to **dynamic** (converted from a base price book) or **fixed** (final price from a fixed price book) pricing. The runtime strategy is exposed as the session attribute `gePriceStrategy` (`DYNAMIC` or `FIXED` — see [Session attributes](/session-attributes-sfcc)). The default is **dynamic**; a country resolves to **fixed** only when *both* (1) the country's `GLOBALE_COUNTRIES` setting `supportsFixedPrices` is true (populated by the **GlobaleSettings** job) *and* (2) a matching online fixed price book exists for the country/currency. Price-book custom attributes (below) route which book is used — see [Configuration → Price Books](/configuration-sfcc).

**Read order:** configure price books on this page first, then [Promotions](/promotions-sfcc) (threshold currencies and `geDoNotConvert` depend on the shopper's pricing strategy).

**See also:** [Metadata → Price Book](/metadata-sfcc#price-book) · [Promotions](/promotions-sfcc)

## Quick Start

Use this section for fast implementation alignment.

### Confirmed Inputs Before Implementation

* Approved country-to-strategy mapping is available from business owners.
* Target implementation pattern is confirmed (separate books or shared price book).
* For Fixed countries, each country currency is confirmed against fixed price book currency.

### Minimum Configuration by Strategy

* Dynamic only:

  * `geBasePricebook = true`
  * `geFixedPricebook = false`
  * `geApplicableToDynamicCountries = <CSV or empty>`

* Fixed only:

  * `geBasePricebook = false`
  * `geFixedPricebook = true`
  * `geApplicableToFixedCountries = <CSV, non-empty>`
  * `priceBook.currencyCode == fixedCountryCurrency`

* Shared (Dynamic + Fixed):

  * `geBasePricebook = true`
  * `geFixedPricebook = true`
  * Both country scope fields configured correctly
  * Currency alignment validated for fixed countries

### CSV Rules

* Use uppercase ISO2 country codes, comma-separated (`US,IL,GB`).
* Spaces are tolerated (`US, IL`), empty tokens are ignored (`US,,IL`).
* Empty dynamic list = all dynamic countries.
* Empty fixed list = fixed applicability is false.

### Post-Change Operations

* Clear or wait for expiry of the **`geCountryPriceBooks`** custom cache (country → applicable price book IDs).
* Invalidate storefront cache when prices still look stale after a country switch.
* Run the **GlobaleSettings** job if country strategy or platform settings changed — see [Configuration](/configuration-sfcc).
* If cache price books are enabled, run the full GlobaleSettings cache price book flow: generate XML → import → update config hashes → sync combinations (see [GlobaleSettings](/globale-settings-sfcc) and [Metadata → jobs](/metadata-sfcc)).
* Rebuild the search index only where PLP sorting or filtering depends on refreshed prices.

### Smoke Test

* Test one Dynamic country, one Fixed country, and one out-of-scope country.
* Verify PDP, PLP, and cart consistency in each context.
* Verify expected price book routing in logs/debug tools.

## Strategy Playbooks

### Dynamic Strategy (Converted Pricing)

Use when approved mapping requires Dynamic:

* Centralized base pricing with automatic country conversion is required.
* Final prices are not maintained manually per country.

Business outcome:

* Destination country price is calculated from SFCC source price.

Core configuration:

* `geBasePricebook = true`
* `geFixedPricebook = false`
* `geApplicableToDynamicCountries` = empty (all dynamic countries) or explicit CSV list
* Optional: `geApplicableToMerchantId`, `geApplicableToSiteId`

Risks to avoid:

* Overlapping dynamic country lists across multiple base books may route to unintended base price book.

### Fixed Strategy (As-Is Final Pricing)

Use when approved mapping requires Fixed:

* Explicit final prices are required for specific countries.
* Country-specific final values are controlled in SFCC price books.

Business outcome:

* SFCC fixed price is shown as final customer price (no dynamic conversion).

Core configuration:

* `geBasePricebook = false`
* `geFixedPricebook = true`
* `geApplicableToFixedCountries` = explicit CSV list (required in practice)
* Price book currency must match fixed country currency
* Optional: `geApplicableToMerchantId`, `geApplicableToSiteId`

Risks to avoid:

* Empty `geApplicableToFixedCountries` means fixed applicability is false.
* Currency mismatch blocks fixed applicability.

### Shared Strategy (One Book for Dynamic + Fixed)

Use when approved mapping requires Shared:

* One price book is used for both:

  * Dynamic source pricing for some countries
  * Fixed final pricing for specific countries

Business outcome:

* One price book can serve two routing paths, if country scopes and currency rules are valid.

Core configuration:

* `geBasePricebook = true`
* `geFixedPricebook = true`
* `geApplicableToDynamicCountries` = dynamic scope (or empty for all dynamic countries)
* `geApplicableToFixedCountries` = fixed scope
* Fixed country currency must match price book currency

## Business Manager Setup (Step-by-Step)

### Step 1: Open Target Price Book

* Navigate to Business Manager -> Products and Catalogs -> Price Books.
* Open the intended price book record.

### Step 2: Set Strategy Flags

* Set `geBasePricebook` and `geFixedPricebook` based on selected strategy:

  * Dynamic only: base `true`, fixed `false`
  * Fixed only: base `false`, fixed `true`
  * Shared: base `true`, fixed `true`

### Step 3: Set Country Scope Fields

* Dynamic scope field: `geApplicableToDynamicCountries`
* Fixed scope field: `geApplicableToFixedCountries`
* Format CSV using ISO2 uppercase country codes (example: `US,IL,GB`)

Notes:

* Spaces are ignored (`US, IL` is valid).
* Empty tokens are ignored (`US,,IL` behaves as `US,IL`).
* Empty dynamic list means global dynamic scope.
* Empty fixed list means fixed applicability is always false.

### Step 4: Apply Scope Filters (Optional)

* Set `geApplicableToMerchantId` and `geApplicableToSiteId` only when scoping is required.
* Leave empty if no scope restriction is needed.

### Step 5: Validate Currency Alignment for Fixed Countries

* Confirm `priceBook.currencyCode` equals each fixed country currency.
* If mismatch exists, fixed applicability will fail for that country.

### Step 6: Save and Activate

* Save price book changes.
* Ensure the price book remains online.

### Step 7: Run Post-Change Operations

* Clear or wait for expiry of the **`geCountryPriceBooks`** custom cache.
* Invalidate storefront cache if prices look stale.
* Run **GlobaleSettings** when country strategy or platform settings changed.
* Run the GlobaleSettings cache price book steps (generate → import → update hashes → sync combinations) if your site uses generated cache price books.
* Rebuild search index only if PLP behavior depends on refreshed prices.

## Data Entry Templates

### Dynamic-Only Template

| Field | Value |
| - | - |
| Price Book ID | `{{PB_ID}}` |
| Currency | `{{BASE_CURRENCY}}` |
| `geBasePricebook` | `true` |
| `geFixedPricebook` | `false` |
| `geApplicableToDynamicCountries` | `{{CSV_DYNAMIC_COUNTRIES_OR_EMPTY}}` |
| `geApplicableToFixedCountries` | *(empty)* |
| `geApplicableToMerchantId` | `{{OPTIONAL_MID_LIST}}` |
| `geApplicableToSiteId` | `{{OPTIONAL_SITE_LIST}}` |

### Fixed-Only Template

| Field | Value |
| - | - |
| Price Book ID | `{{PB_ID}}` |
| Currency | `{{FIXED_CURRENCY}}` |
| `geBasePricebook` | `false` |
| `geFixedPricebook` | `true` |
| `geApplicableToDynamicCountries` | *(empty)* |
| `geApplicableToFixedCountries` | `{{CSV_FIXED_COUNTRIES}}` |
| `geApplicableToMerchantId` | `{{OPTIONAL_MID_LIST}}` |
| `geApplicableToSiteId` | `{{OPTIONAL_SITE_LIST}}` |

### Shared Template

| Field | Value |
| - | - |
| Price Book ID | `{{PB_ID}}` |
| Currency | `{{PB_CURRENCY}}` |
| `geBasePricebook` | `true` |
| `geFixedPricebook` | `true` |
| `geApplicableToDynamicCountries` | `{{CSV_DYNAMIC_COUNTRIES_OR_EMPTY}}` |
| `geApplicableToFixedCountries` | `{{CSV_FIXED_COUNTRIES}}` |
| `geApplicableToMerchantId` | `{{OPTIONAL_MID_LIST}}` |
| `geApplicableToSiteId` | `{{OPTIONAL_SITE_LIST}}` |

## Storefront Validation Checklist

Run validation after each configuration change:

* Country switch to Dynamic country shows expected converted price behavior.

* Country switch to Fixed country shows maintained final price (no conversion behavior).

* PDP, PLP, and cart pricing are consistent for the same country/currency context.

* Shared setup behaves correctly in both paths:

  * dynamic countries use dynamic behavior
  * fixed countries use fixed behavior

* Scope filters do not exclude intended traffic.

## Troubleshooting by Business Symptom

### Symptom: Price changes unexpectedly when customer switches country

Check:

* Country strategy assignment (Dynamic vs Fixed) is correct.
* Country appears in the intended CSV scope field.
* Overlapping dynamic scopes across base books are not causing reroute.

### Symptom: Fixed country is not receiving expected fixed pricing

Check:

* `geFixedPricebook = true`
* `geApplicableToFixedCountries` includes the country code
* Price book is online
* Price book currency equals fixed country currency
* Scope filters are not excluding request context

### Symptom: Shared price book works for Dynamic but not for Fixed

Check:

* `geFixedPricebook = true`
* `geApplicableToFixedCountries` is non-empty and contains the country
* Fixed country currency matches price book currency

### Symptom: Fixed strategy never applies

Most common cause:

* `geApplicableToFixedCountries` is empty

Expected behavior:

* Empty fixed country list means fixed applicability is always false.

## Appendix: Technical Reference (For Support/Engineering)

### Custom Attributes

| Custom attribute | Type | Description |
| - | - | - |
| `geBasePricebook` | boolean | Marks a price book as base for dynamic strategy. |
| `geFixedPricebook` | boolean | Marks a price book as fixed for fixed strategy. |
| `geApplicableToDynamicCountries` | string (CSV) | Dynamic country scope. Empty means all dynamic countries. |
| `geApplicableToFixedCountries` | string (CSV) | Fixed country scope. Empty means fixed applicability is false. |
| `geApplicableToMerchantId` | set-of-string | Optional scope filter by account identifier. |
| `geApplicableToSiteId` | set-of-string | Optional site-level filtering. |
| `geCachePriceBook` | boolean | Marks generated cache price books (managed by GlobaleSettings job). |

Cache price book **combinations** are not stored on the PriceBook object. They are written to the site-scoped `GLOBALE_CACHE_PRICE_BOOK_COMBINATION` custom object by `GlobaleSyncCachePriceBookCombinations` and read at runtime by `gePriceBookMgr.getApplicableCachePricebooksIDs`. Generation settings and hashes live in the organization preference `geCachePriceBooksConfiguration` (see [Metadata](/metadata-sfcc)).

### Applicability Rules Quick Reference

Dynamic:

* Must be base price book
* Must not be cache price book
* Must pass scope filters
* Must match `geApplicableToDynamicCountries` if list is non-empty

Fixed:

* Must be fixed price book
* Must not be cache price book
* Must pass scope filters
* Must match price book currency for fixed country
* Must be online
* Must be in `geApplicableToFixedCountries` (non-empty list)

### Dynamic Fallback Conversion Note

When **`sfccDynamicConversionFallback`** is enabled (a platform setting on the `GLOBALE_APP_SETTINGS` custom object, populated by the **GlobaleSettings** job — see [Metadata](/metadata-sfcc)), fixed-price countries may fall back to dynamic conversion when a fixed price is missing from the applicable price book. The fallback is skipped for **option products**.

Known functional limitations may affect:

* Search sorting/filtering
* Promotions
* Option products
* Gift certificates
