Shopify Flow & WhatsApp: Fixing Failed Review Requests
Why Aren't My Shopify Flow WhatsApp Messages Sending?
Ever set up a seemingly perfect Shopify Flow, only to find it's... well, not flowing? We've all been there! Recently in the Shopify Community, HebaAdel ran into a snag with the official Shopify Flow template for "Judge.me Review Requests via WhatsApp." The flow was running, but no WhatsApp messages were being delivered. Sounds frustrating, right?
The good news is, the community jumped in to help, and the solution highlights a common pitfall when working with data in Shopify Flow. Let's break down the problem and how to fix it.
The Case of the Missing WhatsApp Messages
HebaAdel was using the ready-made template to automatically request reviews via WhatsApp after a purchase. They noticed that even though the Flow runs showed as "Succeeded," customers weren't receiving the messages. After some digging, they pinpointed the issue: the way the template was retrieving order data.
Here's the core of the problem, as HebaAdel explained:
The problem is caused by the Get order data step used in the template.
The ready-made template uses:
Get orders using an advanced query
(even withMaximum number of orders = 1)This action still returns a list/array of orders, not a single Order object.
Basically, even though the query was set to retrieve only one order, Shopify Flow was still treating the result as a list (or array) of orders. This might not seem like a big deal, but it caused a ripple effect.
Why List-Based Data Causes Problems
So, why does a list of orders cause issues? Well, here's the breakdown:
- Shopify Flow sees the result as an array.
- Variables are then wrapped internally in
{% for %}loops. - The WhatsApp app (in this case, WhatFlow Chat Automation) doesn't play nice with arrays or Liquid loops directly.
- The WhatsApp action ends up receiving either an empty
phone_numberor the country code in the wrong field. - The Flow run *thinks* it's successful, but no message gets sent.
HebaAdel also shared screenshots that really helped visualize the issue:



The Fix: Getting a Single Order Object
The solution? Make sure the WhatsApp app receives a single, clean Order object, not a list. Here's how you can do it:
- Change the "Get order data" step. Instead of "Get orders using an advanced query," use "Retrieve order details from the order ID provided in the Judge.me trigger."
- Verify your variables. Double-check that you're passing the correct
order.shippingAddress.phoneas a simple string to the WhatsApp app.
Tim_1 also chimed in with some helpful suggestions about whitespace control in Liquid code, which can sometimes cause issues with phone number formatting. If you're still having trouble after implementing the main fix, try this:
{%- for o in getOrderData -%} {{- o.billingAddress.phone -}} {%- endfor -%}
The dashes in the code above will strip any extra spaces that might be causing problems.
Key Takeaways for Shopify Flow Users
This whole situation highlights a few important things to keep in mind when working with Shopify Flow:
- Data types matter. Always be aware of whether you're working with a single object or a list/array of objects.
- App compatibility is crucial. Make sure your apps can handle the data structures that Shopify Flow is passing to them.
- Test, test, test! Always thoroughly test your flows to make sure they're working as expected.
It's awesome to see community members like HebaAdel diving deep and sharing their findings. By understanding the nuances of Shopify Flow and how it interacts with different apps, we can all build more robust and reliable automation workflows. And remember, if you're struggling with a Flow, don't hesitate to reach out to the Shopify Community – you're not alone!