Shopify Price List XML (GraphQL)
Important
This task is only available for Shopify Plus.
The XML format documented here is used for the import of price lists into Shopify, via the Import Price Lists task.
We recommend that the ZynkExternalId field be populated with the unique ID of the price list from the external system. Zynk uses this field to track price lists already imported, so that subsequent imports update the existing price list. The 'Prevent Reprocessing' setting is disabled by default on this task.
The task updates an existing price list when one is identified by Id, by an exact match on Name, or by a previously imported ZynkExternalId (checked in that order). Otherwise a new price list is created. Because the ZynkExternalId check happens after validation, the fields required for a new price list must be provided whenever Id is omitted and Name does not match an existing price list.
XML
Any fields not documented below are ignored by the task. Examples of where in the XML the fields should appear are shown in the samples below.
<?xml version="1.0" encoding="utf-8"?>
<PriceLists>
<PriceList>
<ZynkExternalId>ACME-GBP</ZynkExternalId>
<Name>ACME Ltd Prices</Name>
<Currency>GBP</Currency>
<Catalog>
<Title>ACME Ltd</Title>
</Catalog>
<Parent>
<Adjustment>
<Type>PERCENTAGE_DECREASE</Type>
<Value>10</Value>
</Adjustment>
<Settings>
<CompareAtMode>ADJUSTED</CompareAtMode>
</Settings>
</Parent>
<Prices>
<Record>
<Variant>
<Sku>TSHIRT-S-RED</Sku>
</Variant>
<Price>
<Amount>8.00</Amount>
</Price>
<CompareAtPrice>
<Amount>10.00</Amount>
</CompareAtPrice>
</Record>
</Prices>
</PriceList>
</PriceLists>
In each of the following sections most of the XML has been omitted to make the samples easier to read. The whole structure of the PriceLists schema is used above as a reference of where fields should be in the object model.
Price List
The following information can be provided at the price list header level.
| Shopify Field | XML Field | Type | Input | Notes |
|---|---|---|---|---|
| - | ZynkExternalId | string | Optional | Stored in Zynk's internal DB and used to find the price list on subsequent imports |
| id | Id | string | Dependant | GraphQL ID of an existing price list to update, e.g. gid://shopify/PriceList/123. Required if Name is not provided |
| name | Name | string | Dependant | Required if Id is not provided. If Id is not provided, an existing price list with exactly this name (case sensitive) is updated |
| currency | Currency | string | Dependant | Required when creating a new price list, e.g. GBP. Also used as the default currency for the prices below |
| catalogId | Catalog/Id | string | Optional | GraphQL ID of the catalog to link the price list to, e.g. gid://shopify/CompanyLocationCatalog/123 |
| catalogId | Catalog/Title | string | Optional | Used to look up the catalog ID if Catalog/Id is not provided. The record fails if no catalog is found |
<?xml version="1.0" encoding="utf-8"?>
<PriceLists>
<PriceList>
<ZynkExternalId>ACME-GBP</ZynkExternalId>
<Id>gid://shopify/PriceList/18434064473</Id>
<Name>ACME Ltd Prices</Name>
<Currency>GBP</Currency>
<Catalog>
<Id>gid://shopify/CompanyLocationCatalog/40769585241</Id>
</Catalog>
</PriceList>
</PriceLists>
Parent
The percentage adjustment applied to the store's base prices for all products not given a fixed price. Parent, Parent/Adjustment/Type and Parent/Adjustment/Value are required when creating a new price list.
| Shopify Field | XML Field | Type | Input | Notes |
|---|---|---|---|---|
| parent.adjustment.type | Adjustment/Type | enum | Dependant | Required when creating a new price list. Options: PERCENTAGE_DECREASE, PERCENTAGE_INCREASE |
| parent.adjustment.value | Adjustment/Value | decimal | Dependant | Required when creating a new price list. The percentage, e.g. 10 for 10% |
| parent.settings.compareAtMode | Settings/CompareAtMode | enum | Optional | How compare at prices are handled. Options: ADJUSTED, NULLIFY |
<?xml version="1.0" encoding="utf-8"?>
<PriceLists>
<PriceList>
<Parent>
<Adjustment>
<Type>PERCENTAGE_DECREASE</Type>
<Value>10</Value>
</Adjustment>
<Settings>
<CompareAtMode>ADJUSTED</CompareAtMode>
</Settings>
</Parent>
</PriceList>
</PriceLists>
Prices
Fixed prices for specific product variants, which override the parent adjustment. Prices are added or updated after the price list itself has been saved, in batches of 250. Existing fixed prices not included in the XML are left unchanged.
Each price must identify a variant by Variant/Id or Variant/Sku. When matching by SKU, the price is applied to every variant with that SKU.
| Shopify Field | XML Field | Type | Input | Notes |
|---|---|---|---|---|
| variantId | Variant/Id | string | Dependant | GraphQL ID of the product variant, e.g. gid://shopify/ProductVariant/123. Required if Variant/Sku is not provided |
| variantId | Variant/Sku | string | Dependant | Required if Variant/Id is not provided. The record fails if no variant is found |
| price.amount | Price/Amount | decimal | Required | |
| price.currencyCode | Price/CurrencyCode | string | Dependant | Defaults to the price list Currency, so it is required only if Currency is not provided. If both are provided they must match |
| compareAtPrice.amount | CompareAtPrice/Amount | decimal | Dependant | Required if CompareAtPrice is provided |
| compareAtPrice.currencyCode | CompareAtPrice/CurrencyCode | string | Dependant | Same rules as Price/CurrencyCode |
<?xml version="1.0" encoding="utf-8"?>
<PriceLists>
<PriceList>
<Prices>
<Record>
<Variant>
<Id>gid://shopify/ProductVariant/42180782129241</Id>
</Variant>
<Price>
<Amount>8.00</Amount>
<CurrencyCode>GBP</CurrencyCode>
</Price>
</Record>
<Record>
<Variant>
<Sku>TSHIRT-S-GREEN</Sku>
</Variant>
<Price>
<Amount>8.00</Amount>
</Price>
<CompareAtPrice>
<Amount>10.00</Amount>
</CompareAtPrice>
</Record>
</Prices>
</PriceList>
</PriceLists>