Workflow/Tag orders in case customer has previous orders with different email

Topic summary

A user is attempting to create a Shopify Flow workflow to tag orders when a customer has previous orders using the same mobile number but a different email address.

Current Workflow Setup:

  • Trigger: Order Created
  • Advanced query searches for orders matching the phone number but excluding the current email
  • Counts matching orders
  • Adds tag “X” to orders

Problem:
The workflow incorrectly tags all orders regardless of whether the condition is met (always returns true).

Key Issue Identified:
A respondent points out that the workflow lacks a proper conditional check—it’s counting orders but not evaluating whether that count meets specific criteria before applying tags. The workflow needs a condition step to verify if previous orders exist before tagging.

Status: The issue remains unresolved, awaiting clarification on where the conditional logic should be implemented.

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

Hello, I am trying to do a workflow to tag orders for customers who have previous orders (with different email address but same Mobile number)

trigger: Order Created

Action: getorderDate -----> Advanced query: order.phone:“{{ order.phone }}” AND -order.email:“{{ order.email }}”

Action: Count

Action: Add order tag “X”

the workflow is always giving me true condition and tag all orders whether the conditon is fulfilled or not.

Can anyone help?

Based on your description, the workflow will start when an order is created, then return a list of orders that use both the same email and phone number, then count the number of orders, then add order tags to all those orders. Where is the condition and what are you checking for?