add_to_cart
Add a product variant (or base product) to an existing cart. Reuse the active cart_id from the chat history if one already exists. Only call create_cart first if no cart exists yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Buyer email; arms a back-in-stock alert for any out-of-stock item in items[]. | ||
| items | No | Add several products in ONE call instead of calling this tool repeatedly. Each entry: { product_id, quantity, variant_id?, addons? }. Out-of-stock items are reported; pass `email` to auto-arm a back-in-stock alert for them. | |
| addons | No | Selected product add-ons as a map of addon_id -> chosen value(s). For select/radio/boolean pass a single value; for checkbox/multi pass an array; for text/number pass the value. Values for choice add-ons MUST come from the product's addons[].options[].value. Collect any addon with required:true before checkout. | |
| cart_id | No | Cart ID to add the product to | |
| site_id | Yes | Registered site ID | |
| quantity | No | Quantity to add (must be >= 1) | |
| product_id | No | Product ID to add | |
| variant_id | No | Optional product variant ID (e.g., for size/color selection) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| items | Yes | ||
| total | Yes | ||
| cartId | Yes | ||
| siteId | Yes | ||
| subtotal | Yes | ||
| discounts | No |