Shopify Flow & WhatsApp Reviews: Fixing the 'List-Based Order Data' Glitch
Hey store owners! It's your Shopify migration expert here, and I've got some juicy insights from the community trenches for you. We recently had a fascinating discussion that highlighted a subtle but critical issue many of you might face when trying to set up automated review requests via WhatsApp using Shopify Flow. Specifically, we're talking about the Judge.me Review Requests via WhatsApp template.
One of our community members, HebaAdel, ran into a head-scratcher: her Shopify Flow was showing 'Succeeded', but customers weren't actually getting their WhatsApp review requests. Sound familiar? Let's dive into what was happening and, more importantly, how to fix it!
The Mystery of the Missing WhatsApp Messages
HebaAdel was using the official Shopify Flow template for Judge.me review requests, integrated with a WhatsApp app (WhatFlow Chat Automation). The funny thing was, she had another WhatsApp workflow that worked perfectly fine. The trigger condition (shipping address phone is not empty) was correct, phone numbers were valid, and Judge.me itself wasn't the culprit. So, what was going on?
After some digging, HebaAdel pinpointed the problem to the 'Get order data' step within that specific ready-made template. Even when set to retrieve a Maximum number of orders = 1, the 'Get orders using an advanced query' action was returning a list or array of orders, not a single Order object. This is a crucial detail!
Here's a glimpse of what the problematic setup looked like, where the system was trying to pull the phone number:

The core issue was that because Shopify Flow was treating the result as an array, the variables for the phone number and country code were getting wrapped internally in {% for %} Liquid loops. And here's the kicker: her WhatsApp app (WhatFlow) simply does not support arrays or Liquid loops in its input fields. This meant the WhatsApp action was receiving an empty phone_number or the country code in the wrong field, even though Flow thought it had done its job!
This is a great example of how a 'succeeded' Flow run can still mean a failed action downstream if the data format isn't what the receiving app expects. The community discussion around this was really helpful in clarifying this nuance.
Understanding Shopify Flow's 'List' Behavior
As tim_1, another sharp community member, pointed out, 'Get data...' actions in Shopify Flow will always return arrays of results. It's then up to you to handle that array, either by using a 'Loop' action in Flow itself or by using Liquid filters to extract a single value.
The default Flow template often uses something like this:
{{ getOrderData.billingAddress.phone | first }}
This | first filter is super handy because it grabs the very first item from an array, effectively turning a list of one item into a single item. However, in HebaAdel's case, even with this, the underlying issue was the app's inability to process the internal Liquid loop that Flow was generating.
Here's what the inputs for the WhatsApp action looked like:

The Solution: Get a Single Order Object!
The breakthrough came from HebaAdel's realization that her working workflow used an Order-based trigger (like 'Order created' or 'Order fulfilled'). This type of trigger directly provides a single Order object to the WhatsApp app, allowing order.shippingAddress.phone to be passed as a simple string, which the app understands perfectly.
The ideal fix for the Judge.me template, therefore, isn't to try and coerce an array into a single item using Liquid (though that's useful in other contexts). Instead, it's to change the way the order data is retrieved so that it's a single object from the start.
Step-by-Step Fix for Your Judge.me WhatsApp Flow Template:
If you're using the 'Judge.me Review Requests via WhatsApp' template and experiencing similar issues, here’s what you need to do:
- Locate the problematic step: In your Shopify Flow, find the action titled 'Get orders using an advanced query'. This is the one that's returning an array instead of a single order.
- Replace the 'Get orders' action: Delete or disable this 'Get orders using an advanced query' step.
- Add the correct data retrieval: Replace it with an action that retrieves a single order object directly from the Judge.me trigger. The most straightforward way to do this is to use the action 'Retrieve order details from the order ID provided in the Judge.me trigger'. This ensures that the data passed down the workflow is a single order object, not an array.
-
Update WhatsApp app inputs: Ensure that the subsequent WhatsApp app action's input fields (for phone number and country code) directly reference the single order object. For example, instead of a complex Liquid loop, you should be able to use something like
{{ order.billingAddress.phone }}or{{ order.billingAddress.countryCodeV2 }}, assuming your 'Retrieve order details' step names its output variable 'order'.HebaAdel's original working workflow used
order.shippingAddress.phone, so if your trigger is directly on an order, you might be able to use that too. - Test Thoroughly: Always run a few test orders through your updated Flow to confirm that WhatsApp messages are being sent successfully. Check your WhatsApp app's logs as well for any errors.
A Note on Whitespace (Thanks, tim_1!)
While the main issue here was the array vs. single object, tim_1 also shared a great tip for cleaning up phone numbers if you ever encounter extra spaces or return characters. If you do need to use a Liquid loop for some reason and want to ensure a clean output, you can use Liquid's whitespace control:
{%- for o in getOrderData -%}
{{- o.billingAddress.phone -}}
{%- endfor -%}
The added dashes (-) inside the Liquid tags will strip any extra whitespace around the tags, which can sometimes prevent unexpected formatting issues.
This discussion really highlights the importance of understanding how data flows through Shopify Flow and how different apps interpret that data. Sometimes, it's not just about getting the data, but getting it in the right format. A huge shout-out to HebaAdel for meticulously documenting her findings and to tim_1 for his valuable contributions. This kind of community collaboration is what makes navigating the Shopify ecosystem so much easier!
Keep automating, keep optimizing, and don't hesitate to dive into the community forums when you hit a snag – chances are, someone else has been there and found a solution!