Query orders with displayStatus:ATTEMPTED_DELIVERY

Hello, I have trouble getting orders with specific displayStatus,

I have tried to set query in multiple ways:

query=fulfillments.displayStatus:ATTEMPTED_DELIVERY

fulfillments.displayStatus:ATTEMPTED_DELIVERY

status:ATTEMPTED_DELIVERY

but it does not filter by the status, it seems to return last orders when sorted desc.

What I want to achieve is to inform buyers with emaila when their shipping was not delievered becasue of absence, specifically Amz buyers.

Don’t try to guess query filters. The get data task has other examples that show the syntax. You typically cannot use something like fulfillments.displayStatus as almost all filters are just single variable names. The docs for the order query and its filter are here:

https://shopify.dev/docs/api/admin-graphql/2024-04/queries/orders#argument-query

There is no “Attempted delivery” status on fulfillment_status.

Maybe instead you could use “Fulfillment event created” and then check the status of that fulfillment.

I was using [Get fulfillment order data] and I thought that I can use this in query: https://shopify.dev/docs/api/admin-graphql/2024-04/objects/Fulfillment#field-displaystatus

A fulfillment happens for a fulfillment order but they aren’t the same thing.

For that action:
Flow help doc: https://help.shopify.com/en/manual/shopify-flow/reference/actions/get-fulfillment-order-data
Which links to:
https://shopify.dev/docs/api/admin-graphql/2025-01/queries/fulfillmentOrders#argument-query-filter-default