Call up order number shopify flow

Topic summary

A user is attempting to create a Shopify Flow that sends an internal message displaying a customer’s name and their most recent order number—specifically, the customer-facing order number.

Problem:

  • {{customer.displayName}} successfully retrieves the customer name
  • Multiple attempted variables return incorrect values:
    • {{customer.lastOrder.poNumber}}
    • {{orders_item.confirmationNumber}}
    • {{orders_item.id}}
    • Various loop iterations through customer orders

Solution provided:

  • Use order.name to retrieve the customer-facing order number

The issue appears resolved with this straightforward variable correction.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

I am trying to create a flow to send an internal message that shows the persons name and the order number customers see.

{{customer.displayName}} will bring up the customers name

but I want to bring up the order number, the one they get, of their last order. I tried using {{customer.lastOrder.poNumber}} but it brings up a string of text numbers that dont match.

Ive also tried the ones below and still not a match

{% for orders_item in customer.orders %}
{{orders_item.confirmationNumber}}
{% endfor %}

{% for orders_item in customer.orders %}
{{orders_item.poNumber}}
{% endfor %}

{% for orders_item in customer.orders %}
{{orders_item.id}}
{% endfor %}

{% for orders_item in customer.orders %}
{{orders_item.poNumber}}
{% endfor %}

It’s order.name

1 Like