I know that it is possible for shop owners to configure shipping and delivery settings to give their customers the option to select local pickup. However, I can't find any documentation regarding how an order object received through the api or webhook would be marked as a "local pickup". To test, I placed an order on a development shop, with local pickup selected as the shipping method, and then inspected the orders/created payload sent to me by shopify. But I don't see any flag or shipping data that would indicate that the order was marked for local pickup by the customer. Am I missing something? How can we determine that an order is meant for local pickup?
FWIW, after further inspection, it looks like a local pickup order has a couple of defining features:
1. No shipping_address object
2. The shipping_lines title and code attributes are set to the name of the location where local pickup was configured by the shop
While this is workable, its a bit problematic. For one, it seems like there are other scenarios that can result in no shipping address object being included on the order. Also, while highly unlikely, it is technically possible that the name of a location is set to the same thing as the name or code of a shipping method, thus creating a conflict as there's nothing inherently unique about the name of a location. For the programmer, there's also not a way to lookup a location to get its address based on the name, meaning we have to get all locations, then filter the return values based on the name. Not hard, but feels like a hack. Then, as if to throw salt in the wound, Shopify includes an object called origin_location that presumably references the location where the order was placed (though maybe this doesn't necessarily correspond with the local pickup location?), except that the ID attribute on origin_location is NOT an actual location ID, and there is no other location_id attribute on the object either.
All in all, it would be much more helpful if the order actually had a "local_pickup" flag or "local_pickup_location_id" value or something to explicitly mark the order as being set for local pickup. Of course, all of this is based on my own assumptions from a couple of test orders, so if anyone has additional light to shed on the matter, please chime in!
I'm curious to know if you ever got a response related to the point you've made here? I can only agree - less ambiguity here would be nice.
Unfortunately, there's been no reply from Shopify and I haven't found any additional information on managing local pickup orders. It seems like local pickup was a hacked in feature that has never fully been implemented throughout Shopify. For example, while a customer can select local pickup as an option during checkout, the Shopify admin doesn't have the option to select local pickup when creating a draft/manual order. Hopefully this feature gets some attention in the future.
I've just texted the Shopify Support team on Twitter for the same issue. I'm waiting for an answer. The current solution (checking for empty fields) seems like a really bad idea! I hope they've worked on something more reliable.
Hi. I'm dealing with the same situation as you are regarding Local Pickup orders. Based on a couple test orders. I've found that local pickup orders have the same shipping_line.carrier_identifier which is a pretty long and ugly string that goes like "650f1a1...". Does this also happen to your Local Pickup orders?
This is awesome @ggabadian! Did some analysis and found that for local delivery those orders have a common ID for carrier_identifier - thanks for pointing me in that direction. Ridiculous how painful it is to use the API for Local Pickup.
I'm in a position where I need to work towards adding local pickup support but do not have ready access any local pickup orders.
Can anyone ( @ggabadian @Aaron_Kroontje @onera ) confirm for me whether the relevant carriage return identifier is one specific ID, or is it a different ID for each store which can nonetheless be recognized by shared characters? If it is a specific ID, could someone kindly share it here? If the latter, do the similarities end after the initial characters previously mentioned (650f1a1)?
Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...By Gabe Jan 6, 2023
How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...By Skye Dec 30, 2022