Skip to content

Usage

Once you have installed the WooCommerce Zapier plugin on your WooCommerce store, configuring your Zaps/integrations (Triggers and Actions) is done on via the Zapier.com website.

Make a Zap

Tip

If you haven’t created a Zap before, please refer to Zapier’s key concepts article before proceeding.

To create a WooCommerce Zap, we recommend using one of the Zap templates, as it is typically quicker than hand-crafting your own Zap from scratch.

Tip

The actual fields and data can vary depending on the WordPress and WooCommerce versions installed, and by installed plugins and settings. If you are using an Actions template, please refresh the fields to make sure everything is updated to match your individual store.

If you would like to start from scratch, go to your Zapier dashboard page on zapier.com and press the Make Zap button on the left sidebar to set up a new Zap. Alternatively, you can start typing directly on that page.

Zapier Dashboard

Create a Trigger (Outgoing Connection)

This feature allows you to send WooCommerce data to a Zapier Zap.

Step 1: Configure your Trigger step

  1. In the Choose App & Event step, search for the WooCommerce app and click it.
  2. Select the Resource (data type) in the Choose Trigger Event dropdown – for example, Order if you would like to send WooCommerce orders to Zapier.
  3. In the Choose Account step, click on Sign in to WooCommerce button to authenticate your Zapier account with your WooCommerce store.
    If you already authenticated, you can choose the previously used authentication from the WooCommerce account dropdown menu instead.

    Tip

    If you encounter issues while authenticating, please refer to our Troubleshooting Authentication Errors documentation.

    1. In the Customise…1 step, select a Trigger Rule from the Trigger Rule dropdown: – for example, Order created. See here for details on which Trigger Rule to use.
    2. In the Find Data step, click the Test & Continue button to retrieve sample data from your WooCommerce store.

Find Data

When retrieving sample data from your store, it isn’t contextual to the Trigger Rule you have chosen for the Zap. Find Data simply retrieves your most recent store data (regardless of status) when getting sample data.

However, once you turn on on your Zap, the trigger rule will apply and should only send relevant data to Zapier.

Step 2: Configure your Action step

  1. In the Choose App & Event step, choose a service to send your WooCommerce data to.
  2. Finish configuring the the Action step. Please see Zapier’s instructions on setting up your Zap action for more details.

Step 3: Finish Zap Creation

Create an Action (Incoming Connection)

New in version 2.0

Actions allow you to create new (or update existing) WooCommerce data from a Zapier Zap.

Step 1: Configure Trigger steps

  1. In the Choose App & Event step, choose a service to get the data what send to WooCommerce to.
  2. Finish configuring the the Trigger.

Step 2: Configure Action steps

  1. In the Choose App & Event step, select the WooCommerce app.
  2. Choose the Action in the Choose Action Event dropdown – for example, Create Order.
  3. In the Choose Account step, click on Sign in to WooCommerce button to authenticate your Zapier account with your WooCommerce store.
    If you already authenticated, you can choose the previously used authentication from the WooCommerce account dropdown menu instead.

    Tip

    If you encounter issues while authenticating, please refer to our Troubleshooting Authentication Errors documentation.

    1. In the Customise…1 step, fill in all of the WooCommerce input fields that you want to send data to. You can choose data fields from the Trigger part of your Zap, or you can type in hard-coded values.
    2. In the Send Data step, click the Test & Continue button to finish the Action configuration.

Step 3: Finish Zap Creation

Update a Resource

New in version 2.0

This feature allows you to update existing data in WooCommerce from a Zapier Zap. For example, you could create a Zap that updates the inventory (stock) level of a WooCommerce product via a Zap automation.

If you know the ID of a WooCommerce Resource (for example coming fom a previous step), you can update that resource with the new Update Action.

Configure your Zap as seen in the Create an Action chapter above, and in the Choose Action Event dropdown select the corresponding Update Action. Keep in mind updating a Resource always needs a valid ID. To help identify the correct Resource ID, you can use a Find step before the update step.

Create a Resource

New in version 2.0

This feature allows you to create new data in WooCommerce from a Zapier Zap. For example, you could create z Zap that creates a new Customer in WooCommerce whenever they subscribe to your mailing list.

Configure your Zap as seen in the Create an Action chapter above, and in the Choose Action Event dropdown select the corresponding Create Action.

The Zapier Integration (and WooCommerce itself) is quite relaxed when creating a new Resource. You can create orders, products, and subscriptions without any input, but that’s probably not what you want.

  • For Create Coupon, you must provide at least the Coupon code.
  • For Create Customer, you must provide at least the Customer email address.

The required fields are clearly labelled in the Zapier interface.

Tip

For more details on each data field, please consult the relevant Field Definitions documentation.

New in version 2.0

This feature allows you to search for existing WooCommerce data from a Zapier Zap. For example, you could search for a product based on it’s SKU before updating it in WooCommerce.

Configure your Zap as seen in the Create an Action chapter above, and in the Choose Action Event dropdown select the corresponding Find Action.

After finding a Resource you can immediately create one if its not found. This is a great way to implement synchronisation functionality between two apps using Zapier.

Create after Find

Alternatively, after searching you can add an additional step2 to your Zap to use the found Resource/data.

Advanced Zaps

In a Zap you can have additional steps between the Trigger and Action steps:

  • Use a Find step to access additional data.
  • Use the Code built-in app to transform data structures, or calculate new fields.
  • Use the Filter or Paths built-in apps to implement advanced logic or support multiple outputs.
  • Use the Formatter built-in app to transform fields values.

Note

Multi-steps Zaps require a paid Zapier account2. You can add multiple steps in a Zap to combine individual functionalities.

