No effect of notifyCustomer on fulfillmentTrackingInfoUpdate

I have written code to create a fulfillment (fulfillmentCreate) and then later add tracking info (fulfillmentTrackingInfoUpdate). With this code I can replicate the manual process of fulfilling an order, and then adding tracking URL.

However, I haven’t been able to get the notifyCustomer flag to work via the API. If I misspell it, or if I pass a string instead of a boolean, I can trigger an error, so I’m confident that I’m using the right syntax in my GraphQL mutation. But it never sends an email.

I have double checked that the scopes of my app, just in case it doesn’t have permission to send notifications, I’ve given every permission related to fulfillments for example.

Now I’m out of ideas. Is there some magic configuration I’m missing?

I should also say we have an intergration provided by a partner which uses the same process except they use the REST API. They are sending notifications using notify_customer. So the difference boils down to:

  • bug in Graphql that doesn’t exist in REST
  • permission difference (my app has the same, and more, scopes fwiw)
  • configuration not yet found.

Hey @Si_Hobbs,

I tested this on my dev store and couldn’t replicate it. fulfillmentTrackingInfoUpdate with notifyCustomer: true sent the Shipping Update email both when notifyCustomer was omitted on fulfillmentCreate and when it was explicitly set to false.

A couple of things to check:

If neither applies, can you share an example of the full requests you are sending?

The problem occurs is when omit "number", (either with an empty string, or completely).

I assumed that “number” is optional since the API doesn’t complain. On re-reading the documentation the tracking number is not marked as optional, my error.

You might be able to replicate the situation with something like this - at least to note that it does create a tracking info but doen’t send an email, so it’s a bit inconsistent.

{
  "fulfillmentId": "gid://shopify/Fulfillment/12345678",
  "input": {
    "company": "Your Carrier",
    "number": "",
    "url": "https://example.com"
  },
  "notifyCustomer": true
}

or

{
  "fulfillmentId": "gid://shopify/Fulfillment/12345678",
  "input": {
    "company": "Your Carrier",
    "url": "https://example.com"
  },
  "notifyCustomer": true
}

Hey @Si_Hobbs thanks for sharing that. I can confirm the number is required for the notification.

I’ll flag this as an opportunity to update our documentation.

Solved - Make sure that you post values for all three of Company, URL, and Tracking Number. There are cases where it will fulfill without a tracking number and the notification email will fail.

For sure. In some cases, if it’s a known carrier, providing only the number we will build the company and URL fields based on that, but for consistency, I would recommend all 3 as well!