Assign Company a Catalog with GraphQL

Topic summary

A developer needs to automatically assign catalogs to 1,000+ B2B companies based on customer account tags (e.g., “10discount” tag triggers 10% discount catalog assignment).

Solution Identified:

  • Use the catalogContextUpdate GraphQL mutation
  • Pass catalog ID and company location IDs as parameters
  • Note: Shopify’s approach assigns company locations to catalogs rather than catalogs to companies

Follow-up Question:
The original poster asks about bulk-adding customer orders to companies via GraphQL, but this remains unanswered.

Status: Partial resolution - catalog assignment method confirmed, but bulk order assignment question still open.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

Is assigning a company a catalog with graphQL a possibility?

I have a list of emails from customer accounts I’m going to automatically assign a catalog to based on their tags. Creating the company account from email is trivial, however I don’t see any section in the GraphQL information to assign a catalog. I want to assign these automatically for 1,000+ companies based on their customer account tag. So if a customer has “10discount” it would add the 10% discount. Obviously this is easy in code but I need a GraphQL mutation that can alter company accounts’ discounts.

Thanks

Looks like you would accomplish this using the catalogContextUpdate graphQL mutation by passing in the catalog ID and the company location IDs you want to assign to it. Seems a little backwards, but it looks like Shopify essentially has you assign company locations to the catalog rather than assigning the catalog to the company.

What about adding customers orders to a company in bulk with graphQL?