Catalog quantity break pricing sync

Hi all,

My requirement is to sync special pricing (qty breaks) from our ERP to Shopify+ for B2B company customers.

We have set up a catalog in Shopify and have assigned the catalog to a company.

Now I want to sync the fixed price and quantity break prices from the ERP to Shopify.
Ideally we want to add new and update existing quantity breaks in Shopify using ERP as the source.

I’m trying to design the solution, to understand what Shopify API endpoints we will need to use and what the sync logic would be.
We will need to change prices for particular qty breaks and add new qty breaks and prices.

What value would be needed to identify and retrieve record for update?

At the moment we are generating a CSV from SAP with the qty breaks and importing that to Shopify, but ideally we should be able to automate this process using APIs.

Any help / pointers would be greatly appreciated.

Thanks,

John

Hi Jon,

To add/remove/modify quantity price breaks by variant, you need to use the quantityPricingByVariantUpdate mutation. This mutation is used for setting fixed prices, quanity pricing and quantity rules. The documentation has pretty clear examples. To determine the price list id associated with the catalog, you’ll need to query the catalog as well. I hope that helps!

Hi Darren,

Thanks very much for the info and reply.

I have managed to use this endpoint to add new and update existing quantity breaks which is great.

My issue now is how to delete them.

I can see that I need to provide the ID of the price break as input in order to delete it.

Can you please point me to the endpoint that I can use to query the quantity breaks so that I can retrieve the IDs needed for deletion?

Thanks,

John

Hi Darren,

One other question in relation to this.
I’m using the below query to retrieve the IDs needed.
However I needed to add a company location to the catalog in order for this to work.
I did this via the front end.
Before I added any locations, I could add the quantity breaks without any issue, and I could see them on the front end, but there was no way to retrieve them without adding the customer location to the catalog.
I tried the below with the country input param instead of company location, but this returned an empty array.
Is that related to how the catalog is set up?

Thanks,
John

query test {
productVariant(id: “gid://shopify/ProductVariant/44486648037635”) {
id
displayName
contextualPricing(context: {companyLocationId:“gid://shopify/CompanyLocation/1627521283”}) {
quantityPriceBreaks(first: 10) {
nodes {
id
minimumQuantity
price {
amount
}
}
}
}
}
}