Create Coupon
Creates a coupon in WooCommerce.
This node is also exposed as an AI Agent tool.
This node has 1 input port and 1 output port.
Common Properties
Every node shares these.
- Name — the node's display name on the canvas.
- Color — the node's colour on the canvas.
- Delay Before (sec) — wait this long before the node runs.
- Delay After (sec) — wait this long after the node runs.
- Continue On Error — carry on instead of failing the flow. Defaults to false.
info
When Continue On Error is true the error is not raised at all, so a Catch node will not see it either.
Inputs
| Property | Field | Description |
|---|---|---|
| Additional Data | inData | Additional coupon fields as JSON (description,usage_limit,expiry_date,etc.) |
| Amount | inAmount | Discount amount (e.g. 10 for 10% or $10) |
| Client ID | inClientID | Client ID from Connect node |
| Coupon Code | inCode | Unique coupon code |
Outputs
| Property | Field | Description |
|---|---|---|
| Coupon ID | outCouponID | ID of the created coupon |
| Result | outResult | Created coupon data |
Options
| Property | Field | Description |
|---|---|---|
| Credentials | optCredentials | WooCommerce API credentials |
| Discount Type | optDiscountType | Type of discount One of: percent, fixed_cart, fixed_product. |
| Timeout (seconds) | optTimeout | Maximum time in seconds to wait |
Requirements
- A Client ID from this package's Connect node, unless you set credentials directly on this node.
- WooCommerce API — WooCommerce REST API credentials (Consumer Key & Secret)
server— Store URL (text, required). WooCommerce store URL (e.g. https://myshop.com)username— Consumer Key (password, required). WooCommerce REST API Consumer Keypassword— Consumer Secret (password, required). WooCommerce REST API Consumer Secret
Store these in a Vault and reference the vault item from the node, rather than typing the secret into the property.
Related nodes
Get Coupon · Update Coupon · Delete Coupon · List Coupons
Elsewhere in the package: Connect · Disconnect · Create Product · Get Product · Update Product · Delete Product · List Products · Create Order · Get Order · Update Order and 8 more
See also
- WooCommerce — every node in this package
- Message object — how properties read values from
msg - Handling failure — Continue On Error, Catch and retries