I'm working on an app to integrate a third fulfillment service with Shopify (let's call them FS, to avoid confusion between the third party and the FulfillmentService API). FS does not manage inventory. The merchant fulfills the orders by packaging them and dropping them off to FS's drop-off location, after which FS ships the orders to one of their pickup location (selected by the customer on the cart page, and stored as a cart attribute).
I want the products to be set as non-physical products, because it seems to be the simplest way to keep the checkout from asking the customer for their address, which will only cause confusion, as the products will not be shipped directly to them.
I'm at the point where when the order is fulfilled in the admin area, the fulfillment/create webhook is sent, and my app successfully creates an order with the third party's API. It is my understanding that if the fulfillment service (now we're talking API, not the third party service) created by my app is used, then the fulfillment service endpoint is sent a request by Shopify on an hourly basis. In this case, the service is set not to manage inventory, but to support tracking...
$new_fulfillment_service = [ "fulfillment_service" => [ "name" => "FS", "callback_url" => "https://redacted.website/fulfillment_status.php", "inventory_management" => false, "tracking_support" => true, "requires_shipping_method" => true, "format" => "json" ] ];
Ideally, I'm thinking I would want "requires shipping method" set to false, and "tracking support" set to true and then in my callback script, check the status of the order every time Shopify sends it's hourly webhook, so I can notify Shopify when the package is ready to be picked up. I don't want to rely solely on FS' notifications, because the customer will have never had any contact with them directly. I want the store to let them know that their order is ready for pickup.
When I fulfill the order, it is sending the webhook to my app, but will Shopify still send a request to my fetch_tracking_numbers endpoint on an hourly basis for an order made up of products that are set as "not physical?"
I'm getting a little confused because everything I know about fulfillment services is based on those that manage inventory and handle everything for the merchant, and this is a bit non-standard. I hope I'm even using the correct API because I'm near the end and I'd hate to have to change directions and rewrite the whole thing.
I've decided to side-step the issue and just have cron run a script that will check the status with the third party API, and then send an update to Shopify. Funny story, apparently you can't mark an item as delivered unless you're using one of 5 or 6 carriers that are supported? I really hope I don't have to do something hacky like submit a fake tracking number or use some other similar notification and just modify the email template to say "Ready for pickup." I mean it could work but it feels super sketchy for an app that I'm hoping to make public in the future.
Anyway, I'd still like to get a clearer understanding of the FulfillmentService API so if anyone does have an answer to my original question, I'm still all ears.
EDIT: I lied...
Hey @gordonzed ,
I think you're on the right track here, your solution may be able to be simplified (as it seems like you've started doing). I'm not sure if you need a fulfillment service app involved in this process.
Setting tracking_support to 'true' with a fulfillment service will mean that once orders are fulfilled, we'll expect the fulfillment service that you created to provide tracking numbers - so we'll check every hour to see if you have any to provide to us.
Have you considered using the Fulfillment API to create the initial fulfillment, and then use the Fulfillment Event API to update the status as your FS moves the shipment along? Essentially your app could be the middleman that synchronizes the status at your FS with your shop and updates the fulfillment's status whenever you want it to.
|2 hours ago|
|2 hours ago|
|2 hours ago|