Pricelist¶
The Pricelist push sets fixed prices for variants on a B2B price list, such as a customer's contract prices. Each row sets one variant's price, and IMan sends the rows 250 to a request.
On a push connector, select Pricelist as the Shopify Import Type. The push sends the rows through Shopify's quantityPricingByVariantUpdate mutation. It needs a store with B2B. See Building a B2B Customer for where it fits.
A price list belongs to a catalog. The catalog decides which company locations see the prices, and the price list holds them. A price list adjusts every price by a percentage, and a fixed price on a variant overrides that adjustment.
The Designer shows this import's fields by their id, such as PriceListId. This page names them the same way.
Records¶
| Record | Under | One for each |
|---|---|---|
| Pricelists | price list | |
| PricelistItems | Pricelists | variant price |
Finding or Creating the Price List¶
Map PriceListId to name the price list, as a numeric id or a gid such as gid://shopify/PriceList/1234567890. IMan then uses it and creates nothing.
With PriceListId blank, CatalogName finds or creates what the prices need:
| The store has | IMan |
|---|---|
A catalog titled CatalogName, with a price list |
Uses that price list |
A catalog titled CatalogName, without a price list |
Uses the price list named CatalogName, or creates it, and attaches it to the catalog |
No catalog titled CatalogName |
Uses the price list named CatalogName, or creates it. Then creates a publication and a catalog titled CatalogName that use it |
IMan writes back PriceListId, and PublicationId and CatalogId when it creates them.
These fields apply only when IMan creates something:
| Field | Rule |
|---|---|
PricelistCurrency |
The new price list's currency. The default is GBP |
PricelistType |
PERCENTAGE_INCREASE or PERCENTAGE_DECREASE, the price list's adjustment. The default is PERCENTAGE_INCREASE |
PriceListAdjustmentValue |
The adjustment's percentage. The default is 0 |
PublicationState |
EMPTY starts the new catalog with no products. ALL_PRODUCTS starts it with every product. The default is EMPTY |
PublicationAutoPublish |
True, the default, adds products created later to the catalog |
CatalogStatus |
ACTIVE, DRAFT or ARCHIVED. The default is ACTIVE |
CompanyLocation |
A company location to give the new catalog, as a gid. Use CatalogUpdate to give it more |
Prices¶
| Field | Rule |
|---|---|
PriceToAddVariantId |
The variant, as a numeric id or a gid |
PriceToAddAmount |
The variant's fixed price |
PriceToAddCurrencyCode |
The price's currency. It must be the price list's currency |
CompareAtPriceToAddAmount, CompareAtPriceToAddCurrencyCode |
Optional. A compare-at price, shown struck through beside the price |
The Product Variants pull reads the variant ids. The push matches variants by id only.
Update Operations¶
| Update Operation | Effect on the price list |
|---|---|
| Insert, Update, Insert/Update | Each row sets its variant's fixed price, adding or replacing it. Variants the run does not name keep their prices |
| Synchronise | Sets the rows' prices, then removes every other fixed price on the list. A variant whose fixed price goes takes the list's percentage adjustment again |
Give each price list one Pricelists record. Under Synchronise, the record's rows are the list's whole set of fixed prices.
Batches and Errors¶
IMan sends a price list's rows 250 to a request. A request never mixes two price lists. Shopify applies a request whole or not at all:
- When Shopify refuses some rows, those rows fail with Shopify's message, and IMan sends the rest of the request again.
- An error that names no row fails every row of the request not yet applied.
A Pricelists record that fails, such as when IMan can't find or create its price list, sends none of its rows. Shopify's refusals include a variant it can't find and a currency that differs from the price list's.
Bulk Operations¶
With Use Bulk Operations on, IMan finds or creates each price list as it reads the record, and holds the rows. At the end of the run it sends them as Shopify bulk operations, 250 prices to a line, then the Synchronise removals. When two rows price one variant on the same list, the later row wins. A failed removal fails its Pricelists record.
Access Scopes¶
The push needs write_products, and write_publications when it creates a catalog. See Access Scopes.
Shopify Reference¶
quantityPricingByVariantUpdate and PriceList in Shopify's GraphQL Admin API reference.