Order Risk Analysis and Releasing the Held Fulfillment on a TBYB Order

BlackCart
Shopify Partner
6 0 0

We are building a try before you buy app and would like to run order risk analysis before fulfillment of the order.  We received advice from Shopify that we can hold the fulfillment of the order by setting the SellingPlan's delivery_policy: { fulfillment_triggerUNKNOWN }, run our risk analysis, and then release the holded (held?) fulfillment in the order if the risk is acceptable.  What I am struggling to figure out is how to release the fulfillment?  How can we tell if an order has a fulfillment that is held?  What mutations do we need to call to release the fulfillment?  Thank you for your help!

Reply 1 (1)

Liam
Shopify Staff
2731 298 769

Hi BlackCart,

 

To create/ release a fulfilment you'd typically use the fulfillmentCreateV2 mutation. To tell if an order has a fulfillment that is held, you should be able to query the order and check for the `displayFulfillmentStatus` field which has a possible value for `ON_HOLD`. Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog