Merit Write Sales Confirm
merit_write_sales_confirmExecute pending sales invoice actions after providing confirmation code and confirming the operation.
Instructions
Confirmed mutating tool. Executes a previously previewed write operation from merit_write_sales when called with confirmation_code and confirmed=true. Create, delete, and deliver sales invoices. Actions: sales_invoice_create: Create a draft sales invoice through Merit v1 /sendinvoice. The payload is passed through to Merit and must use the create schema, not the invoice_get response shape. Required shape: Customer.Id, DocDate, TransactionDate, and DueDate as YYYYMMDD strings, mandatory string InvoiceNo, CurrencyCode (usually EUR), PriceInclVat (usually false), optional FComment footer note, singular InvoiceRow list, TaxAmount list, and TotalAmount. Each InvoiceRow item must use Item={Code, Description, UOMName}, Quantity, Price, row-level TaxId GUID, and Account. Gotchas: use InvoiceRow (singular), not InvoiceRows; Merit will not auto-assign InvoiceNo, so read merit_read_sales action=invoices_list and use the next integer; UOMName belongs inside Item; use Account, not AccountCode; use TaxId GUID, not TaxName or TaxPct; TaxAmount is required even for zero VAT, e.g. [{'TaxId': '', 'Amount': 0}]; TotalAmount is required and should match the row Price x Quantity total. For Googolplex no-VAT 'Ei ole käive', the known TaxId is 7e170b45-fe96-4048-b824-39733c33e734; verify with merit_read_master_data action=taxes_list if it changes. Do not include DelivNote/delivnote=true in invoice creation payloads; invoices should remain undelivered drafts and delivery is handled manually in Merit.; sales_invoice_delete: Delete a sales invoice by id.; credit_invoice_create: Create a credit invoice.; sales_invoice_send_email: Send a sales invoice by email. This delivers the invoice; do not use it in the normal draft creation flow where delivery is handled manually in Merit. Keep delivnote=false unless the user explicitly asks for delivery note mode without prices.; sales_invoice_send_einvoice: Send a sales invoice as e-invoice. This delivers the invoice; do not use it in the normal draft creation flow where delivery is handled manually in Merit. Keep delivnote=false unless the user explicitly asks for delivery note mode without prices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| id | No | ||
| filters | No | ||
| payload | No | ||
| add_attachment | No | ||
| delivnote | No | ||
| bank_id | No | ||
| confirmation_code | No | ||
| confirmed | No |