How to fetch delivery instructions with Shopify Flow?

Our client’s using an external service provider for the local delivery method. We’ve build a workflow with Shopify Flow that collects all of the necessary data and sends an email to our service provider. Which works just great.

When using the local delivery option Shopify shows an additional and optional input field during the checkout where the client can add delivery instructions (like door codes etc.). However, we cannot seem to find a variable for the local delivery “delivery instructions”.

We couldn’t find anything useful in any of the documentation documents and even the Shopify support couldn’t help us.

Has anyone achieved this yet?

Can you share a screenshot of an example? There are several possible places that field could exist.

Most likely it is order / customAttributes

Hi @paul_n ,

a screenshot of what exactly? The order instructions field in the checkout?

I’ve checked fulfillments, orders, searched for “instruction”, “note”, “local delivery” but couldn’t find anything.

Since the local delivery instruction is deleted after the order is fulfilled, my suspicion is that it can’t even be accessed via Flow. But maybe I’m wrong. Let me know how I can give you further information if needed.

Where in the Admin do the delivery instructions show up?

It’s right next to the order note field, see screenshot attached (sorry, interface is in German).

Those are order / customAttributes

The key is Zustellungsanweisungen and value is the instructions.

You can see it in Flow by using Log output action to loop over the customAttributes and print out the key/value pairs.

{% for ca in order.customAttributes %}

{{ ca.key }} - {{ ca.value }}

{% endfor %}

I’ve tried that before, but that would only print out the attribute before that. “AGBs zugestimmt am…” + Timestamp. That is added through an app that checks for the terms & conditions checkbox. Seems like the delivery instructions are not part of the custom attributes.

{% for customAttributes_item in order.customAttributes %}
  {{customAttributes_item.key}}:
  {{customAttributes_item.value}}
{% endfor %}

Are you sure that the order still had the instructions when the Flow ran?

That’s a good point. The email is triggered once the order is fulfilled. That’s probably the same time that the delivery instruction is deleted as well.

So I just tried to safe the order instruction to a new metafield, so we can fetch the information from there. However, same result. Only the terms&condition data is saved… Maybe I’m missing something here.

Are you saving it to the metafield with the same trigger? If so, it won’t have the right value. It might work if you save it when the order is created (via a separate workflow). But if you auto-fulfill it may still be at the same time.

Can you instead stop your system from deleting that message?

I created a second workflow that’s triggered by the creation of the order. At that point the local delivery instruction is still there.
I’m not sure that’s possible. I’ve talked to one of your colleagues via the support and all they said is that this is expected behavior, to keep the order data clean and simple. I’d guess it has something to do with security as well, in case customers add door codes etc. to that note.

Would you reckon there’s anything wrong with the for-loop?

So in that second workflow, you were still not seeing that field? I wonder if they are purposely excluding it from the API, then, based on the key.

Nope. I’ve also tried with disabling the terms&conditions field, just to make sure that’s not “overwriting” the delivery instructions. But without that the flow throws an error “can’t be blank”. Which means the delivery instructions are not part of the custom attributes.

Thanks for your patience. I haven’t been able to test this in my store as I don’t have local pickup enabled, but I’m waiting on a response from the team that owns this. Can you try one more field?

order / fulfillmentOrder / deliveryMethod / additionalInformation / instructions

Hi @paul_n ,

thank you! Actually I tried to find the instruction in the deliveryMethod before as well, but unsuccessfully.
See screenshot attached, I can’t see the additionalInformation there.

Oh, it’s on “unstable” so not yet available in Flow (unstable APIs change frequently).

https://shopify.dev/docs/api/admin-graphql/unstable/objects/DeliveryMethod#field-deliverymethod-additionalinformation

At least it seems to be the correct object :grinning_face_with_smiling_eyes:

instructions String

The delivery instructions to follow when performing the delivery.

We have the same issues, it seems like no object structure has this information anywhere. We also face this issue while adding the order delivery instructions using Flow. Is there any help available on this?

order / fulfillmentOrder / deliveryMethod / additionalInformation / instructions doesn’t exist.

and no field point toward the local delivery instructions.