Create Sales Invoice
brc_create_sales_invoiceCreates a sales invoice with a caller-supplied reference and reconciled product, VAT and Sales-analysis lines. Missing customer contact values remain absent. Requires a valid routeToken issued for the matching action workflow. The token remains valid through lookup, preview and the permitted transaction. Placeholder tokens are invalid. A routeToken does not bypass preview or explicit-confirmation requirements. A call without confirmWrite: true returns confirmation_required and a payload preview. confirmWrite: true applies the previewed change after explicit confirmation. Passing preflight is not confirmation. Requires confirmCounterpartyExplicit: true; confirmation is scoped to the counterparty selected for the current preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Optional. BRC "Note" field on the sales document (JSON field `note`). Leave blank to default it to the customer name (BRC customer "Name" / JSON `name`). Do not use the product name as the note. Only set this when the user explicitly provides a note. | |
| acCode | Yes | ||
| procDate | Yes | ||
| quantity | Yes | ||
| entryDate | Yes | ||
| netAmount | Yes | ||
| productId | Yes | productCode is the BRC product "Code" (JSON `productCode`); productId is the BRC product "Id" (JSON `productId`) from brc_list_products. The product name is not a payload field — do not place it in the BRC "Note" field (JSON `note`). | |
| reference | No | Optional. BRC "Reference" field (JSON field `reference`). BRC "Our Ref" (JSON `ourReference`) and BRC "Your Ref" (JSON `yourReference`) default to this value when not supplied separately. | |
| saleRepId | Yes | Sales rep id from brc_list_sales_reps. | |
| unitPrice | Yes | ||
| vatRateId | Yes | ||
| customerId | Yes | ||
| deliveryTo | No | Optional. BRC "Delivery To" address (JSON field `deliveryTo`). Leave blank unless the user explicitly provides a delivery address. Do not invent or default a delivery address (for example "MCP Test"). | |
| priceBasis | No | Required when Gross Price Entry is enabled. Use `gross` when unit prices are VAT-inclusive/gross. Use `net` when unit prices are VAT-exclusive/net. | |
| routeToken | Yes | Opaque routeToken from brc_route_request for this action workflow. Required for transactional tools. Routing permission only — does not replace preview-before-posting or confirmWrite. | |
| accountCode | Yes | ||
| companyName | Yes | Company context name, for example YOUR-COMPANY-NAME. | |
| description | Yes | Product line description shown on the document line (BRC product line description / JSON `tranNotes`, also used on the line's analysis entry description). This is the line narrative, not the BRC "Note" field. | |
| productCode | Yes | productCode is the BRC product "Code" (JSON `productCode`); productId is the BRC product "Id" (JSON `productId`) from brc_list_products. The product name is not a payload field — do not place it in the BRC "Note" field (JSON `note`). | |
| saleRepCode | Yes | Sales rep code from brc_list_sales_reps. | |
| confirmWrite | No | Must be true only after a plain-English preview before posting has been shown in the current conversation and the user explicitly confirmed posting (for example yes, create it / post it now / confirm). Never set true on the first call or because the user initially asked to create something. Nothing is written to Big Red Cloud until you confirm. | |
| customerName | No | Optional. The selected customer's name (BRC customer "Name" / JSON `name`). Used as the default sales document note (BRC "Note" / JSON `note`) when no explicit note is given. | |
| connectionRef | No | Opaque Red connection reference returned by brc_confirm_company_connection. Pass this exact value on every later tool call when the MCP client rotates session ids (for example Vibe/Mistral). Keep reusing the same connectionRef after successful tool calls — do not start a new connection because a lookup returned empty or partial data. It is not an API key and does not contain credentials. | |
| vatPercentage | Yes | ||
| bookTranTypeId | Yes | ||
| analysisCategoryId | Yes | ||
| confirmCrAnalysisCategory | No | Set true only after the user confirms a CR sales analysis account code is intentional for this product line. | |
| confirmCounterpartyExplicit | No | Must be true only after the user explicitly named or confirmed the customer, supplier, or other counterparty in the current conversation. Never set true because a customer or supplier appeared in an earlier preview, was inferred from context, or was filled in without the user's explicit choice in this conversation. |