Pending fulfillments are being created seconds after the order is created... but by who?

Solved
Highlighted
Shopify Partner
39 1 3

We have a customer that we are having a problem with. Usually, when we fulfill an order for a Shopify customer, the order initially has 0 fulfillments. We create a fulfillment when we ship the order, e.g.:

 

payload = {
    'order_id': shopify_order.id,
    'notify_customer': notify_customer,
    'location_id': location_id,
    'tracking_url': shipment.label.tracking_url_provider,
    'tracking_number': shipment.label.tracking_number,
    'tracking_company': shipment.label.provider,
}
fulfillment = shopify.Fulfillment(payload)
result = fulfillment.save()

All good right?

 

But we have one customer whose orders are getting fulfillments created on the fly seconds after the order is created. The fulfillment is pending and has all of the line items. But we aren't creating it... .so who is? 

 

order.created_at: 2020-05-07T15:25:29-05:00
fulfillment.created_at; 2020-05-07T15:25:31-05:00

 

See how these objects are created two seconds apart. This seems to create a problem because when we use the code listed above, creating the fulfillment fails, and we get a "Error 422: Unprocessable Entity"

 

The order ID is 2318330069089, if someone on Shopify's side can look at it.

 

The fulfillment service for the fulfillment and the variants is set to our application. So who is creating these fulfillment objects and why? We are fulfilling orders for several Shopify customers, and this is the only shop that is behaving like this. 

 

Thanks!

 

 

 

 

0 Likes
Highlighted
Shopify Partner
39 1 3

This is an accepted solution.

Someone at Shopify has reached out and let me know there is a shop setting that does this:

 

Screen Shot 2020-05-11 at 2.41.57 pm.png

0 Likes
Highlighted
New Member
2 0 0

Where exactly is this setting?  I'd like to try and avoid another API call to fulfill all lines if possible.  I've looked in my Test store and I can't find it anywhere.  I have a similar section but it doesn't look like the screenshot.

0 Likes
Highlighted
Shopify Partner
39 1 3

Settings

Checkout

 scroll down to Order processing and "After an order has been paid"

 

Travis_D_0-1600459137094.png

 

 

 

0 Likes
Highlighted
New Member
2 0 0

Awesome, thanks for the quick reply!

0 Likes