Order Data

Updated on February 9, 2026

When an order syncs to Mautic, the plugin sends all of the order details as a single JSON string to a custom contact field called mautic_woo_order_data. This page explains what data is included and how it is structured.

What Data Is Sent

The JSON payload contains the following information from the synced order:

  • order_id – The WooCommerce order number
  • status – The order status that triggered the sync (e.g. completed, refunded)
  • total – The order total amount
  • discount_total – The total discount applied to the order
  • coupons – An array of coupon codes used on the order
  • currency – The currency code (e.g. USD, EUR, GBP)
  • date – The order creation date in YYYY-MM-DD format
  • payment_method – The payment method title (e.g. Credit Card, PayPal)
  • items – An array of line items, each containing the product name, SKU, price, and quantity

Example JSON Structure

Here is an example of the JSON data sent to the mautic_woo_order_data field for a typical order:

{
  "order_id": 1042,
  "status": "completed",
  "total": "89.97",
  "discount_total": "10.00",
  "coupons": ["SAVE10"],
  "currency": "USD",
  "date": "2025-03-15",
  "payment_method": "Credit Card (Stripe)",
  "items": [
    {
      "name": "Classic Cotton T-Shirt",
      "sku": "TEE-BLU-M",
      "price": "29.99",
      "qty": 2
    },
    {
      "name": "Leather Belt",
      "sku": "BELT-BRN-L",
      "price": "39.99",
      "qty": 1
    }
  ]
}

The Custom Field in Mautic

The order data is stored in a Mautic custom field with the alias mautic_woo_order_data. This field must exist in Mautic before order data can be synced. You can create it in two ways:

  • Automatic – Enable the Auto-create the mautic_woo_order_data custom field in Mautic checkbox in the Order Sync settings. The plugin will create the field on the first sync if it does not already exist.
  • Manual – Go to the Mautic Fields tab in the plugin settings and click the button to create all required fields at once. You can also create the field manually in Mautic under Settings > Custom Fields with the alias mautic_woo_order_data and a type of Text.

Important Notes

  • This field stores the most recent synced order only. Each new order sync overwrites the previous value.
  • Subscription products (subscription and variable-subscription types) are excluded from the order data. They are handled separately by the subscription handler.
  • If the SKU filter is active, only products matching the filter are included in the items array. If no matching products remain, the sync is skipped entirely.
  • The billing contact information (name, email, phone, address) is also sent alongside the order data to keep the Mautic contact record up to date.

Next