Import order
import_orderCreate or reuse items, then write a sales order. Ask which customer and sheet first. Each line has fields (Name/SKU/Price), quantity, and unit_price. Pass Barcode only when the source has a real GTIN. An existing SKU or barcode on that sheet is reused and its barcode is kept. Otherwise the server allocates the next code when sequential assignment already works. An unknown sheet_name is refused with "Call create_sheet first"; this tool does not create a sheet. On a GS1 sheet, Show choices together. Clickable form if the client supports it. Otherwise one number, only when it cannot show choices. Wait. Do not choose for the user. Do not continue until the user has answered. Do you want barcodes? No, no barcodes now (barcode_mode="none"). Cloudlabels generates EAN-13 (codes starting with 2 are internal store codes, not registered GS1 codes), barcode_mode="cloudlabels_ean13". This call only. Does not change sheet settings. I have my own codes (own GTIN). No option is recommended. A needs_input error lists those options and writes nothing: no customer, item, sheet, or order. If the organization has opted in to its GS1 company prefix for this column and the sheet standard is EAN-13, UPC-A, or EAN-8, a new row reserves the next prefix number before saving. barcode_source can be gs1_prefix. The cell stores the digit body without the check digit. A full prefix is an error and does not fall back to a random code. Each line returns barcode and barcode_source. Pass source_key so the same request returns the existing order. Requires the Orders plan feature.
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": {
"lines": "<lines>"
},
"name": "import_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | ||
| lines | Yes | ||
| currency | No | ||
| sheet_name | No | Existing sheet name. Unknown names are refused; call create_sheet first. No sheet is auto-created. | |
| source_key | No | Idempotency key, such as the email message id. The same key returns the existing order. | |
| customer_id | No | ||
| barcode_mode | No | ||
| sheet_number | No | ||
| customer_name | No |