Automation condition builder question

Hi there,

We have a WooCommerce integration and we’d like to tag all purchases as they are made. We have 40-50 unique products and customers can purchase 1-n products in each Order.

My first question is, how do we access all the items in an Order when building conditional checks in an automation? When I try using the Ecommerce triggers, the only trigger that comes up is “Last Product Name”. But, if there is more than one product in the last Order, Last Product Name only returns one of them. How do I access all the products in an order with an if/else? For example, the last Order contains: 1) A course, 2) a textbook. Both with similar product names, the textbook will have “textbook” in the product name. What I want is to tag that customer with an “Enrolled in Course X” tag and a “Purchased Textbook X” tag.

Second, how does the “Contains” operator work (is it case-sensitive)? Or better yet, how should I use it to match non-sequential words in a product name, for example? For example, if there are two products:

  1. Introduction to Medicinal Mushrooms
  2. Introduction to Mushrooms Textbook
    When I use “Contains” do I put “Medicinal Mushrooms” in one condition or do I have to break it up into two: “Medicinal” AND “Mushrooms”

Any guidance is greatly appreciated!

1 Like

Hi @wildrosecollege! Thanks for posting your question here.

The best way to add a tag based on the purchased products would be to give each individual product its own automation. We understand that this can be quite tedious with 40-50 products but at this time, it would be the only option within the platform. We would also suggest looking into a 3rd party API program such as Zapier to see if you can build an integration that could add a tag based on the products that were purchased. If you choose to build the individual automations, your trigger will be “Makes a purchase” and the segment condition will be “Product SKU in any order” or “Product Name in any order” and you will dedicate one product to each start trigger by using the “contains” option. The second step in the automation will be adding the unique tag. We fully understand that this is a complex process to setup, so we definitely recommend posting your suggestions to our ideas page at ideas.activecampaign.com

To answer your second question, the “contains” condition should not be case-sensitive. Looking at your example, if you were to search “Medicinal Mushrooms” it would only bring back the first option which is "Introduction to Medicinal Mushrooms’. If you simply searched “Mushrooms” then it would return both options.

We hope this makes sense and helps. :slight_smile: