Best answer

How to hide a part of WooCommerce data in outbound email Zap

  • 29 November 2022
  • 5 replies
  • 71 views

Userlevel 1
Badge +1

Hi!

 

So, my situation: 
- I have a Woocommerce store
- After any created order, send an outbound email to two different shipping partners, using filter on product(name) (using the ‘Line items name’ data)  to define which partner the email should go to.

So far so good, I have created 2 Zaps, one for each of my shipping partners, since product X needs to be shipped by partner A and product Y should be shipped by partner B.

I am using the ‘Line items name’ in the outbound emails to shipping partners. 

So here is my question: if a customer buys both Product X and Y, there are two emails being sent to both shippings partners.  BUT due to privacy reasons, I don’t want shipping partner A to see the order name Y in their email, and vice versa for the email sent to partner B. FYI both product names are retrieved via the ‘Line items name’ data).

Is there a way to do this?

Hope there is a solution!

Matt

icon

Best answer by Mattieman 7 December 2022, 11:51

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +12

Hi @Mattieman!

It sounds like you need some conditional logic in your Zap, something like:

  • If line items include neither product x or y, send no email
  • If line items include product x, send an email to supplier A (and not supplier B)
  • If line items include product y, send an email to supplier B (and not supplier A)
  • If line items include products x and y, send separate emails to suppliers A and B

With that type of logic, you could write a different email depending on what was ordered. Have I understood that correctly?

 

If you have a professional Zapier plan or higher, the simplest way to do that is to use Paths, which let you set up different sets of actions based on this kind of logic. If you don’t have a professional plan, then you could use multiple Zaps with a Filter step after the trigger. In this case, you’d need 4 Zaps and the filter step would look for the specific products in the line items. You can learn more about using more than one Zap with Filters to create conditional logic in this guide: Add branching logic to Zaps with filters

 

I hope that gets you started in the right direction, let us know if you need some more help or if I’ve misunderstood what you need to do. Thanks!

Userlevel 1
Badge +1

Hi @Danvers 

You are very correct that this is what I need :)

I am on a free account atm, will check out your tips first, thanks!

Userlevel 1
Badge +1

Ah, yes, this is what I already created. But my issue is, that the Line item data combines all the product ID’s into 1.

So although I can (and have) set up a filter that says:

  • if line item pr ID = 8859 only send to partner A
  • if line item pr ID = 9055 only send to partner B

But my issue here is: when a customers orders both (like in the screenshot), the filters both say: yep, lets send an email (to both). But now the email that will be sent, will have both Product ID’s in the email, since I cant seem to differentiate on a single PR ID. 

Catching my thoughts here? I seems like there is not a fix for this, since the Line items PR ID accumulates all products into one line.

Maybe you have a different idea on this, which I am eager to learn about!

Tnx, Matt

Userlevel 7
Badge +11

Hi @Mattieman!

I don’t readily have WooCommerce to test with, but can you try using the Formatter app, then select Utilities, then Line-Item to Text? You would map the field you’re showing above, then select what you want as the output.

That should give you some options to “convert” what’s currently in that unusable form, into text you can filter on :)

Userlevel 1
Badge +1

Hi @nicksimard 

 

Thanks, will try that as well. Cause what I did to solve it now, was use a different trigger for the woo-commerce app. Now I am using ‘Line item in an order’. And in this data set all products get a separate line item field. So now I can use the filter. The downside however is that I will have to  upgrade to a Professional account, since Zapier keeps holding tasks… Which is a sales funnel, I get that, but telling me in advance would be the more gracious way of selling the product.