Call the companyCreate mutation with a name, externalId (your ERP account ID), and an initial companyLocation including a billingAddress and shippingAddress.
Use the companyAssignCustomerAsContact mutation to link an existing customer record (or create one first with customerCreate) to the company as a contact with the ADMIN role.
Call the companyLocationAssignRoles mutation to grant the contact PURCHASING_ROLE at the location.
Set payment terms by calling the paymentTermsCreate mutation referencing the companyLocationId and a paymentTermsTemplateId — retrieve available templates first with a paymentTermsTemplates query; look for the template with paymentTermsType FIXED and a 30-day net period.
Verify the setup by querying company(id:) with nested fields: locations, contacts, paymentTerms, and catalog to confirm catalog and price list assignment.
When the buyer places an order, the order will automatically carry the payment due date derived from the net-30 terms; monitor via the orders query filtering on paymentStatus.
Known gotchas
Shopify B2B company catalogs and price lists are a separate resource — creating a company does not automatically assign a catalog; you must call companyAssignCatalogs after creating the company.
The paymentTermsTemplates available depend on your Shopify plan; not all net-day options are available on non-Plus plans — verify which templates are returned before hardcoding a template ID.
companyLocationAssignRoles requires the contact to already exist as a company contact; attempting to assign a role before associating the customer will return a user error.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp