> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/shopify/shopify-native/integration/pricing-import.md).

# Pricing Import

Import localized prices from **ESW Pricing Advisor** into Shopify markets.

Use ESW to calculate market-specific prices.

Then write fixed prices to Shopify using the Admin GraphQL API.

### Prerequisites

* Your Shopify **markets** and **currencies** are set up.
* Your products and variants exist in Shopify.
  * If ESW relies on your Shopify catalog, see [Product Catalog Sync](broken://spaces/69bGsllGv04t8wHIHruV/pages/95e056cc6dfc121c604f5ea3d9c3b8ac0f214a8d).
* You have credentials for:
  * ESW Pricing Advisor API
  * Shopify Admin API (GraphQL)

{% hint style="info" %}
Pricing imports are usually batch jobs.

Run them on a schedule and after major catalog changes.
{% endhint %}

### Pricing import flow

{% stepper %}
{% step %}

### Define your pricing scope

Decide which combinations you price.

Typical dimensions:

* Market (country/region)
* Currency
* Variant (SKU)

Keep a stable mapping between a Shopify market and your ESW pricing inputs.
{% endstep %}

{% step %}

### Fetch pricing inputs from ESW

Call the ESW Pricing Advisor API per market to retrieve the rules needed to price.

Common inputs:

* Exchange rates
* Duties and taxes
* Rounding rules

Fetch the data for every target market and currency pair.
{% endstep %}

{% step %}

### Calculate the final price per variant

For each variant/SKU:

* Apply the ESW rules for the market.
* Produce the price you want shoppers to see.

Store the result with:

* Market
* Currency
* Variant/SKU
* Effective timestamp (optional)
  {% endstep %}

{% step %}

### Upsert fixed prices into Shopify

Write the calculated prices to Shopify as fixed prices.

Implementation notes:

* Use the Admin GraphQL API.
* Batch updates to stay within rate limits.
* Make updates idempotent.

#### Shopify mutation <i class="fa-code" style="color:$primary;">:code:</i> [priceListFixedPricesAdd](https://shopify.dev/docs/api/admin-graphql/latest/mutations/priceListFixedPricesAdd).

{% endstep %}

{% step %}

### Validate and monitor

Spot-check a few products in each market.

Then monitor for:

* Missing SKUs
* Large price deltas
* Failed writes / throttling
  {% endstep %}
  {% endstepper %}

### Shopify reference links <i class="fa-square-info" style="color:$primary;">:square-info:</i>

{% tabs %}
{% tab title="Fixed prices by country/market" %}
[Product prices by country (Shopify Help)](https://help.shopify.com/en/manual/international/pricing/product-prices-by-country#set-fixed-product-prices-using-the-shopify-api)
{% endtab %}

{% tab title="Fixed prices for specific variants" %}
[Set fixed prices for specific variants (Shopify Dev)](https://shopify.dev/docs/apps/build/markets/build-catalog#step-3-set-fixed-prices-for-specific-product-variants)
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/shopify/shopify-native/integration/pricing-import.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
