Skip to content

AI Credit Note triage tools (ai 1.15.0) — Production Readiness Audit

FieldValue
Date2026-09-16
StatusGo for production — Backend + Docs; no SPA/Mobile code
ScopeAsk EloSync Credit Note tools: get_credit_note, confirmed writes update_credit_note_status / assign_credit_note / add_credit_note_note; catalog ai 1.14.0 → 1.15.0
CompanionAI deployment · AI Quotation triage · AI Payment triage · AI tools · Tenant AI API · User guide · Credit Notes · CHANGELOG

Executive summary

Additive AI tools depth on the existing AIGateway + AIToolRegistry + PendingAiActionService path. Reads: fetch one credit note (UUID; payload includes number, title, amounts, linked invoice, assignee, latest note). Writes: three low-risk tools that propose pending actions; mutations run only after POST /ai/actions/{id}/confirm. Status confirm calls CustomerCreditNoteService::issue() for Issued, apply() for Applied, void() for Void, and refund() for Refunded (Payment-style dedicated actions — not a generic changeStatus). Draft as a target is rejected. Status auth mirrors issue/apply/void/refund policies. Registry visibility for status uses AiToolAnyOfPermissions (credit-notes.update | issue | apply | void | refund). Assign uses credit-notes.assign + EligibleCreditNoteAssignee at propose and confirm. Notes are text-only with confirm-time max:5000. No new Spatie permissions, no Credit Notes catalog bump, no Frontend/Mobile changes.

Go / No-Go: Go. Cutover: migrate-only catalog bump to 1.15.0, entitle ai + credit-notes (requires Invoices), staging smoke propose→confirm.

GateResult
Platform freeze (no parallel AI stack)Pass
UUID credit note lookup; soft-deleted excludedPass
Status propose/confirm: Issued→issue(), Applied→apply(), Void→void(), Refunded→refund(); Draft target rejectedPass
Status tool visible with any of update/issue/apply/void/refundPass
Assign gated by credit-notes.assign + EligibleCreditNoteAssignee (propose and confirm)Pass
Note gated by credit-notes.update + policy update + body max 5000 on confirmPass
Propose does not mutatePass
Get payload exposes invoice link + assigned_to / assignee_namePass
Catalog migrate-only ai 1.15.0 + CatalogSeeder syncPass
Docs (tools, API, user tip, Credit Notes cross-links, overview, ops, roadmap, changelog, upgrade, VitePress)Pass
Pest write confirmation + registryPass
Playwright AI e2eN/A — no SPA surface change

Locked-decision matrix

DecisionBackendFrontendMobileDocs
Read tool: get one credit notePassPass
Confirmed writes via existing pending actionsPassPass (generic UI)Pass (generic UI)Pass
Status via dedicated issue() / apply() / void() / refund() (not draft)PassPass
AiToolAnyOfPermissions for status visibilityPassPass
Catalog MINOR ai 1.15.0 only (not credit-notes)PassPass

Authz map (HTTP ↔ AI)

ActionHTTPAI tool / confirm
Get oneview (assignee-scoped unless assign / superadmin)get_credit_note
Issueissueupdate_credit_note_statusissue()
Applyapplyupdate_credit_note_statusapply()
Voidvoidupdate_credit_note_statusvoid()
Refundrefundupdate_credit_note_statusrefund()
Assign / unassignassignassign_credit_note + EligibleCreditNoteAssignee at propose and confirm
Note (text)updateadd_credit_note_note + confirm max:5000

Upgrade & staging smoke

  1. php artisan migrate --force — catalog ai1.15.0 (do not db:seed).
  2. Entitle ai + credit-notes (Invoices required).
  3. Smoke: Ask EloSync fetch credit note → propose status/assign/note → Confirm; Issued needs issue; Draft target fails.

Rollback

Roll back the catalog bump migration (down1.14.0). Tools remain in code but version claim reverts; no schema change.

Monitoring

Unchanged from AI platform readiness (Nightwatch / logs on AI gateway + pending action confirm failures).

Official documentation for the EloSync SaaS Platform.