Sold_out field not in .NET SDK ItemVariationLocationOverrides class?

I’m using the latest .NET SDK (v17.0.0.0) which is documented as being aligned to the latest 2021-12-15 version of the Square API. When retrieving Item Variations using the Catalog API in API Explorer, I can see a sold_out field on Item Variation Location Overrides that have been forced to a sold out state in the Square dashboard. However, the .NET SDK ItemVariationLocationOverrides class does not appear to have a Property for that field. Was this intentional or just something that was missed? Or am I just missing it somehow? :slightly_smiling_face:

Anyone from the Square SDK team that can comment on this? Or should I open a support ticket?

:wave: Sorry about the delay. Currently we do return sold_out in the variation when it’s set to sold_out however it’s not documented in the item_variation_data > location_overrides. I’ve shared this feedback with the team. :slightly_smiling_face:

Thanks Bryan. No worries on the delay - this is a busy time of year for all of us. :slightly_smiling_face:

I appreciate you sharing that feedback with the team. Being able to access that field in the .NET SDK is pretty essential for a web app that I’m working on that needs to update a modifier in a certain way if an item is currently sold out. As it stands, I don’t think there’s any way for me to programmatically know that an item is forced to that sold out state, but if there is some other way, let me know! It doesn’t seem to be reflected in the Inventory API unless I’m looking at it wrong.

That’s right, it’s not currently in Inventory API. Are you subscribed to Catalog webhooks?

Gotcha. No, my web app is not currently subscribed to Catalog webhooks, though if there’s something to gain from that for this condition I’m happy to consider it.

The main reason I’m not using webhooks is because I already have to poll Square for Order data, since the Order webhooks don’t trigger when an Order is created in the POS app. Since I have to have polling logic anyway, I just poll for the other data I need as well, including updated CatalogObjects.

@Bryan-Square Hi Brian - it looks like support for the SOLD_OUT field I referenced in my original post here has been added in the latest API version (and .NET SDK release). Just wanted to confirm and extend my thanks!

Yeah, that’s correct! :slightly_smiling_face:

1 Like