My app cannot use sellableOnlineQuantity for Variant with new markets

Hi everyone!

Basically we published a Shopify app with the theme extension.

The app is doing the following:

  1. The backend gets the request from the frontend with liquid Customer and Localization objects (we can access other liquid objects if needed);

  2. then the backend needs to identify the available Product Variant qty for that exact online store customer with Admin API.

We used earlier sellableOnlineQuantity which worked great, but with the new Markets we got the restriction “This doesn’t represent the total available inventory or capture limitations based on customer location“:

What is the workflow with new Markets to identify the sellableOnlineQuantity for a specific online store customer with Admin API?

We have the B2B catalog ID for B2B customers, and for retail customers we have Market ID.

It is even possible? :frowning:

Thank you in advance! Will very much appreciate any help.

I think there is a bug with sellableOnlineQuantity because when we have other locations in negative stock (locations which do not fulfill online) it is stocking out online. This might not be your problem but thought i’d mention since you posted this so recently.

My problem turned out to be related with the new setting (which will be default for all stores on 1st April, for now it is default for newly created stores):

So users see “out of stock“ message for products cannot be delivered now, earlier they saw the error only in checkout:

And that DOES NOT reflect in availableOnOnlineStore because it depends on the context of frontend user.

And Shopify confirmed that they do not have contextual availableOnOnlineStore endpoint

1 Like