Draft a customer invoice
create_invoiceSave a DRAFT customer invoice in a contracting business's Invoices & tax. Every line has a kind (labor, material, …) because the sales tax depends on it, and the tax is worked out by the business's tax engine from job_site.state — never typed. A line with no unit_price is refused, never billed at $0.00. A draft is not sent, not in the books and not payable until a person issues it in Seayora. Usually queued for the account holder to approve (read staged).
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": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | ||
| lines | Yes | ||
| terms | No | ||
| title | No | ||
| job_id | No | The job it bills. | |
| job_site | No | Where the work was — the sales tax is sourced to it. | |
| customer_id | No | A client from `list_customers`. Or give `customer_name` and `customer_email`. | |
| customer_name | No | ||
| customer_email | No | ||
| property_class | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The created or updated record's id, when the write was applied rather than staged. | |
| note | No | Why the result was truncated, when it was. | |
| staged | No | TRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done. | |
| draft_id | No | The staged proposal's id, when it was queued rather than performed. | |
| truncated | No | Present and true when the result was too large to return in full. Treat it as a partial answer. | |
| total_available | No | How many rows existed before truncation. |