How to create a condition based on address field length?

Solved

How to create a condition based on address field length?

Erique
Visitor
2 0 0

Hi,

 

I'm building a flow to flag orders with specific shipping address issues. I start with the condition "addressVerified" is "false". But that alone will put way too many orders in the issue bucket. I only want to catch orders that have super short or super long address data. For example, we see only state abbreviation "MA" or "CA" as the main address sometimes. Or the entire address including city, state and country all combined into address line 1 field.

 

Is there a way to build such condition in Flow to check if address length is < = 2 and >= 30?

 

I know there are apps out there that do a better job catching bad addresses. But before I go that route I just want to utilize Flow first to see that it can handle before spending money on more apps. Also many of these bad addresses are populated by Paypal and Apple Pay payments, so the apps are not capable of catching those errors.

 

Thanks!

Accepted Solution (1)

RPiii
Shopify Staff
117 20 36

This is an accepted solution.

You may be able to use a Run code step to evaluate the length of the address using Javascript.

View solution in original post

Replies 2 (2)

RPiii
Shopify Staff
117 20 36

This is an accepted solution.

You may be able to use a Run code step to evaluate the length of the address using Javascript.

Erique
Visitor
2 0 0

That totally worked for me . Thank you!