cancel_invoice
ChatGPTCancel a confirmed invoice — posts a reversing entry, dated today unless posting_date is given. Cancelling a credit note also releases the invoice it credited back to confirmed.
check_purchase_invoice
ChatGPTDiagnose one purchase invoice: what is wrong with it, on which rows, and which repair fixes it. CALL THIS FIRST whenever a user says a purchase invoice looks wrong — VAT missing or wrong, a total that does not match the document, an invoice that will not confirm — and before confirming one you have doubts about. Do NOT try to work it out from get_purchase_invoice: that returns the stored numbers without saying which of them are wrong, and the rules (a row's VAT follows its rate, the supplier total must reconcile, which VAT scenario the two parties imply) are not derivable from the record. Read-only. Returns findings, each with a code, the affected rows, a plain-language detail, and a fix naming the repair_purchase_invoice action that resolves it; plus the VAT scenario for this supplier and buyer, and what the importer inferred rather than read when the invoice came from a document.
confirm_import_accounts
ChatGPTAssign expense accounts to unmatched import job rows.
confirm_invoice
ChatGPTConfirm (post) a draft invoice to the ledger
confirm_ledger_entry
ChatGPTConfirm (post) a draft manual journal entry to the ledger
confirm_purchase_invoice
ChatGPTConfirm a draft purchase invoice — posts it to the ledger.
copy_invoice
ChatGPTCopy a sales invoice (draft or posted) as a new draft: same customer, rows and terms, dated today. Opens the copy in the card. Fresh UUID as idempotency_key.
create_contact
ChatGPTCreate a new contact
create_invoice_draft
ChatGPTCreate a sales invoice draft with all its rows in one call: all or nothing. Returns the editor view (header, rows with stable ids, totals, allowed actions, the revision save_invoice_edits needs). VAT is resolved by Trivis; do not pass a rate. Money and quantities are decimal strings. Requires an idempotency_key you generate (a UUID); a retry with the same key and request returns the same draft, not a second one.
create_invoice_share_link
ChatGPTMake (or return) the public page of a posted invoice: a link to view, download and pay it by card without a Trivis account. Returns the link and the editor view with share_link set. Give the person the link; sending it is their call.
credit_invoice
ChatGPTCredit a sales invoice: creates a DRAFT credit note that is a copy of it with negative amounts, linked to the original. Confirm it with confirm_invoice to post the reversing entry and mark the original credited — crediting alone posts nothing. Use this when the customer is owed the invoice back but the invoice itself should stand; use cancel_invoice instead when the invoice should never have existed.
delete_invoice_draft
ChatGPTDelete a draft sales invoice for good. Drafts only; a posted invoice is cancelled with cancel_invoice. Ask first unless the draft was made in this conversation.
get_account_balance
ChatGPTBalance of one ledger account (chart of accounts) by its UUID from list_accounts. Not a bank balance.
get_ap_summary
ChatGPTAccounts payable overview: draft purchase invoice counts/totals, overdue payables, and current payables not yet due.
get_ar_summary
ChatGPTAccounts receivable overview: draft invoice counts/totals, overdue outstanding, and current (not yet due) outstanding.
get_cashflow_forecast
ChatGPTCashflow forecast bucketed by due date: overdue, 0-7 days, 8-30 days, 31-60 days. Covers both receivables and payables.
get_catalog_item_prices
ChatGPTThe active prices of one catalogue product, and, given the customer's country, the revenue account Trivis would use for it. Use the first active price as the row's unit price.
get_contact
ChatGPTGet a single contact by ID
get_datetime
ChatGPTReturn the current server date and time as an ISO 8601 string. Call this whenever you need to know the current date or time — do not guess.
get_delivery_options
ChatGPTGet invoice dispatch options — returns token balance and available channels (email PDF, e-invoice). Call this before batch sending to verify sufficient balance.
get_invoice_batch
ChatGPTA review batch: a state per file (processing, needs review, duplicate, draft, awaiting approval, posted, failed) with each draft's supplier, number, dates, total and findings. Opens the batch card, which posts selected drafts itself.
get_invoice_editor
ChatGPTOpens a sales invoice in the editor card and returns its view: header, rows with row ids, totals, allowed actions, confirm findings, revision. For the invoice being worked on only: not to look up older invoices, and not before or after confirm_invoice or a send, since the open card follows the invoice by itself.
get_invoice_options
ChatGPTThe selects of an invoice editor for this company: units, sales tax rates, currencies (with the default), number series (with the next number), document types, VAT registration. Read once per session, when a row needs a unit or a rate set by hand or the invoice a currency.
get_invoice_pdf
ChatGPTThe invoice as the PDF the customer would get, rendered with the company's template at the current revision. The host hands the file to the person; you get the file name and size. Pass expected_revision to be told if the draft changed since you read it.
get_invoice_preview
ChatGPTRender the invoice as the customer will see it, with the company's own template, bound to a revision. The rendered document goes to the host's card; you get the revision it shows and its size. Pass expected_revision to be told if the draft changed since you read it.
get_overdue_invoices
ChatGPTList confirmed sales invoices that are past their due date, sorted by age.
get_plugin_context
ChatGPTWho is connected and what they can do here: the Trivis company this connection is bound to, the signed-in person and their access level, whether the company is still onboarding, and which plugin workflows are available. Call it first in a session, before any other tool, and show the user which company you are working in. Read-only.
get_purchase_invoice
ChatGPTGet a purchase invoice by ID with rows
get_revenue_summary
ChatGPTMonthly revenue breakdown for confirmed sales invoices.
get_trial_balance
ChatGPTGet the trial balance (proovibilanss) for an accounting period: per account the opening balance, the period's debit and credit turnover, and the closing balance, posted entries only. Balances are in the account's natural sign (assets and expenses debit-positive, the rest credit-positive). Revenue and expense accounts open from the fiscal year's start; prior_years_result is earlier profit never moved to equity
list_contacts
ChatGPTList contacts, optionally filtered by a simple text query.
list_invoices
ChatGPTList sales invoices with optional filters
list_ledger_entries
ChatGPTList journal entries with optional period/account filter
list_purchase_invoices
ChatGPTList purchase invoices with optional filters
repair_purchase_invoice
ChatGPTApply one deterministic correction to a DRAFT purchase invoice and return the diagnosis that follows it. Actions: "recalculate" — re-derive every row's net and VAT from the tax rate it already carries (fixes rows stored with a rate but 0.00 VAT, and any header total that disagrees with its rows); "amounts_include_vat" — read the line amounts as VAT-inclusive and recalculate, for receipts whose amount column already contains the VAT (the tell is that the rows' net alone equals the document total); "amounts_exclude_vat" — the inverse, and the way back. Prefer the action a finding's fix names over editing amounts by hand: rewriting a unit price until the total matches will balance the invoice and misstate what was bought.
request_invoice_upload
ChatGPTAn upload link for files that cannot be attached here: supplier invoices, bank statements, other documents. Open it in a browser and drop the files, or POST them one per request (curl -F file=@x.pdf <link>). kind decides what each file becomes: purchase_invoice (default) a purchase invoice draft; bank_statement imported like the bank statements page (camt.053/054, CSV, PDF, up to 10 MB); document filed in the archive under file_type, linked to assigned_id; employment_contract read into DRAFT pay terms for the employment in assigned_id (required), then approve_pay_terms once the person confirms. Default one file for 30 minutes; max_files up to 500 keeps it open 24 h, up to 7 days with expires_in_hours. The link is a credential: never paste it into tasks, notes or files.
save_invoice_edits
ChatGPTApply a batch of edits to a draft sales invoice atomically, against the revision you read: update_header {changes}, add_row {client_row_id, row}, update_row {row_id, changes}, delete_row {row_id}. All or nothing. A stale revision is refused as a conflict with the current state attached; re-read, then decide. Returns the editor view with the new revision and a created_rows map from client_row_id to row_id. Requires an idempotency_key you generate per call.
search_catalog_items
ChatGPTFind products and services in the company's catalogue by part of their name or code, for an invoice row. Returns up to 20 matches with ids; use get_catalog_item_prices for the price. Not the items registry (list_items), which holds apartments, vehicles and assets.
send_invoice_einvoice
ChatGPTSend a confirmed invoice as an e-invoice via the e-invoice network. Checks token balance first. Requires approval by default (configurable in AI settings).
send_invoice_email
ChatGPTSend a confirmed invoice to the customer by email as a PDF attachment. Checks token balance first. Requires approval by default (configurable in AI settings).
start_invoice_batch
ChatGPTTake the supplier invoices attached to the message (PDF or image, up to 20) in as one review batch: each becomes a purchase invoice draft with its original attached; nothing posts until the person chooses Post in the batch card, whatever the auto-confirm setting. Needs an idempotency_key you generate.