Find Steps

For accessing additional data in your Zap, you can add a Find step between your Trigger and Action steps in your Zap configuration.

You can see a list of available search (find) actions in the Searches documentation.

For example, if you are using one of the Order Triggers, and want to use the line item product category (or tag) in an action step as well, include a Find Product step and use the line_itemssku or line_itemsproduct_id fields to pull all fields from the product, including the categoriesname (or tagsname) array which you can then use in the next step of your Zap.

Code by Zapier

By adding the Code by Zapier step to your Zap, you can add fields based on the trigger data. For example, you can restructure, simplify or calculate new values. The output can be usable in the subsequent steps.

Please see Zapier’s help article for more details on how to use Javascript code in your Zaps.

Below are some examples of what you can achieve using a Code by Zapier step.

Heads Up

The following code snippets are provided as examples only.

We are unable to provide support for writing custom code, so you may need to enlist the support of a a Certified Zapier Expert or Web Developer.

Add “Line Items Count” Field to an Order

// Define "lineItemIDs" in the Input Data section.
// Get the number of line items.
return { line_items_count: inputData.lineItemIDs.split(',').length };
  1. Add a Code by Zapier step to your Zap and choose Run Javascript for the Event Action.
  2. Define lineItemIDs by choosing the 1. Line Items ID in the Input Data section.
  3. Copy the above code snippet and paste it into the Code section.

The step should look like this:

Line Items Count Code settings

The result would show in the subsequent steps like this:

Line Items Count result

Add Meta Data Fields to a Trigger

Additional data for every Resource can be found in the corresponding Meta Data objects. Unfortunately, Zapier.com doesn’t handle these metadata objects very well by default. However with the following snippets, you can extract meta data information into an easily accessible list of fields. (The key used as the field name.)

To expose meta data for a specified Resource, follow these three steps:

  1. Add a Code by Zapier step to your Zap and choose Run Javascript for the Event Action.
  2. Define metaData in the Input Data section. Choose the corresponding fields based on your resource from the following table:

    Resource Field Name Input Data Section
    Coupon3,
    Customer,
    Order,
    Product
    meta_data Choose 1. Meta Data for metaData
    Line Item in an Order4 line_meta_data Choose 1. Line Meta Data for metaData
    Line Item in an Order order_meta_data Choose 1. Order Meta Data for metaData
    Subscription5 meta Choose 1. Meta for metaData

    Info

    Ignore the fact that Zapier interface will show a NO Data label after the field name.

    Heads Up

    If you would like to use meta data from Order Line Items in your Zaps, you must use the Line Item in an Order trigger, and not the Order Trigger. This is so that the Code by Zapier step reliably handles orders containing multiple line items.

  3. Copy the below code snippet and paste it into the Code section.

// Define "metaData" in the Input Data section. Ignore the "No Data" label.
// Reformat Resource Meta Data to generate key/value pairs.
// In case of multiple equal keys, only the last value available.
const buffer = {};
const metaData = inputData.metaData.split(/\n+/);
metaData.forEach((dataString, index) => {
  if (dataString.includes('id:')) {
    const key = metaData[index + 1].replace('key:', '').trim();
    const value = metaData[index + 2].replace('value:', '').trim();
    buffer[key] = value;
  }
});
return buffer;

Here is an example Code step:

Example Meta Key/Value Code settings (Order)

Example fields available in a subsequent steps:

Meta Key/Value result

Some plugins/extensions for WooCommerce store multiple values for the same key. If you want to access duplicated keys in your Meta Data, use the code snippet below instead, to automatically generate unique key names. Duplicated keys will be suffixed with a number, leaving the first key name unmodified:

// Define "metaData" in the Input Data section. Ignore the "No Data" label.
// Reformat Resource Meta Data to generate key/value pairs.
// Add number suffix for duplicated keys.
const buffer = {};
const keyNum = {};
const metaData = inputData.metaData.split(/\n+/);
metaData.forEach((dataString, index) => {
  if (dataString.includes('id:')) {
    const key = metaData[index + 1].replace('key:', '').trim();
    const value = metaData[index + 2].replace('value:', '').trim();
    keyNum[key] = typeof keyNum[key] === 'undefined' ? 1 : keyNum[key] + 1;
    const outputKey = keyNum[key] === 1 ? key : `${key}_${keyNum[key]}`;
    buffer[outputKey] = value;
  }
});
return buffer;

Filter by Zapier

Filter by Zapier allows you to add special conditions to Zaps. For example, using a filter you could configure a Zap to:

  • act only on orders with a status of refunded
  • act only on orders for a specific product category
  • act only on orders that exceed a specified order value
  • act only on orders that are to be shipped to a specific country

Please see Zapier’s help articles for more information on how to use filters in your Zaps.

Paths by Zapier

Paths by Zapier allows you to add branching logic to Zaps. The main advantage of using Paths is that you can create up to three different outputs (paths) within a single Zap.

Please see Zapier’s help article for more details.

Formatter by Zapier

With Formatter by Zapier you format data in Zaps. For example, you can split or combine field contents, convert between different number or date formats, or even transform the whole data structure.

Please see Zapier’s help article for more details.

Existing Connection

To manage, modify, or delete existing connections, please refer to the Zapier Help’s Manage your Zaps page.


  1. Name is dynamically generated based on the Resource, what you selected in the Choose App & Event step. 

  2. Certain Zapier functionality, for example Filter, Paths and Multi-step Zaps are only available with a paid Zapier plan. For pricing information, please refer to the Zapier’s Plans & Pricing page

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

  4. Only available as a trigger. 

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


Last update: May 20, 2020