Skip to content

Actions and Searches

An action is an event a Zap performs after it is triggered. Actions allow you to create, update or find WooCommerce data from a Zap.

Every Resource supports three basic actions (and searches) in the Zapier interface:

  • Create: for creating a new Resource in WooCommerce.
  • Update: for updating an existing Resource in WooCommerce.
  • Find: for searching for an existing Resource in WooCommerce.

Actions

Available Actions

Below is a description of all available Actions that can be used in your Zaps. Click on an Action for more details and tips.

Action Description
COUPONS1
Create Coupon1 Creates a new Coupon in WooCommerce.
Update Coupon1 Updates (modifies) an existing Coupon in WooCommerce.
CUSTOMERS
Create Customer Creates a new Customer in WooCommerce.
Update Customer Updates (modifies) an existing Customer in WooCommerce.
ORDERS
Create Order Creates a new Order in WooCommerce.
Update Order Updates (modifies) an existing Order in WooCommerce.
PRODUCTS
Create Product Creates a new simple Product in WooCommerce.
Update Product Updates (modifies) an existing simple Product in WooCommerce.
SUBSCRIPTIONS4
Create Subscription4 Creates a new Subscription in WooCommerce.
Update Subscription4 Updates (modifies) an existing Subscription in WooCommerce.

Tips & Tricks

Some Actions are more complex than others. Below are some tips and tricks to help you get the most out of these more complex Actions.

Coupons

Create Coupon

Here are some tips when using the Create Coupon action to create new WooCommerce Coupons via Zaps.

A common use case of this action to automatically create a unique coupon code for each customer that joins your mailing list.

To achieve this, in your Zap’s Create Coupon action, you would set the Email Restrictions data field to your customer’s email address from the Trigger (step 1) part of your Zap:

Email Restrictions Example

Alphanumeric (Simple) Coupon Codes

When creating Coupons, it’s usually best to use simple alphanumeric coupon codes.

You can add a Code by Zapier step to your Zap which automatically generates an alphanumeric coupon code (a-z, 0-9 and hyphens only) based on the customer’s email address:

Code by Zapier Example

Input Data:

  • customer → User Email Address From Step 1 in Your Zap (or any other uniquely identifiable information such as a customer name).
// Generate an alphanumeric coupon code (a-z, 0-9 and hyphens) based on the input.
return { slug: input.customer.replace(/[^A-Za-z0-9-]+/g, "") };

You can then use the result of this Code by Zapier step in your Create Coupon action:

Create Coupon Code Example

Tip: Using the WooCommerce URL Coupons Extension?

Please see here for some suggestions.

Searches

Searches let you find existing WooCommerce data in a Zap, and then use it later in a subsequent step.

Available Searches

Below is a description of all available Search Actions that can be used in your Zaps.

Search Description
Find Coupon1 Searches for an existing Coupon in WooCommerce.
Optionally, create one if none are found.
Find Customer Searches for an existing Customer in WooCommerce.
Optionally, create one if none are found.
Find Order Searches for an existing Order in WooCommerce.
Optionally, create one if none are found.
Find Product Searches for an existing Product in WooCommerce.
Optionally, create one if none are found.
Find Subscription4 Searches for an existing Subscription in WooCommerce.
Optionally, create one if none are found.

Tips & Tricks

Some Searches are more complex than others. Below are some tips and tricks to help you get the most out of these more complex Searches.

Tip

Searches return the first result found, and make it available in your Zap’s subsequent action step.

Each search has a default sort order, so when definining your Search step, you can use the Order and Orderby fields to choose (for example) whether the most recent result or the oldest result is returned from your search.

Find Coupon

Recommended search fields:

  • Code: Searches for the specified coupon code.
  • Search: Searches the Coupon Name and Coupon Description fields for the specified string/term/phrase.
  • Coupon ID: Searches for the specified (numeric) coupon ID.

Find Customer

Recommended search fields:

  • Email: Searches for the specified customer email address.
  • Search: Searches the Customer Username, Customer Email, Customer URL, Customer Display Name fields for the specified string/term/phrase.
  • Customer ID: Searches for the specified (numeric) customer ID.

Find Order

Recommended search fields:

  • Search: Searches the Billing Address, Shipping Address, Billing Last Name or Billing Email fields for the specified string/term/phrase.
  • Order ID: Searches for the specified (numeric) order ID.

Find Product

Recommended search fields:

  • SKU: Searches for the specified product SKU.
  • Search: Searches the Product Name and Product Description fields for the specified string/term/phrase.
  • Product ID: Searches for the specified (numeric) product ID.

Find Subscription

Recommended search fields:

  • Search: Searches the Billing Address, Shipping Address, Billing Last Name or Billing Email fields for the specified string/term/phrase.
  • Subscription ID: Searches for the specified (numeric) subscription ID.

  1. Only available if the Coupon functionality is enabled in your WooCommerce store. (Enabled by default). 

  2. Available for both Order and Line Item in an Order

  3. Only available as a trigger. 

  4. Only available if the WooCommerce Subscriptions plugin is installed. 


Last update: June 8, 2020