I’m facing a weird issue. The attached screenshots perfectly explains it I guess. How could it happen that only one variation is showing in the main UI?
If I call RetrieveCatalogObject
endpoint in this Item I get all the 3 variations and I don’t see any difference between them other than their names and prices
Thanks for the detailed information! Would you be willing to share the location_id
that this item is for so we can take a closer look? It does appear that all three items should show up in the first UI screen, so not 100% sure what’s going on yet.
Sure @sjosey. This is the location id: LRQKVARJ3ZPWM
Some more details. Yesterday I’ve created a new app and did the same API call with the same Items/Variations payload. Got the same result. BUT. When I edit a variation then all 3 become visible on the main screen. But if I do the same upsert API call again => only one is visible again
Thanks! Tested this and seeing the same as you. I’ve escalated this to our Catalog team to investigate. I’ll follow up as soon as I have more information.
This should be resolved now. Please let me know if you see otherwise. Thanks, again!
Yep. It is solved
I’m having kind of the opposite issue. I am using a headless client to get a list of catalog objects, but variations that I have disabled within my dashboard for that location are still showing up.
For example, variations[19] has presentAtAllLocations set to true, but absentAtLocationIds[0] set to my only locationId.
For some background: my use case is to have pre-packaged items of variable weights (i.e. frozen meat from our farm.) Since there I don’t currently see a method for having units of variable, I am trying to make variations for each weight option with inventory tracking and purchase the amount in lbs for that specific variation.
@mniaey can you provide an example catalog object id?
For further context, there is a weight option (https://developer.squareup.com/reference/square/objects/CatalogObject#definition__property-measurement_unit_data), you can set the measurement unit data type of any variation. You can create a measurement unit data type of type weight_unit
which controls how it handles the quantity when you’re selling the item. The inventory API also supports decimal based quantities (up to 5 decimal places, I believe) to handle this on the inventory side if needed.
The goal is to have an online store for my farm, so ideally someone would purchase one (unit) Whole Chicken that weighs 2.8 lbs. Do you have a recommended way to go about this, since the item is configured to be either sold by unit (one chicken) or by weight (2.8lbs of chicken) in the Square dashboard?
Here is the example catalog object (truncated to only two variations) to demonstrate what I am talking about. I have provided two variations - 2.8, which is actually enabled for all locations, and 2.81, which is disabled for my one location. I put the relevant section for 2.81 in bold
{
“type”:“ITEM”,
“id”:“V2C76NFTT6RQQPCIMNEWBNZA”,
“updatedAt”:“2021-01-14T23:21:26.345Z”,
“version”:1610666486345,
“isDeleted”:false,
“presentAtAllLocations”:true,
“imageId”:“HX2HNYYFRBELICVB35NBHFOI”,
“itemData”:
{
“name”:“Whole Chicken”,
“description”:"Free-roaming on luscious, green pasture! Our birds are raised start to finish on Stone House GMO-Free feed. ",
“categoryId”:“CWN6KWCD2FC5JVXVQ7I2SUYD”,
“variations”:[
{
“type”:“ITEM_VARIATION”,
“id”:“7YIFGH3VOAFHHSGTDVX4GBTX”,
“updatedAt”:“2021-01-14T23:13:25.59Z”,
“version”:1610666005590,
“isDeleted”:false,
“customAttributeValues”:{“Square:b40d27ae-89ac-4ee5-95db-6c1392a34038”:{“name”:“Stock”,“customAttributeDefinitionId”:“FSKWIYQNKOYTUNYI7GSDKTJE”,“type”:“NUMBER”,“numberValue”:“1.0”,“key”:“Square:b40d27ae-89ac-4ee5-95db-6c1392a34038”}},
“presentAtAllLocations”:true,
“itemVariationData”:{“itemId”:“V2C76NFTT6RQQPCIMNEWBNZA”,“name”:“2.8”,“sku”:“280WHOLECHK”,“ordinal”:0,“pricingType”:“FIXED_PRICING”,“priceMoney”:{“amount”:500,“currency”:“USD”},“locationOverrides”:[{“locationId”:“LT2DV63WPWFKK”,“trackInventory”:true}],“itemOptionValues”:[{“itemOptionId”:“JKHMSCTICP57OLU2BZ22RLX2”,“itemOptionValueId”:“H72YC7JLYYCVLVHA42YOFEEN”}],“measurementUnitId”:“6JK736MYZI57WYZ2Y4YYG4K5”}},
{
“type”:“ITEM_VARIATION”,
“id”:“3AHVDIJXEYH5557OVY7VZ7NP”,
“updatedAt”:“2021-01-14T23:17:18.533Z”,
“version”:1610666238533,
“isDeleted”:false,
"presentAtAllLocations":true,
"absentAtLocationIds":[“LT2DV63WPWFKK”],
“itemVariationData”:{“itemId”:“V2C76NFTT6RQQPCIMNEWBNZA”,“name”:“2.81”,“sku”:“281WHOLECHK”,“ordinal”:1,“pricingType”:“FIXED_PRICING”,“priceMoney”:{“amount”:500,“currency”:“USD”},“locationOverrides”:[{“locationId”:“LT2DV63WPWFKK”,“trackInventory”:true}],“itemOptionValues”:[{“itemOptionId”:“JKHMSCTICP57OLU2BZ22RLX2”,“itemOptionValueId”:“DZJ2V3FUDUAWCBDYV2FS6JZY”}],“measurementUnitId”:“6JK736MYZI57WYZ2Y4YYG4K5”}},
Ah, I think this is due to you only having one location, so there’s no filtering “by location”, and will show all items/variations regardless (or else you wouldn’t be able to find them if you made it unavailable to your only location, I’m guessing).
As for your other inquiry: I would suggest creating two different items; one would be the whole chicken, so you can sell by units, and the other would be “chicken” (or whatever you want to call it) that would be sold by pounds.
Thanks for clarifying the location issue! I will try to create a secondary placeholder location, and see if my API client will still pick it up.
For my inquiry about prepackaged items by weight:
Sorry - I don’t think I am explaining this right.
It’s just one item, a whole chicken with variable weights (each weight possibility is a variation, so 2.8lbs for one chicken, 3.1lbs for another chicken, etc) - so in the example above, the one whole chicken weighs 2.8lbs and its price is $5/lb. However, since it uses the weight measurement, I’m having trouble requiring that the full 2.8lbs be purchased. Someone could potentially order 1.2lbs of that item variation, which doesn’t exist.
Since it’s for an online store, the weights need to be preconfigured, and tied to individual units. My issue is that it’s an either/or situation, where I can only sell by the unit or by weight, but not have variations where individual units of a predetermined weight can be sold.
Does that make more sense? I’m not expecting a full feature to be built around the concept of nested or hierarchical measurements, just some advice on how to work around the current limitation.
Ah, I see, I was misunderstanding a bit. Yeah, I think this would be easier if it was it in-person, as you could just weigh it and enter it in the quantity
field. I think in an online setting, typically most stores would just share an approximate price (like $0.99 per pound or something) and charge you once they pick it out based on the actual weight.
So if you were using the Orders API to do this, you could create the order when the customer checks out, and update the order with the actual quantity (pounds) when the merchant picks out the chicken and weighs it, then charge the customer the final price instead of listing all possible weight types.