I need a Shopify Flow rule that checks in a created order if street number is missing in the field “order.shippingAddress.address1”, because our customers regularly forget to enter the street number, or the autocomplete does not add a street number.
In Shopify Flow, I can’t find a suitable condition to check if there is no street number missing in the “order.shippingAddress.address1” field.
Here is my example of the Shopify Flow rule I want:
“New created order” is the trigger.
A condition that checks if there are no missing digits at the end of the field “order.shippingAddress.address1”, for example: (0-999)
the tag “valid-address” should then be added to the order as an action if this condition is met.
Background:
I think the pattern could somehow check for numbers at the end of the text string and one or more digits if the field “order.shippingAddress.address1” is correctly filled with a street number.
What method do I need for this? My ideas from the Shopify documentation would be:
A rather hacky way of doing it would be to check if the address includes 1,2,3,4,5,6,7,8,9,0
The other way to do it would be to use liquid and put the liquid directly in the tag field, where it outputs the tag your want if it is missing the number (and nothing otherwise).
To test, I’d recommend you write that liquid in another action that you can easily see after running it (like Send email). Once it outputs the value you want, add all the liquid to a tag and hit enter. It will work
Shopify provides 10,000 emails for free. Can’t you use the quota from there to send an email to the customer? From the user’s point of view, the only thing that needs to be stored is the Customer Email Liquid.
This would bring a significant added value for all Shopify users and reduce the manual effort.
I am new to the Shopify Flow product. I am looking to run a query that tags an order with whether or not the “registered address” from the fraud analysis of an order matches the “shipping address” of the order. I don’t see it on any templates.
I do see this one “Order.billingAddressMatchesShippingAddress”.
I’m not sure what “registered address” you are referring to. Maybe the one on the credit card? That address is not stored and thus not accessible on the order object. The closest you could get to that is to check for the exact text you see in that risk assessment. Here’s the data path :
"order": {
"id": "gid://shopify/Order/9748...830",
"risks": [
{
"display": true,
"message": "Characteristics of this order are similar to non-fraudulent orders observed in the past"
},
{
"display": true,
"message": "Card Verification Value (CVV) isn't available"
},
{
"display": true,
"message": "Billing address or credit card's address wasn't available"
},
{
"display": true,
"message": "Billing address ZIP or postal code isn't available to match with credit card's registered address"
},
{
"display": true,
"message": "There were no payment attempts"
}
]
}
I’ll note that these fields are changing in a soon to be adopted API (2024-04), so this solution will be slightly different after that (Flow typically performs these migrations for merchants where possible, or fixes the workflow to the version).
Thank you for the reply. Yes, sorry for not being specific. The registered
address I was referring to is the one checked in the FRAUD ANALYSIS and
listed as such in the indicator details:
[image: 9fcf0476-9e89-4259-a17b-2371b97e2e80.png]
*Ultimately, we use the 2 lines referencing “Billing street address CC’s
registered address” and “Billing address ZIP or postal matches the CC’s
registered address” as the main determining factor in whether or not we
capture payment and process an order.
It would be great it we could add an automatic tag if these 2 lines are
TRUE.