Actions and Searches
An action is an event a Zap performs after it is triggered. Actions allow you to create new or update existing WooCommerce data from a Zap.
Searches let you find existing WooCommerce data in a Zap, and then use it later in a subsequent step.
Coupons¶
If your WooCommerce store has coupons enabled1, the following actions are available for use in your Zaps to create, update or find coupons.
Create Coupon¶
Creates a new Coupon in WooCommerce.1
A common use case of this action is 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:
When automatically creating Coupons in Zaps, it’s usually best to use simple, unique 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:
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:
Tip: Using the WooCommerce URL Coupons Extension?
Please see here for some suggestions.
Update Coupon¶
Updates (modifies) an existing Coupon in WooCommerce.1
Tip: Resource ID is Required for Update Steps
An Update action always needs a valid ID to be specified, so that your Zap knows which record to update.
To help identify the correct Resource ID, you can add a Find step before your update step. The result of your Find step will contain the Resource ID, and then you can use that in the Update step.
Find Coupon¶
Searches for an existing Coupon in WooCommerce. Optionally create one if none are found.1
All available search fields can be viewed here. We recommend the using the following 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.
Tip: Search Sort Order
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.
Customers¶
The following actions are available for use in your Zaps to create, update or find customers.
Tip: What is a Customer?
A Customer in WooCommerce is someone with a user account to log in to your store. People purchasing as a guest (without logging into an account) are not considered customers.
Create Customer¶
Creates a new Customer in WooCommerce.
Update Customer¶
Updates (modifies) an existing Customer in WooCommerce.
Tip: Resource ID is Required for Update Steps
An Update action always needs a valid ID to be specified, so that your Zap knows which record to update.
To help identify the correct Resource ID, you can add a Find step before your update step. The result of your Find step will contain the Resource ID, and then you can use that in the Update step.
Find Customer¶
Searches for an existing Customer in WooCommerce. Optionally create one if none are found.
All available search fields can be viewed here. We recommend the using the following 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.
Tip: Search Sort Order
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.
Orders¶
The following actions are available for use in your Zaps to create, update or find orders.
Create Order¶
Creates a new Order in WooCommerce.
Update Order¶
Updates (modifies) an existing Order in WooCommerce.
Tip: Resource ID is Required for Update Steps
An Update action always needs a valid ID to be specified, so that your Zap knows which record to update.
To help identify the correct Resource ID, you can add a Find step before your update step. The result of your Find step will contain the Resource ID, and then you can use that in the Update step.
Find Order¶
Searches for an existing Order in WooCommerce. Optionally create one if none are found.
All available search fields can be viewed here. We recommend the using the following 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.
Tip: Search Sort Order
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.
Products¶
The following actions are available for use in your Zaps to create, update or find products.
Create Product¶
Creates a new simple Product in WooCommerce.
Update Product¶
Updates (modifies) an existing simple Product in WooCommerce.
Tip: Resource ID is Required for Update Steps
An Update action always needs a valid ID to be specified, so that your Zap knows which record to update.
To help identify the correct Resource ID, you can add a Find step before your update step. The result of your Find step will contain the Resource ID, and then you can use that in the Update step.
Find Product¶
Searches for an existing Product in WooCommerce. Optionally create one if none are found.
All available search fields can be viewed here. We recommend the using the following 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.
Tip: Search Sort Order
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.
Subscriptions¶
If your WooCommerce store has WooCommerce Subscriptions installed4, the following actions are available for use in your Zaps to create, update or find products.
Create Subscription¶
Creates a new Subscription in WooCommerce.4
Update Subscription¶
Updates (modifies) an existing Subscription in WooCommerce.4
Tip: Resource ID is Required for Update Steps
An Update action always needs a valid ID to be specified, so that your Zap knows which record to update.
To help identify the correct Resource ID, you can add a Find step before your update step. The result of your Find step will contain the Resource ID, and then you can use that in the Update step.
Find Subscription¶
Searches for an existing Subscription in WooCommerce. Optionally create one if none are found.4
All available search fields can be viewed here. We recommend the using the following 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.
Tip: Search Sort Order
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.