---
title: "WooCommerce JSON Filter: Advanced and Expert Modes"
description: "A WooCommerce JSON filter controls which order data AnyAPI sends to an API endpoint. With Advanced mode, you select the fields your destination needs. In contrast, Expert mode lets you build a custom JSON structure using order-data variables. This guide…"
url: "https://anyapiplugin.com/docs/json-filter-mode/"
updated: "2026-10-30"
category: Core Features
---

# WooCommerce JSON Filter: Advanced and Expert Modes

A WooCommerce JSON filter controls which order data AnyAPI sends to an API endpoint. With Advanced mode, you select the fields your destination needs. In contrast, Expert mode lets you build a custom JSON structure using order-data variables.

This guide explains both options, how to choose between them, and what to check before using a custom payload for live orders. Advanced and Expert modes are available on the **Lite plan**.

## Choose a WooCommerce JSON Filter Mode

AnyAPI provides three modes for preparing your order payload:

| Mode | Available on | What it does |
| --- | --- | --- |
| Basic | Starter and Lite | Sends the complete order object automatically, without selecting fields. |
| Advanced | Lite | Sends the order fields you select. |
| Expert | Lite | Sends a custom JSON structure containing literal values and order-data variables. |

If you are configuring your first integration, follow the [WooCommerce API Integration Setup guide](https://anyapiplugin.com/docs/woocommerce-api-integration-setup/) first. You can then return here to customize its payload.

[![WooCommerce JSON filter modes in the AnyAPI integration wizard](https://anyapiplugin.com/wp-content/uploads/2026/08/docs-json-filter-mode-1-1024x504.png)](https://anyapiplugin.com/wp-content/uploads/2026/08/docs-json-filter-mode-1.png)

## Advanced Mode: Select Your WooCommerce JSON Filter Fields

Advanced mode lets you choose individual order fields without writing JSON manually. As a result, you can reduce the payload to the information your receiving API needs.

To configure Advanced mode:

1. Open your integration’s setup wizard and go to the JSON filter step.
2. Select **Advanced**.
3. Browse the available categories, including Order, Billing, Shipping, Meta Data, Line Items, Tax Lines, Shipping Lines, Fee Lines, and Coupon Lines.
4. Search for and add the fields your destination requires.
5. Drag selected fields up or down if you want to change their order.

Only selected fields are included in the filtered payload. Therefore, check your destination’s required fields before saving the integration.

### Nested Fields and Collections in Advanced Mode

Nested fields use dot notation. For example, `billing.email` refers to the customer’s billing email, while `line_items.name` refers to product names within the order’s line items.

Collection selections such as `line_items.*` include the matching fields across the collection. As a result, you can include data for multiple products rather than a single order summary.

Although AnyAPI supports changing field order, a receiving API should generally identify JSON object fields by their names. Follow the destination’s documentation when deciding which fields and structure to send.

[![Advanced WooCommerce JSON filter with billing and line-item fields selected](https://anyapiplugin.com/wp-content/uploads/2026/08/docs-json-filter-mode-2-1024x603.png)](https://anyapiplugin.com/wp-content/uploads/2026/08/docs-json-filter-mode-2.png)

## Expert Mode: Build a Custom WooCommerce JSON Filter

Expert mode gives you control over the JSON structure. Instead of selecting existing field names, you write the keys your API expects and insert order data using `{{variable}}` placeholders.

For example, the following payload maps three order values to custom destination keys:

```json

                {
  "order": "{{order_id}}",
  "customer_email": "{{billing_email}}",
  "amount": "{{order_total}}"
}
```

When the integration runs, AnyAPI replaces the placeholders with their matching values. The destination keys—`order`, `customer_email`, and `amount`—remain as written.

You can also combine literal text and a variable in the same string:

```json

                {
  "message": "Order {{order_id}} is ready for review"
}
```

Because these examples place the variables inside quotation marks, check the resulting payload’s data types against your destination’s requirements. This is particularly important when it expects numbers or arrays.

### Validate Your Expert JSON Payload

AnyAPI checks whether the JSON entered in Expert mode is valid. If it contains a syntax error, the wizard prevents you from continuing until you correct it.

For example, missing quotation marks, an extra comma, or an unmatched bracket can make JSON invalid. Correct the syntax, then continue through the wizard.

However, valid JSON does not guarantee that the receiving API will accept the request. Your destination may also require particular field names, values, or data types. Therefore, test the completed integration before relying on it for live orders.

[![Expert WooCommerce JSON filter using order ID, billing email, and order total variables](https://anyapiplugin.com/wp-content/uploads/2026/08/docs-json-filter-mode-3-1024x615.png)](https://anyapiplugin.com/wp-content/uploads/2026/08/docs-json-filter-mode-3.png)

### WooCommerce JSON Filter Variable Reference

Use the following reference when preparing an Expert mode payload. In particular, copy variable names carefully, including the double curly braces.

| Variable | Description |
| --- | --- |
| `{{order_id}}` | Order ID |
| `{{order_number}}` | Order display number |
| `{{order_status}}` | Order status |
| `{{order_date}}` | Creation timestamp |
| `{{order_total}}` | Total amount |
| `{{order_subtotal}}` | Subtotal |
| `{{order_currency}}` | Currency code |
| `{{payment_method}}` | Payment method slug |
| `{{payment_title}}` | Payment method name |
| `{{billing_first_name}}` | Billing first name |
| `{{billing_last_name}}` | Billing last name |
| `{{billing_email}}` | Billing email |
| `{{billing_phone}}` | Billing phone |
| `{{billing_address_1}}` | Billing address line 1 |
| `{{billing_address_2}}` | Billing address line 2 |
| `{{billing_city}}` | Billing city |
| `{{billing_state}}` | Billing state or province |
| `{{billing_postcode}}` | Billing postcode |
| `{{billing_country}}` | Billing country code |
| `{{billing_company}}` | Company name |
| `{{shipping_first_name}}` | Shipping first name |
| `{{shipping_last_name}}` | Shipping last name |
| `{{shipping_address_1}}` | Shipping address line 1 |
| `{{shipping_address_2}}` | Shipping address line 2 |
| `{{shipping_city}}` | Shipping city |
| `{{shipping_state}}` | Shipping state or province |
| `{{shipping_postcode}}` | Shipping postcode |
| `{{shipping_country}}` | Shipping country |
| `{{customer_id}}` | WordPress user ID |
| `{{customer_note}}` | Order note |
| `{{items_json}}` | Line items as a JSON array string |
| `{{items_count}}` | Number of line items |
| `{{site_url}}` | Your site URL |
| `{{site_name}}` | Your site name |

When using `{{items_json}}`, inspect the delivered value before connecting a production endpoint. A JSON string and an array are different data types, so the result must match what your destination accepts.

## Compare Advanced and Expert JSON Filters

**Choose Advanced mode** when your destination accepts a subset of the standard order fields. Because the interface builds the JSON structure from your selections, you do not need to write it manually.

**Choose Expert mode** when the destination requires custom field names, a different structure, or text combined with order values. For example, a CRM may expect `customer_email` rather than the original billing field structure.

| Requirement | Suggested mode |
| --- | --- |
| Send the complete order without filtering | Basic |
| Select standard order fields | Advanced |
| Change the order of selected fields | Advanced |
| Use custom destination keys | Expert |
| Combine fixed text with order values | Expert |
| Build a destination-specific JSON structure | Expert |

Before choosing a mode, compare the receiving API’s example request with the data you intend to send. This helps you identify whether field selection is sufficient or a custom structure is needed.

## Test Your WooCommerce JSON Filter

After saving the integration, send a test order to an endpoint where you can inspect the request. The [Setup guide](https://anyapiplugin.com/docs/woocommerce-api-integration-setup/) explains how to do this with [webhook.site](https://webhook.site/).

Check the following:

1. **Field names:** Do the JSON keys match the destination’s requirements?
2. **Selected data:** Are all required fields included?
3. **Variable values:** Have placeholders been replaced with the expected order data?
4. **Data types:** Are strings, numbers, and collections represented as required?
5. **Multiple products:** Does the payload contain the expected line-item data?
6. **Response:** Has the destination accepted the request?

Also review the outgoing call in **AnyAPI → API Logs**. A successful HTTP response is useful evidence, but check the destination’s response body or records when you need to confirm that the data was processed correctly.

## Troubleshoot Your WooCommerce JSON Filter

If the payload differs from what you expected, compare the outgoing request with the destination’s documentation. Then review the response using the [API Logs & Troubleshooting guide](https://anyapiplugin.com/docs/api-logs-troubleshooting/).

### A Variable Appears as Literal Text

If a value such as `{{order_id}}` appears unchanged, compare its spelling and braces with the variable reference. Also confirm that the integration uses Expert mode.

After correcting the configuration, trigger another test and inspect the newly delivered request.

### The Destination Returns HTTP 400

An HTTP 400 response can indicate that the receiving API considers the request invalid. Possible causes include missing required fields, unexpected field names, invalid values, or an incompatible payload structure.

Read the response body for a more specific explanation. Then compare the request with the destination’s API documentation rather than assuming that JSON syntax is the only cause. For additional context, consult the [MDN HTTP response status code reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).

### Line Items Are Missing or Incomplete

In Advanced mode, review the selected line-item fields and collection selections such as `line_items.*`.

For Expert mode, inspect the value produced by `{{items_json}}` and compare its type and structure with the destination’s requirements. Test with an order containing multiple products so you can check the complete result.

### The Wizard Will Not Continue

Check the Expert mode editor for invalid JSON. Correct missing quotation marks, commas, or brackets, then try again.

Once the syntax is valid, continue with a test request. After that, use the destination’s response to check its additional validation requirements.

## Continue Your WooCommerce API Integration

Once your filtered payload has been tested, use these guides to complete and maintain the connection:

- [Order API Integration](https://anyapiplugin.com/docs/order-api-integration/) — Configure the endpoint, authentication, and order trigger.
- [API Key Management](https://anyapiplugin.com/docs/api-key-management/) — Manage credentials for your destination.
- [API Logs & Troubleshooting](https://anyapiplugin.com/docs/api-logs-troubleshooting/) — Inspect outgoing calls and investigate responses.
- [Feature Comparison](https://anyapiplugin.com/docs/feature-comparison-free-vs-lite-vs-plus/) — Compare Starter and Lite features.
