Access and identifiers
The tools use your Vori account’s invoice permissions for the invoice’s store:
Read tools let you inspect and preview changes without applying them to your catalog. An account with the Read-only role cannot use the update tools. Review operations use the invoice’s active revision and check your access to its store.
Use the Vori
invoiceId returned as id by list_invoices. This is different from invoiceNumber, the vendor’s printed invoice number. Use revisionRowId from list_invoice_review_lines when editing or selecting a line; its id and lineNumber are different identifiers. Pass IDs as strings.
Review an invoice with your assistant
- Ask for invoices waiting for review in your store. The assistant can call
list_invoiceswithprocessingStatus: "READY"and yourstoreId. - Ask what needs a decision on an invoice.
list_invoice_review_linesreturns matching diagnoses, candidate products, previous and new costs, retail prices, margins, and the cost or price changes each line would apply. - Resolve each line you want to apply. Match a catalog product, correct a case size or quantity, ignore a recurring non-product charge, or stage a shelf price. Read the review lines again after editing to see the recalculated result.
- Ask for a preview of the selected lines. Review the proposed product changes and any inventory adjustments before approving them.
- Apply only the approved lines with the same selection and cost/inventory options. Leave
markInvoiceAsDone: falsewhile another line still needs a decision.
set_invoice_line_retail_price for each line.
Find invoices and read review lines
list_invoices
Returns invoices newest first. All inputs are optional:
storeId,storeVendorId, andinvoiceNumberfilter by store, store vendor, and exact printed invoice number.processingStatusacceptsREADY(waiting for review),PROCESSING,DONE, orREJECTED.takedefaults to 25 and accepts 1-50;skipdefaults to 0. Increaseskipto request the next page.
{ invoices, hasMore }. Each invoice includes id, createdAt, updatedAt, storeId, storeVendorId, storeFileUuid, invoiceNumber, total, billingDate, processingStatus, rejectionNotes, and lineItemCount. total is a decimal string in dollars. If you omit storeId, results cover the stores you can access.
get_invoice_by_id
Takes invoiceId. Returns the invoice header above with lineItems instead of lineItemCount. Each line includes revisionRowId, barcode, itemCode, description, shippedQuantity, shippedUnitOfMeasure, storeProductId, storeVendorProductId, and isSkipped. Use the review-lines tool for cost changes and matching diagnoses.
list_invoice_review_lines
Takes invoiceId, optional status (review, ignored, or unchanged), and take/skip. take defaults to 100 and accepts 1-200; skip defaults to 0. Lines are sorted by line number.
The result includes invoiceId, revisionId, invoiceLineItemSetId, count, statusCounts, and lines. count counts all lines matching your filter; statusCounts counts each status across the whole invoice. Page through until you have read count matching lines.
Each review line includes:
- Its
revisionRowId,lineNumber, status, description, barcode, item code, matched product IDs, and candidate products. Candidates distinguish existing records (source: "DATABASE") from proposed records (source: "DRAFT"). - A nullable
diagnosiswithcode,displayName, anddescription, pluscostChangeType. - Quantity, case size, invoice cost, previous/new unit cost, current/previous/new retail price, and current/previous/new/target margin percentages, with the associated units.
skipCostChange,skipInventoryChanges,hasUserChanges, cost/inventory commit timestamps, andcommitImpact: { cost, price }.
null. Margin percentages use values such as "35.00" for 35%, rather than a fraction. A matching diagnosis or cost-change category helps you review a line; decide which lines are appropriate before applying them.
Match, correct, ignore, or price a line
update_invoice_review_line
Takes invoiceId, revisionRowId, and at least one field to change:
Only supplied fields change. The result is
{ revisionRowId, state }; reread review lines for the reconciled view. Applied cost or inventory changes cannot be edited in that domain. Vori remembers a selected product mapping for future invoices once the line is applied.
reset_invoice_review_line
Takes invoiceId and revisionRowId. Discards the line’s review edits, including mappings, corrected quantities, one-invoice skips, and staged price, then returns { revisionRowId }. A line whose changes have already been applied cannot be reset. Use the separate undo-ignore tool for a remembered ignore.
ignore_invoice_lines_forever
Takes invoiceId and 1-500 revisionRowIds. Remembers non-product charges, such as California Redemption Value (CRV), bottle deposits, freight, and fees, for this invoice and future invoices for the same store vendor. Matching uses the line’s barcode, item code, or description.
The result contains ignoredRevisionRowIds and unidentifiedRevisionRowIds. A line with no usable barcode, item code, or description cannot be remembered; inspect unidentifiedRevisionRowIds rather than assuming every requested line was ignored.
undo_ignore_invoice_lines_forever
Takes invoiceId and 1-500 revisionRowIds. Removes remembered ignores for those items so they can return to review on this and future invoices. Returns { restoredCount }, the number of remembered skips removed.
set_invoice_line_retail_price
Takes invoiceId, revisionRowId, and retailPrice, a positive decimal string in dollars such as "5.99". Optional retailPriceUomId specifies the unit the price is per; omit it to retain the matched product’s pricing unit.
The line must match an existing catalog product. The price is staged and applies when you commit that line with commitCostChanges: true. The result includes revisionRowId, storeProductId, retailPrice, retailPriceUomId, and errors/conflicts arrays containing { type, message }. Inspect both arrays, then reread and preview the line before applying it.
Preview and apply selected changes
preview_invoice_commit
Takes invoiceId and these optional inputs, which are also accepted by commit_invoice_changes:
Returns
{ invoiceId, revisionId, draftEntities, inventoryAdjustments } without applying the changes to your catalog. Each draft entity includes its id, revisionRowId, entityType, source (CREATE or UPDATE), entityId, and proposed fields. Entity types are STORE_PRODUCT, STORE_VENDOR_PRODUCT, and VENDOR_PRODUCT.
Each inventory adjustment includes revisionRowId, the product’s ID/name/barcode, currentInventoryOnHand, resultingInventoryOnHand, and inventoryValue.
For example, pass this selection to the preview tool, replacing the illustrative IDs with IDs returned by your tools:
commit_invoice_changes
Takes the same inputs as the preview, plus optional markInvoiceAsDone (default false). After reviewing and approving the preview, commit with the same selected rows and cost/inventory options. Set markInvoiceAsDone: true only when you intend to move the whole invoice to DONE.
The call applies changes before returning. Use batches of revisionRowIds for large invoices. The result is { invoiceId, committed, errors }; each error includes revisionRowId, draftEntityId, and message. committed is true when no errors were returned. If errors are returned, inspect them and reread the invoice before deciding what to apply next.