skip to Main Content

WooCommerce

Our WooCommerce integration has dozens of triggers to help users customize their automated workflows. But, behind the scenes, not all of these triggers work the same way.

Broadly speaking, there are two types of WooCommerce triggers:

  • product-based triggers, which cause recipes to run once per product, and
  • order-based triggers, which cause recipes to run once.

Understanding the subtle difference between these two types of triggers can help to improve your automated workflows.

Product-Based Triggers

As stated, product-based WooCommerce triggers cause recipes to run once per product. This is because it is the product(s) that is initiating the automated workflow, not the order. In other words, if there is an order with more than one product, a recipe with a product-based trigger will run once for each product in that order.

All product-based triggers are only available in the Everyone recipe type as their purpose is to capture all product-related information, regardless of user status. Product based-triggers usually look something like these ones:

  • A product has its associated order completed, paid for, or a thank you page visited
  • A product has its associated order refunded
  • A product’s inventory status is set to a specific status*

*Product-based triggers that are not associated with orders will only run once unless you are running a looped action for multiple products.

For a full list of WooCommerce triggers, click here.

To better understand product-based triggers, here is a look at a recipe with the trigger Any product has its associated order paid for and the Google Sheets action Create a row in a Google Sheet.

woocommerce-product-based-trigger-for-google-sheets-recipe

To trigger our recipe, we paid for an order with three products: Photography 101, University Mug – Classic, and University Sweater – Classic. Because each product triggered the recipe, Automator populated three new rows in the worksheet, as per the recipe’s action.

woocommerce-order-information-separated-by-row

Looking at the “Order ID”, “Order Date and Time” and “Order Summary” columns, it might appear that Automator duplicated the data. However, the order data for each product is only identical because the products that caused the recipe to run were paid for in the same order.

Looking at the logs for this recipe makes it even clearer that Automator has run the recipe three separate times (once for each product) in quick succession.

product-based-woocommerce-trigger-logs

Whether you are using product-based triggers with Google Sheets or another one of our integrations, the recipe will run once per product.

Order-Based Triggers

As opposed to product-based triggers, order-based WooCommerce triggers cause recipes to run just once. This is because it is the order itself, and not the product(s) within that order, initiating the automated workflow.

The majority of WooCommerce triggers, regardless of recipe type, are order-based or single-run triggers. Most order-based triggers look something like these ones:

  • A user completes, pays for, lands on a thank you page for an order with a product
  • A guest order’s status is changed to a specific status
  • A payment fails on an order

It is also worth noting that all WooCommerce Memberships, WooCommerce Subscriptions and WooCommerce Bookings triggers are single-run.

For a full list of WooCommerce triggers, click here.

To better understand order-based triggers, here is a look at a similar recipe to the one used in the previous section.

In the recipe pictured below we have selected the order-based trigger, A user pays for an order with any product and the Google Sheets action Create a row in a Google Sheet.

woocommerce-order-based-trigger-for-google-sheets-recipe

With the same order from the previous section, Automator created a single new row in Google Sheets. In other words, the recipe ran just once (1) for the order instead of three (3) times for each product within that order.

woocommerce-order-information-concatenated

Once again, the recipe logs make it clear that the order-based trigger caused the recipe to run just once.

order-based-woocommerce-trigger-logs

Knowledge Base Articles

Back To Top