Re: Check for Empty Shipping in Flow

Solved

How to detect empty shipping line in Flow when creating a draft order?

charles_loder
Shopify Partner
25 1 6

I am trying to create a Flow that triggers when a Draft Order (or Order) is created and the conditions are

  1. any of the line items require shipping
  2. no Shipping line is provided

Condition #2 is the issue because the Draft order api assumes that Shipping Line information will be provided, and there is no way to check if a field (e.g. id) is blank — there is no "Is Empty" condition, and the Flow app does not seem to allow "Equal to" to check a blank string.

 

charles_loder_0-1645724245373.png

 

 

Am I missing something in the api or not understanding Flow correctly?

Accepted Solution (1)

Paul_Adams
Tourist
7 1 8

This is an accepted solution.

@Charles I echo this need. I have a Flow checking for empty phone number fields for International Orders.  I tried a number of different scenarios to get this to work, but had to settle for a hack...  
Is_Blank_Klug.png

 

 

It was tedious to enter because once you find the specific variable you want, you still have to navigate through Order --> Address --> Address EACH TIME to select the variable you want for each condition. *sigh*.  You can also set this up as "All conditions met" using "Does Not Include" with the action being on "THEN" instead of OTHERWISE.

I'd probably pull my hair out having to do it for a-z and 1-9; however, you could probably get away with just vowels... 

Considering the major upgrade Flow has experienced recently, it would be nice to have the official way that isn't a kluge though!  

View solution in original post

Replies 4 (4)

Paul_Adams
Tourist
7 1 8

This is an accepted solution.

@Charles I echo this need. I have a Flow checking for empty phone number fields for International Orders.  I tried a number of different scenarios to get this to work, but had to settle for a hack...  
Is_Blank_Klug.png

 

 

It was tedious to enter because once you find the specific variable you want, you still have to navigate through Order --> Address --> Address EACH TIME to select the variable you want for each condition. *sigh*.  You can also set this up as "All conditions met" using "Does Not Include" with the action being on "THEN" instead of OTHERWISE.

I'd probably pull my hair out having to do it for a-z and 1-9; however, you could probably get away with just vowels... 

Considering the major upgrade Flow has experienced recently, it would be nice to have the official way that isn't a kluge though!  

charles_loder
Shopify Partner
25 1 6

Great idea! I was hoping to not have to do a hacky solution, but this will work. Thanks!

zalman
Tourist
5 0 3

It is a nice workaround although as you said Shopify needs to add a blank/not blank option as well.

In regards to specific fields like shipping, it may be easier to use words that would be in all shipping methods. For example all of my shipping methods would include UPS, FedEx, Pickup, Local, or LTL so I would be able to narrow it down to the letters P, L, & E

WorkGPT1
Shopify Partner
39 0 2

 Hello Charles,

 

Seems you have solved your problem. I would like to share one more workflow with you and see if it can help in the future.

 

Update Shipping Carriers by Countries or Tracking Number 

You may refer to this: https://youtu.be/BDmcdC4Z-0Q

Customized ChatGPT for your Shop - Chat with your store data & tools like your virtual assistant.