Help

Add branching logic to Zaps with filters

Last updated:

You can add if/then or branching logic to Zaps by using filters in multiple Zaps. This allows your Zaps to take different actions based on the trigger data received.

Note

If you're on a Professional plan or above, you can add if/then or branching logic to Zaps with Paths.

This article walks through an example of a Shopify store with two items: apples and bananas. When a customer buys an apple, their email address should be added to an 'Alpha-Apple' MailChimp list. When a customer buys a banana, their email address should be added to a 'Beta-Banana' MailChimp list.


1. Create the first Zap and filter

  • In the first Zap, the trigger event is when there is a new Shopify order.
  • Add a filter that identifies when the Shopify order details contain the text Apple.

Apple

  • Next, add a MailChimp action to Add/Update Subscriber. In the action template, select the Alpha-Apple list.

Alpha-Apple


2. Create the second Zap and filter

  • In the second Zap, the trigger event is also when there is a new Shopify order.
  • Add a filter that identifies when the Shopify order details contain the text Banana.

Banana

  • Next, add a MailChimp action to Add/Update Subscriber. In the action template, select the Beta-Banana list.

Beta-Banana

When a customer buys an apple from your Shopify store, it will trigger both Zaps but only pass the filter in the first Zap to get added to the 'Alpha-Apple' MailChimp list. When a customer buys a banana from your Shopify store, it will trigger both Zaps but only pass the filter in the second Zap to get added to the 'Beta-Banana' MailChimp list. This can be repeated with more Shopify store items and MailChimp lists by creating more Zaps with the relevant filter rules.


Need More Help?

Contact Support

Tell us about your problem, and we’ll find you a solution or you can email support.
Get Help

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert

Zapier Community

Connect with other Zapier users and industry professionals to get help crafting the perfect workflow.
Check out the community