create_store_order_line
Add a product line item to an existing e-commerce order by specifying product, variant, quantity, and price. Use a unique line ID to prevent duplicates within the order.
Instructions
Add a line item to an existing e-commerce order.
line_id is client-supplied and must be unique within the order; product_id and product_variant_id must reference products that already exist in the store. Manual commerce writes suit custom/headless stores; Shopify and WooCommerce integrations sync order lines automatically.
Args: store_id: E-commerce store ID. Obtain from list_ecommerce_stores. order_id: Order ID to add the line to. line_id: Client-supplied unique ID for the new line (e.g. 'line_1'). product_id: ID of an existing product in the store. product_variant_id: ID of an existing variant of that product. quantity: Quantity ordered. price: Unit price of the line item. additional_fields: Optional dict of extra line fields merged into the body (e.g. discount).
Returns: JSON with the created line object.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"store_id": "<store_id>",
"order_id": "<order_id>",
"line_id": "<line_id>",
"product_id": "<product_id>",
"product_variant_id": "<product_variant_id>",
"quantity": "<quantity>",
"price": "<price>"
},
"name": "create_store_order_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | ||
| account | No | ||
| line_id | Yes | ||
| order_id | Yes | ||
| quantity | Yes | ||
| store_id | Yes | ||
| product_id | Yes | ||
| additional_fields | No | ||
| product_variant_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |