Creating a flow to hold orders from the same billing address in a 24 hour period

I have a store with guest checkout enabled where resellers are placing multiple orders from various (and sometimes made up) email addresses as a work around our quantity limitations and to abuse our discount codes.

There is a premade Shopify flow to check if the same customer placed other orders within the last 24 hours and to set a hold on those orders, however this won’t help because customers are creating multiple email addresses and creating a new customer ID each time.

I’m trying to modify the existing flow to find duplications of customers with the same billing address 1 and zipcode, but I’m running into some issues. Is this possible to implement?

created_at:<=‘{{ “now” }}’ AND created_at:>‘{{ “now” | date_minus: “1 days” }}’ AND billing_address:{{ order.billingAddress.address1}}

Referenced flow: https://help.shopify.com/en/manual/shopify-flow/advanced-workflows/examples#:~:text=If%20there%20are%20two%20or%20more%20orders%20placed%20by%20the%20same%20customer%20in%20the%20same%20day%2C%20then%20the%20fulfillment%20of%20the%20orders%20is%20placed%20on%20hold%20and%20tags%20are%20added%20to%20the%20orders.

1 Like

I would resist the urge to invent filters as it can be difficult to troubleshoot. Here’s a list of available filters: https://shopify.dev/docs/api/admin-graphql/2024-04/queries/orders#argument-query

This is not a query filter for street. There is a generic search field called default that mirrors what you see in the Admin search box. It does match on street name. But it matches on many things, so can return false positives.

You could do that and then use something like run code to inspect the orders you get back, to see what matches and count them up.