Fulfillment Notification being received before FulfillmentOrder is updated

Fulfillment Notification being received before FulfillmentOrder is updated

croederLGP
Tourist
3 0 3

I am in the process of writing a fulfillment service app for one of our customers, and I am receiving fulfillment_request and cancellation_request notifications successfully on the callback. However, when I receive the cancellation_request notification if I use GraphQL (below) to find fulfillment orders in cancellation_requested status I get zero results. Then later on when another fulfillment_request comes in it shows up if I re-query for it. Is there a reason it is delayed? Do I need to query for both statuses when I get either notification?

 

{
            shop {
              assignedFulfillmentOrders(first: 10, assignmentStatus: CANCELLATION_REQUESTED) {
                edges {
                  node {
                    id
                    order{
                      id
                    }
                    merchantRequests(first: 10, kind: CANCELLATION_REQUEST) {
                      edges {
                        node {
                          id
                          message
                          kind
                          requestOptions
                        }
                      }
                    }
                    requestStatus
                    status
                  }
                }
              }
            }
          }

 

Replies 4 (4)

Anindita
Shopify Partner
675 34 96

Hi @croederLGP 

 

You can contact Shopify live chat support to resolve this: https://help.shopify.com/en/questions#/contact/chat 

 

Customer Success @ PluginHive
Shipping Automation | FedEx shipping | Multi-carrier shipping | Shipment Tracking | Australia Post shipping
croederLGP
Tourist
3 0 3

Reached out to support, no one can assist with this issue since it is technical in nature and deals with API calls.

croederLGP
Tourist
3 0 3

In case anyone else is having this issue, I am including additional debug data showing the timing issue.

 

fulfillment_order_notification: 2022-06-02T15:02:47.113Z {"kind":"CANCELLATION_REQUEST"}
 cancel query: 2022-06-02T15:02:47.511Z
 [ [length]: 0 ]
 fulfillment_order_notification: 2022-06-02T15:03:01.523Z {"kind":"FULFILLMENT_REQUEST"}
 cancel query: 2022-06-02T15:03:01.794Z
 [
   {
     node: {
       id: 'gid://shopify/FulfillmentOrder/...',
       order: { id: 'gid://shopify/Order/...' },
       merchantRequests: { edges: [ [Object], [length]: 1 ] },
       requestStatus: 'CANCELLATION_REQUESTED',
       status: 'IN_PROGRESS'
     }
   },
   [length]: 1
]
dahu33
Visitor
1 0 1

We are having the same issue with both the REST API and the GraphQL API and so far, after over a month of back and forth with the Shopify Partner support team, we haven't made any progress. They are basically just denying the existence of the bug which is not very helpful.

 

Until Shopify fix this issue, I don't think it's possible to reliably support fulfillment cancellation requests...