Skip to content

CatalogUpdate

The CatalogUpdate push decides which company locations see a B2B catalog, and with it the catalog's price list. Each record names one catalog and a list of company locations.

On a push connector, select CatalogUpdate as the Shopify Import Type. The push sends the changes through Shopify's catalogContextUpdate mutation, 250 locations to a call. It needs a store with B2B. See Building a B2B Customer for where it fits.

The push creates no catalogs. The Pricelist push creates a catalog with its price list.

Fields

Field Rule
CatalogId The catalog, as a numeric id or a gid. Written back when IMan finds the catalog by name
CatalogName With CatalogId blank, the title of the catalog. A record whose catalog IMan can't find fails
CompanyLocationIDs The company locations, as numeric ids or gids, separated by |. Company Locations writes back each location's id
Use Bulk Operations True sends the run through bulk operations

Update Operations

The Designer offers two:

Update Operation Effect on the catalog's company locations
Insert Adds the listed locations the catalog does not have. Removes none. A record for each location works, because records do not interfere
Synchronise Makes the catalog's locations exactly the list: adds the missing ones, then removes the rest. When several records name one catalog, the last record's list wins

A blank list under Synchronise removes every location

Under Synchronise, a record with a blank CompanyLocationIDs removes every company location from its catalog. Filter out records with no locations before the writer.

A job saved with Update or Insert/Update adds locations, as Insert does.

Errors

IMan reads the catalog's current locations before it changes them. Shopify treats each call as a whole:

  • A location Shopify refuses, such as one it can't find, fails alone. IMan sends the rest of its call again.
  • A location the catalog already has counts as done.
  • An error that names no location fails the whole call.

A failed call doesn't stop the record. IMan sends its other calls, then fails the record with one message that lists each failure. The locations Shopify accepted stay assigned.

Shopify sometimes refuses a change while another change to the same catalog is under way. IMan then waits and sends the call again: after 10, 30, 60, 120 and 240 seconds. If Shopify still refuses it, the call fails.

Bulk Operations

With Use Bulk Operations on, IMan holds the records, reads each named catalog and its locations once with normal requests, then sends the changes as Shopify bulk operations. Under Synchronise, records that name the same catalog go in successive rounds, and the last record wins. Each round sends the adds, then the removals.

Access Scopes

The push needs write_products. See Access Scopes.

Shopify Reference

catalogContextUpdate in Shopify's GraphQL Admin API reference.