FROM CACHE - en_header

The fulfillments/create webhook does not provide the shipping method the customer has chosen

New Member
3 0 0

I've created a fulfillment service for my store that I integrate with my own FBA fulfillment app. Per the Shopify FulfillmentService docs:

In order to be notified about new fulfillments you should subscribe your application to the fulfillments/create webhook

However, the fulfillments/create webhook does NOT provide any data related to the shipping method that the customer has chosen at checkout, ie. 'standard', 'expedited', 'next day', etc. What is the point of this webhook if it doesn't provide such a basic piece of information that is needed for fulfilling an order?

I do see that the order/payment webhook DOES provide this data, within the shipping_lines array, in addition to lots of other useful order data that is missing from the fulfillments/create webhook.

Both webhooks get fired when an order has been created and paid for. Is there any reason NOT to just use the order/payment webhook to grab the order data needed for adding the order and transactions to my database and fulfilling the order?


Reply 1 (1)
New Member
3 0 0

Hi Shayne,

Thanks for the reply! What I ended up doing was providing 2 endpoints. 1 endpoint for fulfillments/create, that I use to mark the fulfillment completed. Then another endpoint for order/payment that I use to enter the order & line-item info into my database, and then the order gets sent over to FBA via a cron job that runs on the 1/2 hour. Works for me.

Next question (I'm working with a test order, FYI):

Now that the fulfillment is completed (fulfillment status = "success"), Shopify begins querying my fulfillmentService endpoint on-the-hour for tracking info. Great! That's the expected behavior. However, the order_names argument that is provided by the fetch_tracking_numbers.json request is not an exact match to the name field provided by the order/payment webhook.

order/payment webhook:

[name] => #1001

fetch_tracking_numbers.json request:

[order_names] => Array
        [0] => #1001.1

Where is the .1 coming from? Is it the [number] =>1 field/value that is part of the data delivered by the order/payment webhook? That field is described as follows in the Order API Docs:

{ "number" : "1" }

Numerical identifier unique to the shop. A number is sequential and starts at 1000.

Or is it because I am dealing with a test order? Any info you can provide is much appreciated. Need to make sure I am storing the order name accurately in the database so that I can provide tracking info.