What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

draft_order/create webhook doesn't include draft order metadata

draft_order/create webhook doesn't include draft order metadata

ericfroese
Shopify Partner
5 0 11

Hello! We are working on an application which creates a draft order and then completes the draft order. The problem is that we have to sleep our process in order to avoid the "This order has not finished calculating, please try again later" message.

 

In order to avoid this sleep, we are instead listening for the draft_order/create webhook. The problem we are facing is that the draft order metadata is not coming in the webhook payload so that we can pass a state between the initial order creation and the webhook.

 

Is there a way to make the  draft_order/create webhook payload include the draft order metadata?

 

Thank you in advance for your assistance!

 

Eric

Replies 2 (2)

KB77
Shopify Staff
59 6 11

Hi @ericfroese ,

I had a closer look at your question regarding the use of draft order webhooks and wanted to confirm some details to make further suggestions. 

  • Are you referring to webhooks created in the admin or via the API?
  • By metadata are you referring to appended details to the webhook payload? or metafield data from the draft order resource?
  • Would you be able to share an example of the documentation you are using as well as an example webhook payload body and x-shopify-webhook-id header value returned with the example payload response? Please be careful to exclude any private store info.

Happy to take a closer look once I know more. - Thx.

KB77 | API Support @ 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

ericfroese
Shopify Partner
5 0 11

Hi @KB77 ,

 

I actually ended up dropping our webhook based approach and went for an inline polling approach to determine when the draft order was ready for completion. This was actually the recommended approach in the API docs. The original reason for this question is no longer relevant. 

 

Thanks for your response! Have a great day.

 

Eric