create_sales_order
Create a sales order from a quotation or direct item entry, validating customer credit before posting.
Instructions
Create a sales order. Either supply quotationDocEntry to convert an existing quotation, OR supply cardCode + lines for direct creation (e.g. from a purchase order). Validates customer credit before posting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Order lines. Required when quotationDocEntry is not provided. | |
| docDate | No | YYYY-MM-DD | |
| cardCode | No | SAP B1 customer CardCode. Required when quotationDocEntry is not provided. | |
| currency | No | 3-letter ISO currency code, e.g. GBP, USD. | |
| poNumber | No | Buyer's PO reference number — stored in NumAtCard. | |
| docDueDate | No | YYYY-MM-DD | |
| quotationDocEntry | No | DocEntry of an existing Sales Quotation to convert. Optional — omit for direct creation. |