[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-anthropic-tres-invoice-bill-matching":3,"mdc--mxxe78-key":37,"related-repo-anthropic-tres-invoice-bill-matching":2795,"related-org-anthropic-tres-invoice-bill-matching":2899},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":35,"mdContent":36},"tres-invoice-bill-matching","match ledger transactions to ERP invoices","Match TRES ledger transactions to ERP invoices\u002Fbills (AP\u002FAR) and optionally sync them to the connected ERP (Xero, QuickBooks Online, NetSuite). Trigger this skill whenever the user wants to match, link, close, reconcile, or sync an invoice or bill against a blockchain transaction — even if they don't say \"skill\" or use those exact words. Trigger phrases include: \"match this invoice to a transaction\", \"match a bill to tx\", \"close invoice INV-123\", \"close bill 9988\", \"link this tx to a bill\", \"pay this invoice from this transaction\", \"set up this tx as AP\", \"set up this tx as AR\", \"sync this transaction as AP\u002FAR\", \"match AP\u002FAR\", \"find the invoice\u002Fbill for this hash\", \"what bill does this tx pay\". Trigger ONLY for explicit AP\u002FAR matching\u002Fclosing intent — do NOT trigger for general transaction explanations (use tres-tx-story), for ingesting an explorer link into the ledger (use tres-explorer-tx-to-ledger), or for ERP connection setup itself (use tres-settings-management).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"anthropic","Anthropic","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fanthropic.png","anthropics",[13,17,20,23],{"name":14,"slug":15,"type":16},"Finance","finance","tag",{"name":18,"slug":19,"type":16},"Accounting","accounting",{"name":21,"slug":22,"type":16},"Reconciliation","reconciliation",{"name":24,"slug":25,"type":16},"Invoicing","invoicing",294,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-plugins-community","2026-07-02T07:37:51.519013",null,69,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":34},[],"Community plugin marketplace for Claude Cowork and Claude Code. Read-only mirror — submit plugins at clau.de\u002Fplugin-directory-submission.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-plugins-community\u002Ftree\u002FHEAD\u002Ftres-finance-plugin\u002Fskills\u002Ftres-invoice-bill-matching","---\nname: tres-invoice-bill-matching\ndescription: >\n  Match TRES ledger transactions to ERP invoices\u002Fbills (AP\u002FAR) and optionally sync them to the connected ERP\n  (Xero, QuickBooks Online, NetSuite). Trigger this skill whenever the user wants to match, link, close,\n  reconcile, or sync an invoice or bill against a blockchain transaction — even if they don't say \"skill\" or\n  use those exact words. Trigger phrases include: \"match this invoice to a transaction\", \"match a bill to tx\",\n  \"close invoice INV-123\", \"close bill 9988\", \"link this tx to a bill\", \"pay this invoice from this transaction\",\n  \"set up this tx as AP\", \"set up this tx as AR\", \"sync this transaction as AP\u002FAR\", \"match AP\u002FAR\", \"find the\n  invoice\u002Fbill for this hash\", \"what bill does this tx pay\". Trigger ONLY for explicit AP\u002FAR matching\u002Fclosing\n  intent — do NOT trigger for general transaction explanations (use tres-tx-story), for ingesting an explorer\n  link into the ledger (use tres-explorer-tx-to-ledger), or for ERP connection setup itself (use tres-settings-management).\n---\n\n# TRES — Invoice\u002FBill Matching & ERP Sync\n\nEnd-to-end workflow that lets the user close an open ERP invoice or bill against a blockchain transaction in\nthe TRES ledger, then optionally push the matched entry to the connected ERP.\n\nThe flow is the same regardless of which side the user starts from (a transaction hash or an invoice\u002Fbill ID).\nThe skill walks through seven conversational steps (verify ERP → identify input → fetch & suggest → user picks\n→ configure payment account & fiat → confirm & apply → loop). Stay terse — show numbered options, capture the\nuser's pick, move on. Never run a mutation without explicit \"yes\" from the user.\n\n---\n\n## Ground rules\n\n1. **Identify the org first.** Begin with `get_viewer` and tell the user \"You're connected to **{orgName}**.\"\n   This makes mistakes recoverable when someone has the wrong token.\n2. **Read before write.** Always fetch the current state of the transaction, invoice\u002Fbill, and payment account\n   before showing a change summary. Surprises are worse than slow.\n3. **Mutations require explicit approval.** Show a summary table (Transaction · Invoice\u002FBill · Payment Account ·\n   Fiat alignment · Sync) and ask \"Apply these changes?\" before any mutation. Only proceed on a clear yes.\n4. **Use schema introspection when in doubt.** Field names, enum values, and argument shapes can drift. If a\n   query\u002Fmutation errors with \"unknown field\" or \"invalid enum\", call `introspect(\u003CTypeName>)` or\n   `build_query(\u003CoperationName>)` and adjust — don't guess. Operations specifically called out as \"verify at\n   runtime\" below are the ones most likely to need this.\n5. **The skill is a loop.** After a successful match, ask \"Match another?\" and restart from Step 2. Don't\n   re-check the ERP — that only happens once per session.\n\n---\n\n## Step 1 — Verify ERP is connected\n\nRun:\n```graphql\nquery { integration(first: 50) { results { id integratedApp isErp connectionStatus companyName } } }\n```\n\nFilter the results where `isErp == true` and `connectionStatus == \"ACTIVE\"`. The supported ERPs you should\nrecognize are **Xero**, **QuickBooks Online (QBO)**, and **NetSuite** — `integratedApp` values are `XERO`,\n`QUICKBOOKS`, and `NETSUITE`. (If you encounter unknown values, `introspect(\"IntegrationsQueryNode\")` will\nconfirm the enum.) Ignore rows where `integratedApp` is empty — the API occasionally returns a null row.\n\n- **No connected ERP:** Tell the user they need to connect one before matching can happen, point them at\n  `https:\u002F\u002Fapp.tres.finance\u002Fsettings\u002Fintegrations`, and stop.\n- **One connected ERP:** Use it implicitly and just mention \"Matching against **{companyName}** ({integratedApp}).\"\n- **Multiple connected ERPs:** Ask which one to use — different ERPs have separate invoice\u002Fbill stores.\n\nCache the chosen ERP's `id`, `integratedApp`, and `companyName` for later steps and the loop.\n\n---\n\n## Step 2 — Identify what the user has\n\nAsk whether they have:\n- a **transaction hash** (e.g. `0x…`) — best case, pins the match immediately,\n- an **invoice\u002Fbill ID or number** (numeric internal ID, or the human-facing `invoiceNumber`\u002F`billNumber`),\n- or **both**.\n\nIf they have neither, require at least one. If they're not sure whether their identifier is an invoice or a\nbill, accept it and try both lookups in Step 3.\n\nAlso accept loose forms — \"INV-123\", \"Bill 9988\", \"the bill for Acme last week\". The `freeText` filter on\n`erpInvoices` \u002F `erpBills` handles these.\n\n**Before moving on, always ask for the transaction date (or an approximate date range) if they haven't given\na tx hash.** Ledger volume is high — date is the single most useful filter for narrowing candidates. Also\noffer: *\"If you happen to have the tx hash, paste it now — it pins the match exactly.\"* Date matters both\ndirections (tx→bill and bill→tx).\n\n---\n\n## Step 3 — Fetch the known object and produce ranked match suggestions\n\nThere are two branches. Pick by what the user provided. If they provided both a tx hash *and* an invoice\u002Fbill\nID, skip ahead to Step 5 (match is already determined).\n\n### Branch A — User has a transaction hash\n\n1. Fetch the transaction with its sub-transactions:\n   ```graphql\n   query GetTx($hash: String!) {\n     transaction(identifier: $hash, currency: \"usd\", limit: 1) {\n       results {\n         id identifier timestamp platform\n         children {\n           id amount balanceFactor isInternalTransfer\n           fiatValue\n           sender    { identifier displayName isInternal }\n           recipient { identifier displayName isInternal }\n           asset { symbol identifier }\n         }\n       }\n     }\n   }\n   ```\n2. Pick the **relevant sub-transaction**. Skip gas, skip internal transfers, prefer the one with the user's\n   wallet on one side and an external counterparty on the other. Determine direction:\n   - `balanceFactor` negative → outflow → look for a **bill** to close.\n   - `balanceFactor` positive → inflow → look for an **invoice** to close.\n   If multiple sub-txs qualify (e.g., a swap with multiple legs), present them and let the user pick one.\n3. **For invoices (inflow), try backend match suggestions first** — they are pre-computed and ranked:\n   ```graphql\n   query Suggest($subTxIds: [String]!) {\n     subTransactionToInvoiceMatchSuggestions(\n       subTransactionId_In: $subTxIds, minScore: 0.3, ordering: \"-score\", first: 10\n     ) {\n       results {\n         id score confidenceTier\n         scoreBreakdown { txHashMatch primaryMatchFactors }\n         invoice {\n           id invoiceId invoiceNumber customerName origAmount balance dueDate billingStatus\n           integration { integratedApp companyName }\n         }\n       }\n     }\n   }\n   ```\n   Important: this endpoint is **invoice-only**. For **bills (outflow), skip straight to the fallback below**\n   — there is no backend bill-suggestion query exposed in the schema.\n4. **Fallback (zero invoice suggestions, or always for bills):** query `erpInvoices` (inflow) or `erpBills`\n   (outflow), filtered by:\n   - amount window: `±20%` of the sub-tx fiat value,\n   - date window: `dateCreated_Range = [tx.timestamp − 60d, tx.timestamp]` — bills\u002Finvoices are issued at or\n     *before* the payment, never after. Don't bother with future-dated invoices\u002Fbills.\n   - contact: if the user has named a vendor\u002Fcustomer, pass that as `freeText`. Do NOT try to match the\n     on-chain recipient address to an ERP contact — ERP contact identifiers (from QBO\u002FXero\u002FNetSuite) are\n     internal IDs, never wallet addresses. Some contact labels *happen to resemble* the vendor name in text,\n     but the schema has no \"resembles\" filter, so rely on `freeText` over `vendor`\u002F`customer` fields.\n   Rank the fallback set client-side by: amount proximity → date proximity (prefer the most recent\n   bill\u002Finvoice before the tx) → name hits in `freeText` output.\n5. Present the top ≤5 as a numbered list (never more — too many choices is worse than too few). For each row\n   show: confidence tier, $ amount, customer\u002Fvendor name, `invoiceNumber`\u002F`billNumber`, due date, and the\n   `primaryMatchFactors` (e.g. `amount_exact`, `contact_match`). Best-fit first.\n\n### Branch B — User has an invoice\u002Fbill ID or number\n\n1. Resolve the entity. Try `erpInvoices` first, then `erpBills` if it's not an invoice (or vice versa if the\n   user said \"bill\"). For **invoices**, include the embedded suggestions:\n   ```graphql\n   query GetInvoice($id: Float, $text: String) {\n     erpInvoices(id: $id, freeText: $text, first: 1) {\n       results {\n         id invoiceNumber customerName origAmount balance dateCreated dueDate billingStatus\n         integration { integratedApp companyName }\n         suggestedSubTransactionMatches {\n           id score confidenceTier\n           subTransaction {\n             id amount fiatValue\n             asset { symbol identifier }\n             tx { identifier timestamp platform }\n           }\n         }\n       }\n     }\n   }\n   ```\n   For **bills**, query `erpBills` — note that bills do **not** expose `suggestedSubTransactionMatches`, so\n   just fetch the bill metadata (`id billNumber vendorName vendorId origAmount balance dateCreated dueDate\n   billingStatus integration { integratedApp companyName }`) and go straight to the fallback step. If `id`\n   lookup returns nothing, retry with `freeText: $userInput`.\n2. For invoices, use the embedded `suggestedSubTransactionMatches` as the ranked list.\n3. **Fallback (zero invoice suggestions, or always for bills):**\n   - First, **ask the user for an approximate date of payment** (and remind them: \"if you have the tx hash,\n     that's fastest\"). Payments happen on or after the bill\u002Finvoice date, usually within days — not before.\n     Default to a window of `[dateCreated, dateCreated + 60 days]` if they can't be specific.\n   - Query `transaction` with **server-side filters** so we don't pull the entire ledger. Use:\n     - `platform: \u003CconfiguredNetwork or user's network>` (e.g. `\"ethereum\"`),\n     - `timestamp_Gte` \u002F `timestamp_Lte` → the user-supplied date window,\n     - `children_Asset_Identifier_In: [\u003CassetIdentifier>]` → the bill's `configuredAsset.identifier` (e.g. the\n       USDC contract), or the invoice's expected asset,\n     - `children_FiatValue_Between: \"\u003Clow>,\u003Chigh>\"` → fiat window around `origAmount` (e.g. `±20%`). This is\n       a **string** of two comma-separated numbers. Example: `\"0.4,0.6\"` for a $0.50 bill.\n     - Optionally `children_BalanceFactor: -1` (outflow, for bills) or `1` (inflow, for invoices).\n     - Use `children_Amount_Between` as an additional filter only when the fiat price can't be trusted\n       (pre-priced historical assets, etc.).\n   - If the resulting set is still large, ask the user for a tighter date or an amount refinement before\n     presenting.\n4. Present **up to 5** candidate transactions as a numbered list — show for each:\n   **tx hash (truncated `0xabcd…1234`), sender → recipient addresses (same shortened form), token amount +\n   symbol, fiat value, and timestamp.** The tx hash is the user-facing identifier they recognize; the raw\n   addresses and token amounts disambiguate when fiat alone is too ambiguous (many txs cluster near the same\n   amount). **Never show internal IDs like `subTxId` to the user — they're meaningless to them.** Hold the\n   `subTxId` internally for the mutation; reference the tx by its hash in all user-visible output.\n   If no good matches, say so and ask for a tx hash — don't guess-dump a big list.\n\n---\n\n## Step 4 — User picks a match (or asks for more)\n\nPrompt: *\"Pick a number, or type `more` to widen the search (give me a contact name, date, or amount to focus\non).\"*\n\n- On a number: capture the chosen `(subTxId, invoiceOrBillId, entityType)` and continue to Step 5.\n- On `more`: re-query with looser windows or with the user's added hints (contact filter, expanded date range,\n  amount range), present a fresh list, repeat.\n- On \"none of these\" or similar: stop gracefully — *\"OK, no match made. Tell me when you have more info.\"*\n\n---\n\n## Step 5 — Configure payment account and (optional) fiat alignment\n\nOnce a match pair is chosen:\n\n1. **Deposit account (for `matchApAr.depositAccountId`).** This is an **ERP integration account**\n   (the GL account in Xero\u002FQBO\u002FNetSuite that the bill will post against — e.g. \"Crypto Wallet – ETH\",\n   \"Cash and cash equivalents\"). It is NOT a tres internal\u002Fwallet account. The schema FK is against\n   `schema_integrationaccount`; the value lives on `ErpBill.depositAccount` \u002F `ErpInvoice.depositAccount`\n   as `IntegrationAccountQuery { id name type value }`.\n\n   Resolution order:\n   1. **Use the pre-set one on the bill\u002Finvoice.** When the entity was created in the ERP, the user\n      typically already picked a deposit account. Read `erpBills.results[].depositAccount.id` (or\n      `erpInvoices.results[].depositAccount.id`). If it's non-null, use that id as `depositAccountId`\n      and just mention it in the summary — no prompt.\n   2. **Otherwise ask.** Query `integrationAccount(integration: \u003CerpId>, first: 100)` and show the\n      user the ASSET-type accounts (cash\u002Fwallet\u002Fcrypto GL accounts) as a numbered list; capture the\n      chosen `integrationAccount.id`.\n   3. `paymentToInternalAccounts` maps *wallet → asset* on the tres side and is useful for payout\n      workflows — it is **not** the source of `depositAccountId` for `matchApAr`. Don't reach for it\n      here.\n\n2. **Fiat alignment.** Compare the sub-tx `fiatValue` to the invoice\u002Fbill `origAmount`. Three cases:\n   - `fiatValue` is **null or 0**: ask *\"This transaction has no fiat value set. Align it to ${origAmount}\n     so the {bill\u002Finvoice} closes fully? (y\u002Fn)\"* — **no default**, require an explicit yes.\n   - `fiatValue` differs from `origAmount`: ask *\"Align tx fiat value from $X to $Y so the AP\u002FAR\n     closes fully? (y\u002Fn)\"* — **no default**, require an explicit yes.\n   - Values match: skip.\n   **Never run `setManualFiatValue` without a clear yes** — even if the user's original request implied\n   \"close the invoice\", the fiat alignment is a separate write and needs its own consent. If they say no,\n   the match still proceeds but the entity may stay partially paid.\n\n---\n\n## Step 6 — Confirm and apply\n\nShow this summary table — use **human-readable values only**: tx hash (truncated), deposit account **name**\n(never its id), invoice\u002Fbill number or customer\u002Fvendor name. Internal IDs (`subTxId`, `depositAccountId`,\nDB `entityId`) are for the mutation payload, never for the user.\n\n| | |\n|---|---|\n| Transaction | `0xabcd…1234` · {asset.symbol} {amount} · ${fiatValue} |\n| Invoice\u002FBill | `{invoiceNumber or billNumber}` · {customer\u002Fvendor} · ${origAmount} {currency} |\n| Payment account | {depositAccount.name} |\n| Align fiat | yes → ${origAmount} \u002F no |\n| Sync to ERP after match | yes \u002F no |\n\nAsk: *\"Apply these changes to **{orgName}**? (yes\u002Fno)\"* — only proceed on yes. Treat this as approval for\nthe **match only**. Fiat alignment and ERP sync each need their own explicit yes captured earlier (Step 5\nfor fiat, the prompt below for sync) — even if the user's opening request said \"sync to QBO\", still confirm\nhere, because the request was issued before they saw the actual match details.\n\nThen run mutations in this order, reporting the result of each:\n\n1. **Match (always):**\n   ```graphql\n   mutation Match($entityType: String!, $matches: [SubTxMatchInput]!) {\n     matchApAr(entityType: $entityType, matches: $matches) {\n       results { subTxId entityId depositAccountId }\n     }\n   }\n   ```\n   Variables:\n   - `entityType`: **lowercase** — `\"invoice\"` or `\"bill\"`. Uppercase values are rejected with\n     `Invalid entity_type`.\n   - `matches[].subTxId`: string (e.g. `\"4548595830\"`).\n   - `matches[].entityId`: **integer** — the DB `id` of the invoice\u002Fbill (from `erpInvoices.results[].id`\n     \u002F `erpBills.results[].id`), NOT the human-facing `invoiceNumber`\u002F`billNumber`. Passing a string\n     errors with *\"Int cannot represent non-integer value\"*; passing a bill number looks up nothing\n     and errors with *\"One or more Bill IDs not found\"*.\n   - `matches[].depositAccountId`: **integer** — the integration account id (see Step 5).\n\n2. **Fiat alignment (only if user opted in):**\n   ```graphql\n   mutation AlignFiat($id: String!, $newFiatValue: String!, $currency: String) {\n     setManualFiatValue(id: $id, newFiatValue: $newFiatValue, currency: $currency) { success }\n   }\n   ```\n   Pass the sub-transaction ID as `id`, the target value as a string in `newFiatValue` (e.g. `\"123.45\"`, the\n   invoice\u002Fbill `origAmount`), and `currency: \"usd\"`. If the response returns an error about a \"locked\n   period\", the accounting period containing the tx is closed — surface that to the user; don't try to force.\n\n3. **ERP sync (ask first, every time):** *\"Sync this transaction to {erpName} now? (y\u002Fn)\"* — **never sync\n   without an explicit yes at this point**, even if the user's original ask included \"and sync to QBO\". The\n   sync call is visible in the ERP and harder to undo than the match itself, so it gets its own gate. If yes:\n   ```graphql\n   mutation Sync($txIds: [String]!, $entityType: String!) {\n     syncSpecificTransactions(transactionIds: $txIds, entitySourceType: $entityType) { status }\n   }\n   ```\n   `entitySourceType` mirrors `entityType` from the match call.\n\nWhen reporting results back to the user, refer to the transaction by its **tx hash** (truncated) and the\ndeposit account by **name** — never by `subTxId` or `depositAccountId`. Those internal IDs are for debugging,\nnot user output.\n\nIf any mutation errors, surface the error message verbatim and offer to retry. The match is the one that\nactually links the records — if it fails, the rest is moot.\n\n---\n\n## Step 7 — Loop\n\nAsk: *\"Match another transaction or invoice\u002Fbill? (y\u002Fn)\"*\n\n- yes → restart from Step 2 (skip Step 1 — keep the cached ERP from this session).\n- no → wrap up: *\"Done. Closed {n} item(s) this session.\"*\n\n---\n\n## Verified TRES MCP operations used\n\n| Purpose | Operation | Type |\n|---|---|---|\n| Org identity | `get_viewer` | MCP tool |\n| Schema discovery | `introspect`, `build_query` | MCP tool |\n| Check ERP connections | `integration` (filter `isErp=true`) | query |\n| Fetch tx by hash | `transaction(identifier:)` | query |\n| Fetch invoices (with embedded suggestions) | `erpInvoices` | query |\n| Fetch bills (with embedded suggestions) | `erpBills` | query |\n| Pre-computed sub-tx → invoice match suggestions | `subTransactionToInvoiceMatchSuggestions` | query |\n| COA-mapped payment accounts | `paymentToInternalAccounts` | query |\n| Match sub-tx ↔ invoice\u002Fbill | `matchApAr` | mutation |\n| Align fiat value | `setManualFiatValue` (verify args at runtime) | mutation |\n| Sync transactions to the ERP | `syncSpecificTransactions` | mutation |\n| Undo a match (on user request) | `manualUnmatchSubtransactions` | mutation |\n\n---\n\n## Out of scope (politely redirect if asked)\n\n- Bulk matching (many ↔ many) — not yet supported by this skill.\n- Sending payments (`sendBillPayment`, `sendInvoicePayment`) — separate workflow.\n- Connecting or revoking the ERP itself — use the `tres-settings-management` skill.\n- Explaining a transaction in narrative form — use `tres-tx-story`.\n- Importing an explorer link into the ledger — use `tres-explorer-tx-to-ledger`.\n",{"data":38,"body":39},{"name":4,"description":6},{"type":40,"children":41},"root",[42,51,57,62,66,73,160,163,169,174,194,282,329,355,358,364,369,432,437,466,484,487,493,505,512,990,996,1457,1460,1466,1484,1522,1525,1531,1536,1806,1809,1815,1855,1955,1979,1984,2339,2370,2375,2378,2384,2393,2411,2414,2420,2715,2718,2724,2789],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"tres-invoicebill-matching-erp-sync",[48],{"type":49,"value":50},"text","TRES — Invoice\u002FBill Matching & ERP Sync",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55],{"type":49,"value":56},"End-to-end workflow that lets the user close an open ERP invoice or bill against a blockchain transaction in\nthe TRES ledger, then optionally push the matched entry to the connected ERP.",{"type":43,"tag":52,"props":58,"children":59},{},[60],{"type":49,"value":61},"The flow is the same regardless of which side the user starts from (a transaction hash or an invoice\u002Fbill ID).\nThe skill walks through seven conversational steps (verify ERP → identify input → fetch & suggest → user picks\n→ configure payment account & fiat → confirm & apply → loop). Stay terse — show numbered options, capture the\nuser's pick, move on. Never run a mutation without explicit \"yes\" from the user.",{"type":43,"tag":63,"props":64,"children":65},"hr",{},[],{"type":43,"tag":67,"props":68,"children":70},"h2",{"id":69},"ground-rules",[71],{"type":49,"value":72},"Ground rules",{"type":43,"tag":74,"props":75,"children":76},"ol",{},[77,104,114,124,150],{"type":43,"tag":78,"props":79,"children":80},"li",{},[81,87,89,96,98,102],{"type":43,"tag":82,"props":83,"children":84},"strong",{},[85],{"type":49,"value":86},"Identify the org first.",{"type":49,"value":88}," Begin with ",{"type":43,"tag":90,"props":91,"children":93},"code",{"className":92},[],[94],{"type":49,"value":95},"get_viewer",{"type":49,"value":97}," and tell the user \"You're connected to ",{"type":43,"tag":82,"props":99,"children":101},{"org-name":100},"",[],{"type":49,"value":103},".\"\nThis makes mistakes recoverable when someone has the wrong token.",{"type":43,"tag":78,"props":105,"children":106},{},[107,112],{"type":43,"tag":82,"props":108,"children":109},{},[110],{"type":49,"value":111},"Read before write.",{"type":49,"value":113}," Always fetch the current state of the transaction, invoice\u002Fbill, and payment account\nbefore showing a change summary. Surprises are worse than slow.",{"type":43,"tag":78,"props":115,"children":116},{},[117,122],{"type":43,"tag":82,"props":118,"children":119},{},[120],{"type":49,"value":121},"Mutations require explicit approval.",{"type":49,"value":123}," Show a summary table (Transaction · Invoice\u002FBill · Payment Account ·\nFiat alignment · Sync) and ask \"Apply these changes?\" before any mutation. Only proceed on a clear yes.",{"type":43,"tag":78,"props":125,"children":126},{},[127,132,134,140,142,148],{"type":43,"tag":82,"props":128,"children":129},{},[130],{"type":49,"value":131},"Use schema introspection when in doubt.",{"type":49,"value":133}," Field names, enum values, and argument shapes can drift. If a\nquery\u002Fmutation errors with \"unknown field\" or \"invalid enum\", call ",{"type":43,"tag":90,"props":135,"children":137},{"className":136},[],[138],{"type":49,"value":139},"introspect(\u003CTypeName>)",{"type":49,"value":141}," or\n",{"type":43,"tag":90,"props":143,"children":145},{"className":144},[],[146],{"type":49,"value":147},"build_query(\u003CoperationName>)",{"type":49,"value":149}," and adjust — don't guess. Operations specifically called out as \"verify at\nruntime\" below are the ones most likely to need this.",{"type":43,"tag":78,"props":151,"children":152},{},[153,158],{"type":43,"tag":82,"props":154,"children":155},{},[156],{"type":49,"value":157},"The skill is a loop.",{"type":49,"value":159}," After a successful match, ask \"Match another?\" and restart from Step 2. Don't\nre-check the ERP — that only happens once per session.",{"type":43,"tag":63,"props":161,"children":162},{},[],{"type":43,"tag":67,"props":164,"children":166},{"id":165},"step-1-verify-erp-is-connected",[167],{"type":49,"value":168},"Step 1 — Verify ERP is connected",{"type":43,"tag":52,"props":170,"children":171},{},[172],{"type":49,"value":173},"Run:",{"type":43,"tag":175,"props":176,"children":180},"pre",{"className":177,"code":178,"language":179,"meta":100,"style":100},"language-graphql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","query { integration(first: 50) { results { id integratedApp isErp connectionStatus companyName } } }\n","graphql",[181],{"type":43,"tag":90,"props":182,"children":183},{"__ignoreMap":100},[184],{"type":43,"tag":185,"props":186,"children":189},"span",{"class":187,"line":188},"line",1,[190],{"type":43,"tag":185,"props":191,"children":192},{},[193],{"type":49,"value":178},{"type":43,"tag":52,"props":195,"children":196},{},[197,199,205,207,213,215,220,222,227,229,234,236,242,244,250,252,258,259,265,267,273,275,280],{"type":49,"value":198},"Filter the results where ",{"type":43,"tag":90,"props":200,"children":202},{"className":201},[],[203],{"type":49,"value":204},"isErp == true",{"type":49,"value":206}," and ",{"type":43,"tag":90,"props":208,"children":210},{"className":209},[],[211],{"type":49,"value":212},"connectionStatus == \"ACTIVE\"",{"type":49,"value":214},". The supported ERPs you should\nrecognize are ",{"type":43,"tag":82,"props":216,"children":217},{},[218],{"type":49,"value":219},"Xero",{"type":49,"value":221},", ",{"type":43,"tag":82,"props":223,"children":224},{},[225],{"type":49,"value":226},"QuickBooks Online (QBO)",{"type":49,"value":228},", and ",{"type":43,"tag":82,"props":230,"children":231},{},[232],{"type":49,"value":233},"NetSuite",{"type":49,"value":235}," — ",{"type":43,"tag":90,"props":237,"children":239},{"className":238},[],[240],{"type":49,"value":241},"integratedApp",{"type":49,"value":243}," values are ",{"type":43,"tag":90,"props":245,"children":247},{"className":246},[],[248],{"type":49,"value":249},"XERO",{"type":49,"value":251},",\n",{"type":43,"tag":90,"props":253,"children":255},{"className":254},[],[256],{"type":49,"value":257},"QUICKBOOKS",{"type":49,"value":228},{"type":43,"tag":90,"props":260,"children":262},{"className":261},[],[263],{"type":49,"value":264},"NETSUITE",{"type":49,"value":266},". (If you encounter unknown values, ",{"type":43,"tag":90,"props":268,"children":270},{"className":269},[],[271],{"type":49,"value":272},"introspect(\"IntegrationsQueryNode\")",{"type":49,"value":274}," will\nconfirm the enum.) Ignore rows where ",{"type":43,"tag":90,"props":276,"children":278},{"className":277},[],[279],{"type":49,"value":241},{"type":49,"value":281}," is empty — the API occasionally returns a null row.",{"type":43,"tag":283,"props":284,"children":285},"ul",{},[286,304,319],{"type":43,"tag":78,"props":287,"children":288},{},[289,294,296,302],{"type":43,"tag":82,"props":290,"children":291},{},[292],{"type":49,"value":293},"No connected ERP:",{"type":49,"value":295}," Tell the user they need to connect one before matching can happen, point them at\n",{"type":43,"tag":90,"props":297,"children":299},{"className":298},[],[300],{"type":49,"value":301},"https:\u002F\u002Fapp.tres.finance\u002Fsettings\u002Fintegrations",{"type":49,"value":303},", and stop.",{"type":43,"tag":78,"props":305,"children":306},{},[307,312,314,317],{"type":43,"tag":82,"props":308,"children":309},{},[310],{"type":49,"value":311},"One connected ERP:",{"type":49,"value":313}," Use it implicitly and just mention \"Matching against ",{"type":43,"tag":82,"props":315,"children":316},{"company-name":100},[],{"type":49,"value":318}," ({integratedApp}).\"",{"type":43,"tag":78,"props":320,"children":321},{},[322,327],{"type":43,"tag":82,"props":323,"children":324},{},[325],{"type":49,"value":326},"Multiple connected ERPs:",{"type":49,"value":328}," Ask which one to use — different ERPs have separate invoice\u002Fbill stores.",{"type":43,"tag":52,"props":330,"children":331},{},[332,334,340,341,346,347,353],{"type":49,"value":333},"Cache the chosen ERP's ",{"type":43,"tag":90,"props":335,"children":337},{"className":336},[],[338],{"type":49,"value":339},"id",{"type":49,"value":221},{"type":43,"tag":90,"props":342,"children":344},{"className":343},[],[345],{"type":49,"value":241},{"type":49,"value":228},{"type":43,"tag":90,"props":348,"children":350},{"className":349},[],[351],{"type":49,"value":352},"companyName",{"type":49,"value":354}," for later steps and the loop.",{"type":43,"tag":63,"props":356,"children":357},{},[],{"type":43,"tag":67,"props":359,"children":361},{"id":360},"step-2-identify-what-the-user-has",[362],{"type":49,"value":363},"Step 2 — Identify what the user has",{"type":43,"tag":52,"props":365,"children":366},{},[367],{"type":49,"value":368},"Ask whether they have:",{"type":43,"tag":283,"props":370,"children":371},{},[372,392,420],{"type":43,"tag":78,"props":373,"children":374},{},[375,377,382,384,390],{"type":49,"value":376},"a ",{"type":43,"tag":82,"props":378,"children":379},{},[380],{"type":49,"value":381},"transaction hash",{"type":49,"value":383}," (e.g. ",{"type":43,"tag":90,"props":385,"children":387},{"className":386},[],[388],{"type":49,"value":389},"0x…",{"type":49,"value":391},") — best case, pins the match immediately,",{"type":43,"tag":78,"props":393,"children":394},{},[395,397,402,404,410,412,418],{"type":49,"value":396},"an ",{"type":43,"tag":82,"props":398,"children":399},{},[400],{"type":49,"value":401},"invoice\u002Fbill ID or number",{"type":49,"value":403}," (numeric internal ID, or the human-facing ",{"type":43,"tag":90,"props":405,"children":407},{"className":406},[],[408],{"type":49,"value":409},"invoiceNumber",{"type":49,"value":411},"\u002F",{"type":43,"tag":90,"props":413,"children":415},{"className":414},[],[416],{"type":49,"value":417},"billNumber",{"type":49,"value":419},"),",{"type":43,"tag":78,"props":421,"children":422},{},[423,425,430],{"type":49,"value":424},"or ",{"type":43,"tag":82,"props":426,"children":427},{},[428],{"type":49,"value":429},"both",{"type":49,"value":431},".",{"type":43,"tag":52,"props":433,"children":434},{},[435],{"type":49,"value":436},"If they have neither, require at least one. If they're not sure whether their identifier is an invoice or a\nbill, accept it and try both lookups in Step 3.",{"type":43,"tag":52,"props":438,"children":439},{},[440,442,448,450,456,458,464],{"type":49,"value":441},"Also accept loose forms — \"INV-123\", \"Bill 9988\", \"the bill for Acme last week\". The ",{"type":43,"tag":90,"props":443,"children":445},{"className":444},[],[446],{"type":49,"value":447},"freeText",{"type":49,"value":449}," filter on\n",{"type":43,"tag":90,"props":451,"children":453},{"className":452},[],[454],{"type":49,"value":455},"erpInvoices",{"type":49,"value":457}," \u002F ",{"type":43,"tag":90,"props":459,"children":461},{"className":460},[],[462],{"type":49,"value":463},"erpBills",{"type":49,"value":465}," handles these.",{"type":43,"tag":52,"props":467,"children":468},{},[469,474,476,482],{"type":43,"tag":82,"props":470,"children":471},{},[472],{"type":49,"value":473},"Before moving on, always ask for the transaction date (or an approximate date range) if they haven't given\na tx hash.",{"type":49,"value":475}," Ledger volume is high — date is the single most useful filter for narrowing candidates. Also\noffer: ",{"type":43,"tag":477,"props":478,"children":479},"em",{},[480],{"type":49,"value":481},"\"If you happen to have the tx hash, paste it now — it pins the match exactly.\"",{"type":49,"value":483}," Date matters both\ndirections (tx→bill and bill→tx).",{"type":43,"tag":63,"props":485,"children":486},{},[],{"type":43,"tag":67,"props":488,"children":490},{"id":489},"step-3-fetch-the-known-object-and-produce-ranked-match-suggestions",[491],{"type":49,"value":492},"Step 3 — Fetch the known object and produce ranked match suggestions",{"type":43,"tag":52,"props":494,"children":495},{},[496,498,503],{"type":49,"value":497},"There are two branches. Pick by what the user provided. If they provided both a tx hash ",{"type":43,"tag":477,"props":499,"children":500},{},[501],{"type":49,"value":502},"and",{"type":49,"value":504}," an invoice\u002Fbill\nID, skip ahead to Step 5 (match is already determined).",{"type":43,"tag":506,"props":507,"children":509},"h3",{"id":508},"branch-a-user-has-a-transaction-hash",[510],{"type":49,"value":511},"Branch A — User has a transaction hash",{"type":43,"tag":74,"props":513,"children":514},{},[515,652,702,842,950],{"type":43,"tag":78,"props":516,"children":517},{},[518,520],{"type":49,"value":519},"Fetch the transaction with its sub-transactions:\n",{"type":43,"tag":175,"props":521,"children":523},{"className":177,"code":522,"language":179,"meta":100,"style":100},"query GetTx($hash: String!) {\n  transaction(identifier: $hash, currency: \"usd\", limit: 1) {\n    results {\n      id identifier timestamp platform\n      children {\n        id amount balanceFactor isInternalTransfer\n        fiatValue\n        sender    { identifier displayName isInternal }\n        recipient { identifier displayName isInternal }\n        asset { symbol identifier }\n      }\n    }\n  }\n}\n",[524],{"type":43,"tag":90,"props":525,"children":526},{"__ignoreMap":100},[527,535,544,553,562,571,580,589,598,607,616,625,634,643],{"type":43,"tag":185,"props":528,"children":529},{"class":187,"line":188},[530],{"type":43,"tag":185,"props":531,"children":532},{},[533],{"type":49,"value":534},"query GetTx($hash: String!) {\n",{"type":43,"tag":185,"props":536,"children":538},{"class":187,"line":537},2,[539],{"type":43,"tag":185,"props":540,"children":541},{},[542],{"type":49,"value":543},"  transaction(identifier: $hash, currency: \"usd\", limit: 1) {\n",{"type":43,"tag":185,"props":545,"children":547},{"class":187,"line":546},3,[548],{"type":43,"tag":185,"props":549,"children":550},{},[551],{"type":49,"value":552},"    results {\n",{"type":43,"tag":185,"props":554,"children":556},{"class":187,"line":555},4,[557],{"type":43,"tag":185,"props":558,"children":559},{},[560],{"type":49,"value":561},"      id identifier timestamp platform\n",{"type":43,"tag":185,"props":563,"children":565},{"class":187,"line":564},5,[566],{"type":43,"tag":185,"props":567,"children":568},{},[569],{"type":49,"value":570},"      children {\n",{"type":43,"tag":185,"props":572,"children":574},{"class":187,"line":573},6,[575],{"type":43,"tag":185,"props":576,"children":577},{},[578],{"type":49,"value":579},"        id amount balanceFactor isInternalTransfer\n",{"type":43,"tag":185,"props":581,"children":583},{"class":187,"line":582},7,[584],{"type":43,"tag":185,"props":585,"children":586},{},[587],{"type":49,"value":588},"        fiatValue\n",{"type":43,"tag":185,"props":590,"children":592},{"class":187,"line":591},8,[593],{"type":43,"tag":185,"props":594,"children":595},{},[596],{"type":49,"value":597},"        sender    { identifier displayName isInternal }\n",{"type":43,"tag":185,"props":599,"children":601},{"class":187,"line":600},9,[602],{"type":43,"tag":185,"props":603,"children":604},{},[605],{"type":49,"value":606},"        recipient { identifier displayName isInternal }\n",{"type":43,"tag":185,"props":608,"children":610},{"class":187,"line":609},10,[611],{"type":43,"tag":185,"props":612,"children":613},{},[614],{"type":49,"value":615},"        asset { symbol identifier }\n",{"type":43,"tag":185,"props":617,"children":619},{"class":187,"line":618},11,[620],{"type":43,"tag":185,"props":621,"children":622},{},[623],{"type":49,"value":624},"      }\n",{"type":43,"tag":185,"props":626,"children":628},{"class":187,"line":627},12,[629],{"type":43,"tag":185,"props":630,"children":631},{},[632],{"type":49,"value":633},"    }\n",{"type":43,"tag":185,"props":635,"children":637},{"class":187,"line":636},13,[638],{"type":43,"tag":185,"props":639,"children":640},{},[641],{"type":49,"value":642},"  }\n",{"type":43,"tag":185,"props":644,"children":646},{"class":187,"line":645},14,[647],{"type":43,"tag":185,"props":648,"children":649},{},[650],{"type":49,"value":651},"}\n",{"type":43,"tag":78,"props":653,"children":654},{},[655,657,662,664],{"type":49,"value":656},"Pick the ",{"type":43,"tag":82,"props":658,"children":659},{},[660],{"type":49,"value":661},"relevant sub-transaction",{"type":49,"value":663},". Skip gas, skip internal transfers, prefer the one with the user's\nwallet on one side and an external counterparty on the other. Determine direction:\n",{"type":43,"tag":283,"props":665,"children":666},{},[667,685],{"type":43,"tag":78,"props":668,"children":669},{},[670,676,678,683],{"type":43,"tag":90,"props":671,"children":673},{"className":672},[],[674],{"type":49,"value":675},"balanceFactor",{"type":49,"value":677}," negative → outflow → look for a ",{"type":43,"tag":82,"props":679,"children":680},{},[681],{"type":49,"value":682},"bill",{"type":49,"value":684}," to close.",{"type":43,"tag":78,"props":686,"children":687},{},[688,693,695,700],{"type":43,"tag":90,"props":689,"children":691},{"className":690},[],[692],{"type":49,"value":675},{"type":49,"value":694}," positive → inflow → look for an ",{"type":43,"tag":82,"props":696,"children":697},{},[698],{"type":49,"value":699},"invoice",{"type":49,"value":701}," to close.\nIf multiple sub-txs qualify (e.g., a swap with multiple legs), present them and let the user pick one.",{"type":43,"tag":78,"props":703,"children":704},{},[705,710,712,826,828,833,835,840],{"type":43,"tag":82,"props":706,"children":707},{},[708],{"type":49,"value":709},"For invoices (inflow), try backend match suggestions first",{"type":49,"value":711}," — they are pre-computed and ranked:\n",{"type":43,"tag":175,"props":713,"children":715},{"className":177,"code":714,"language":179,"meta":100,"style":100},"query Suggest($subTxIds: [String]!) {\n  subTransactionToInvoiceMatchSuggestions(\n    subTransactionId_In: $subTxIds, minScore: 0.3, ordering: \"-score\", first: 10\n  ) {\n    results {\n      id score confidenceTier\n      scoreBreakdown { txHashMatch primaryMatchFactors }\n      invoice {\n        id invoiceId invoiceNumber customerName origAmount balance dueDate billingStatus\n        integration { integratedApp companyName }\n      }\n    }\n  }\n}\n",[716],{"type":43,"tag":90,"props":717,"children":718},{"__ignoreMap":100},[719,727,735,743,751,758,766,774,782,790,798,805,812,819],{"type":43,"tag":185,"props":720,"children":721},{"class":187,"line":188},[722],{"type":43,"tag":185,"props":723,"children":724},{},[725],{"type":49,"value":726},"query Suggest($subTxIds: [String]!) {\n",{"type":43,"tag":185,"props":728,"children":729},{"class":187,"line":537},[730],{"type":43,"tag":185,"props":731,"children":732},{},[733],{"type":49,"value":734},"  subTransactionToInvoiceMatchSuggestions(\n",{"type":43,"tag":185,"props":736,"children":737},{"class":187,"line":546},[738],{"type":43,"tag":185,"props":739,"children":740},{},[741],{"type":49,"value":742},"    subTransactionId_In: $subTxIds, minScore: 0.3, ordering: \"-score\", first: 10\n",{"type":43,"tag":185,"props":744,"children":745},{"class":187,"line":555},[746],{"type":43,"tag":185,"props":747,"children":748},{},[749],{"type":49,"value":750},"  ) {\n",{"type":43,"tag":185,"props":752,"children":753},{"class":187,"line":564},[754],{"type":43,"tag":185,"props":755,"children":756},{},[757],{"type":49,"value":552},{"type":43,"tag":185,"props":759,"children":760},{"class":187,"line":573},[761],{"type":43,"tag":185,"props":762,"children":763},{},[764],{"type":49,"value":765},"      id score confidenceTier\n",{"type":43,"tag":185,"props":767,"children":768},{"class":187,"line":582},[769],{"type":43,"tag":185,"props":770,"children":771},{},[772],{"type":49,"value":773},"      scoreBreakdown { txHashMatch primaryMatchFactors }\n",{"type":43,"tag":185,"props":775,"children":776},{"class":187,"line":591},[777],{"type":43,"tag":185,"props":778,"children":779},{},[780],{"type":49,"value":781},"      invoice {\n",{"type":43,"tag":185,"props":783,"children":784},{"class":187,"line":600},[785],{"type":43,"tag":185,"props":786,"children":787},{},[788],{"type":49,"value":789},"        id invoiceId invoiceNumber customerName origAmount balance dueDate billingStatus\n",{"type":43,"tag":185,"props":791,"children":792},{"class":187,"line":609},[793],{"type":43,"tag":185,"props":794,"children":795},{},[796],{"type":49,"value":797},"        integration { integratedApp companyName }\n",{"type":43,"tag":185,"props":799,"children":800},{"class":187,"line":618},[801],{"type":43,"tag":185,"props":802,"children":803},{},[804],{"type":49,"value":624},{"type":43,"tag":185,"props":806,"children":807},{"class":187,"line":627},[808],{"type":43,"tag":185,"props":809,"children":810},{},[811],{"type":49,"value":633},{"type":43,"tag":185,"props":813,"children":814},{"class":187,"line":636},[815],{"type":43,"tag":185,"props":816,"children":817},{},[818],{"type":49,"value":642},{"type":43,"tag":185,"props":820,"children":821},{"class":187,"line":645},[822],{"type":43,"tag":185,"props":823,"children":824},{},[825],{"type":49,"value":651},{"type":49,"value":827},"\nImportant: this endpoint is ",{"type":43,"tag":82,"props":829,"children":830},{},[831],{"type":49,"value":832},"invoice-only",{"type":49,"value":834},". For ",{"type":43,"tag":82,"props":836,"children":837},{},[838],{"type":49,"value":839},"bills (outflow), skip straight to the fallback below",{"type":49,"value":841},"\n— there is no backend bill-suggestion query exposed in the schema.",{"type":43,"tag":78,"props":843,"children":844},{},[845,850,852,857,859,864,866],{"type":43,"tag":82,"props":846,"children":847},{},[848],{"type":49,"value":849},"Fallback (zero invoice suggestions, or always for bills):",{"type":49,"value":851}," query ",{"type":43,"tag":90,"props":853,"children":855},{"className":854},[],[856],{"type":49,"value":455},{"type":49,"value":858}," (inflow) or ",{"type":43,"tag":90,"props":860,"children":862},{"className":861},[],[863],{"type":49,"value":463},{"type":49,"value":865},"\n(outflow), filtered by:\n",{"type":43,"tag":283,"props":867,"children":868},{},[869,882,902],{"type":43,"tag":78,"props":870,"children":871},{},[872,874,880],{"type":49,"value":873},"amount window: ",{"type":43,"tag":90,"props":875,"children":877},{"className":876},[],[878],{"type":49,"value":879},"±20%",{"type":49,"value":881}," of the sub-tx fiat value,",{"type":43,"tag":78,"props":883,"children":884},{},[885,887,893,895,900],{"type":49,"value":886},"date window: ",{"type":43,"tag":90,"props":888,"children":890},{"className":889},[],[891],{"type":49,"value":892},"dateCreated_Range = [tx.timestamp − 60d, tx.timestamp]",{"type":49,"value":894}," — bills\u002Finvoices are issued at or\n",{"type":43,"tag":477,"props":896,"children":897},{},[898],{"type":49,"value":899},"before",{"type":49,"value":901}," the payment, never after. Don't bother with future-dated invoices\u002Fbills.",{"type":43,"tag":78,"props":903,"children":904},{},[905,907,912,914,919,921,926,928,934,935,941,943,948],{"type":49,"value":906},"contact: if the user has named a vendor\u002Fcustomer, pass that as ",{"type":43,"tag":90,"props":908,"children":910},{"className":909},[],[911],{"type":49,"value":447},{"type":49,"value":913},". Do NOT try to match the\non-chain recipient address to an ERP contact — ERP contact identifiers (from QBO\u002FXero\u002FNetSuite) are\ninternal IDs, never wallet addresses. Some contact labels ",{"type":43,"tag":477,"props":915,"children":916},{},[917],{"type":49,"value":918},"happen to resemble",{"type":49,"value":920}," the vendor name in text,\nbut the schema has no \"resembles\" filter, so rely on ",{"type":43,"tag":90,"props":922,"children":924},{"className":923},[],[925],{"type":49,"value":447},{"type":49,"value":927}," over ",{"type":43,"tag":90,"props":929,"children":931},{"className":930},[],[932],{"type":49,"value":933},"vendor",{"type":49,"value":411},{"type":43,"tag":90,"props":936,"children":938},{"className":937},[],[939],{"type":49,"value":940},"customer",{"type":49,"value":942}," fields.\nRank the fallback set client-side by: amount proximity → date proximity (prefer the most recent\nbill\u002Finvoice before the tx) → name hits in ",{"type":43,"tag":90,"props":944,"children":946},{"className":945},[],[947],{"type":49,"value":447},{"type":49,"value":949}," output.",{"type":43,"tag":78,"props":951,"children":952},{},[953,955,960,961,966,968,974,975,981,982,988],{"type":49,"value":954},"Present the top ≤5 as a numbered list (never more — too many choices is worse than too few). For each row\nshow: confidence tier, $ amount, customer\u002Fvendor name, ",{"type":43,"tag":90,"props":956,"children":958},{"className":957},[],[959],{"type":49,"value":409},{"type":49,"value":411},{"type":43,"tag":90,"props":962,"children":964},{"className":963},[],[965],{"type":49,"value":417},{"type":49,"value":967},", due date, and the\n",{"type":43,"tag":90,"props":969,"children":971},{"className":970},[],[972],{"type":49,"value":973},"primaryMatchFactors",{"type":49,"value":383},{"type":43,"tag":90,"props":976,"children":978},{"className":977},[],[979],{"type":49,"value":980},"amount_exact",{"type":49,"value":221},{"type":43,"tag":90,"props":983,"children":985},{"className":984},[],[986],{"type":49,"value":987},"contact_match",{"type":49,"value":989},"). Best-fit first.",{"type":43,"tag":506,"props":991,"children":993},{"id":992},"branch-b-user-has-an-invoicebill-id-or-number",[994],{"type":49,"value":995},"Branch B — User has an invoice\u002Fbill ID or number",{"type":43,"tag":74,"props":997,"children":998},{},[999,1210,1222,1408],{"type":43,"tag":78,"props":1000,"children":1001},{},[1002,1004,1009,1011,1016,1018,1023,1025,1157,1159,1164,1166,1171,1173,1178,1180,1186,1188,1194,1196,1201,1203,1209],{"type":49,"value":1003},"Resolve the entity. Try ",{"type":43,"tag":90,"props":1005,"children":1007},{"className":1006},[],[1008],{"type":49,"value":455},{"type":49,"value":1010}," first, then ",{"type":43,"tag":90,"props":1012,"children":1014},{"className":1013},[],[1015],{"type":49,"value":463},{"type":49,"value":1017}," if it's not an invoice (or vice versa if the\nuser said \"bill\"). For ",{"type":43,"tag":82,"props":1019,"children":1020},{},[1021],{"type":49,"value":1022},"invoices",{"type":49,"value":1024},", include the embedded suggestions:\n",{"type":43,"tag":175,"props":1026,"children":1028},{"className":177,"code":1027,"language":179,"meta":100,"style":100},"query GetInvoice($id: Float, $text: String) {\n  erpInvoices(id: $id, freeText: $text, first: 1) {\n    results {\n      id invoiceNumber customerName origAmount balance dateCreated dueDate billingStatus\n      integration { integratedApp companyName }\n      suggestedSubTransactionMatches {\n        id score confidenceTier\n        subTransaction {\n          id amount fiatValue\n          asset { symbol identifier }\n          tx { identifier timestamp platform }\n        }\n      }\n    }\n  }\n}\n",[1029],{"type":43,"tag":90,"props":1030,"children":1031},{"__ignoreMap":100},[1032,1040,1048,1055,1063,1071,1079,1087,1095,1103,1111,1119,1127,1134,1141,1149],{"type":43,"tag":185,"props":1033,"children":1034},{"class":187,"line":188},[1035],{"type":43,"tag":185,"props":1036,"children":1037},{},[1038],{"type":49,"value":1039},"query GetInvoice($id: Float, $text: String) {\n",{"type":43,"tag":185,"props":1041,"children":1042},{"class":187,"line":537},[1043],{"type":43,"tag":185,"props":1044,"children":1045},{},[1046],{"type":49,"value":1047},"  erpInvoices(id: $id, freeText: $text, first: 1) {\n",{"type":43,"tag":185,"props":1049,"children":1050},{"class":187,"line":546},[1051],{"type":43,"tag":185,"props":1052,"children":1053},{},[1054],{"type":49,"value":552},{"type":43,"tag":185,"props":1056,"children":1057},{"class":187,"line":555},[1058],{"type":43,"tag":185,"props":1059,"children":1060},{},[1061],{"type":49,"value":1062},"      id invoiceNumber customerName origAmount balance dateCreated dueDate billingStatus\n",{"type":43,"tag":185,"props":1064,"children":1065},{"class":187,"line":564},[1066],{"type":43,"tag":185,"props":1067,"children":1068},{},[1069],{"type":49,"value":1070},"      integration { integratedApp companyName }\n",{"type":43,"tag":185,"props":1072,"children":1073},{"class":187,"line":573},[1074],{"type":43,"tag":185,"props":1075,"children":1076},{},[1077],{"type":49,"value":1078},"      suggestedSubTransactionMatches {\n",{"type":43,"tag":185,"props":1080,"children":1081},{"class":187,"line":582},[1082],{"type":43,"tag":185,"props":1083,"children":1084},{},[1085],{"type":49,"value":1086},"        id score confidenceTier\n",{"type":43,"tag":185,"props":1088,"children":1089},{"class":187,"line":591},[1090],{"type":43,"tag":185,"props":1091,"children":1092},{},[1093],{"type":49,"value":1094},"        subTransaction {\n",{"type":43,"tag":185,"props":1096,"children":1097},{"class":187,"line":600},[1098],{"type":43,"tag":185,"props":1099,"children":1100},{},[1101],{"type":49,"value":1102},"          id amount fiatValue\n",{"type":43,"tag":185,"props":1104,"children":1105},{"class":187,"line":609},[1106],{"type":43,"tag":185,"props":1107,"children":1108},{},[1109],{"type":49,"value":1110},"          asset { symbol identifier }\n",{"type":43,"tag":185,"props":1112,"children":1113},{"class":187,"line":618},[1114],{"type":43,"tag":185,"props":1115,"children":1116},{},[1117],{"type":49,"value":1118},"          tx { identifier timestamp platform }\n",{"type":43,"tag":185,"props":1120,"children":1121},{"class":187,"line":627},[1122],{"type":43,"tag":185,"props":1123,"children":1124},{},[1125],{"type":49,"value":1126},"        }\n",{"type":43,"tag":185,"props":1128,"children":1129},{"class":187,"line":636},[1130],{"type":43,"tag":185,"props":1131,"children":1132},{},[1133],{"type":49,"value":624},{"type":43,"tag":185,"props":1135,"children":1136},{"class":187,"line":645},[1137],{"type":43,"tag":185,"props":1138,"children":1139},{},[1140],{"type":49,"value":633},{"type":43,"tag":185,"props":1142,"children":1144},{"class":187,"line":1143},15,[1145],{"type":43,"tag":185,"props":1146,"children":1147},{},[1148],{"type":49,"value":642},{"type":43,"tag":185,"props":1150,"children":1152},{"class":187,"line":1151},16,[1153],{"type":43,"tag":185,"props":1154,"children":1155},{},[1156],{"type":49,"value":651},{"type":49,"value":1158},"\nFor ",{"type":43,"tag":82,"props":1160,"children":1161},{},[1162],{"type":49,"value":1163},"bills",{"type":49,"value":1165},", query ",{"type":43,"tag":90,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":49,"value":463},{"type":49,"value":1172}," — note that bills do ",{"type":43,"tag":82,"props":1174,"children":1175},{},[1176],{"type":49,"value":1177},"not",{"type":49,"value":1179}," expose ",{"type":43,"tag":90,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":49,"value":1185},"suggestedSubTransactionMatches",{"type":49,"value":1187},", so\njust fetch the bill metadata (",{"type":43,"tag":90,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":49,"value":1193},"id billNumber vendorName vendorId origAmount balance dateCreated dueDate billingStatus integration { integratedApp companyName }",{"type":49,"value":1195},") and go straight to the fallback step. If ",{"type":43,"tag":90,"props":1197,"children":1199},{"className":1198},[],[1200],{"type":49,"value":339},{"type":49,"value":1202},"\nlookup returns nothing, retry with ",{"type":43,"tag":90,"props":1204,"children":1206},{"className":1205},[],[1207],{"type":49,"value":1208},"freeText: $userInput",{"type":49,"value":431},{"type":43,"tag":78,"props":1211,"children":1212},{},[1213,1215,1220],{"type":49,"value":1214},"For invoices, use the embedded ",{"type":43,"tag":90,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":49,"value":1185},{"type":49,"value":1221}," as the ranked list.",{"type":43,"tag":78,"props":1223,"children":1224},{},[1225,1229],{"type":43,"tag":82,"props":1226,"children":1227},{},[1228],{"type":49,"value":849},{"type":43,"tag":283,"props":1230,"children":1231},{},[1232,1252,1403],{"type":43,"tag":78,"props":1233,"children":1234},{},[1235,1237,1242,1244,1250],{"type":49,"value":1236},"First, ",{"type":43,"tag":82,"props":1238,"children":1239},{},[1240],{"type":49,"value":1241},"ask the user for an approximate date of payment",{"type":49,"value":1243}," (and remind them: \"if you have the tx hash,\nthat's fastest\"). Payments happen on or after the bill\u002Finvoice date, usually within days — not before.\nDefault to a window of ",{"type":43,"tag":90,"props":1245,"children":1247},{"className":1246},[],[1248],{"type":49,"value":1249},"[dateCreated, dateCreated + 60 days]",{"type":49,"value":1251}," if they can't be specific.",{"type":43,"tag":78,"props":1253,"children":1254},{},[1255,1257,1263,1265,1270,1272],{"type":49,"value":1256},"Query ",{"type":43,"tag":90,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":49,"value":1262},"transaction",{"type":49,"value":1264}," with ",{"type":43,"tag":82,"props":1266,"children":1267},{},[1268],{"type":49,"value":1269},"server-side filters",{"type":49,"value":1271}," so we don't pull the entire ledger. Use:\n",{"type":43,"tag":283,"props":1273,"children":1274},{},[1275,1292,1310,1329,1369,1390],{"type":43,"tag":78,"props":1276,"children":1277},{},[1278,1284,1285,1291],{"type":43,"tag":90,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":49,"value":1283},"platform: \u003CconfiguredNetwork or user's network>",{"type":49,"value":383},{"type":43,"tag":90,"props":1286,"children":1288},{"className":1287},[],[1289],{"type":49,"value":1290},"\"ethereum\"",{"type":49,"value":419},{"type":43,"tag":78,"props":1293,"children":1294},{},[1295,1301,1302,1308],{"type":43,"tag":90,"props":1296,"children":1298},{"className":1297},[],[1299],{"type":49,"value":1300},"timestamp_Gte",{"type":49,"value":457},{"type":43,"tag":90,"props":1303,"children":1305},{"className":1304},[],[1306],{"type":49,"value":1307},"timestamp_Lte",{"type":49,"value":1309}," → the user-supplied date window,",{"type":43,"tag":78,"props":1311,"children":1312},{},[1313,1319,1321,1327],{"type":43,"tag":90,"props":1314,"children":1316},{"className":1315},[],[1317],{"type":49,"value":1318},"children_Asset_Identifier_In: [\u003CassetIdentifier>]",{"type":49,"value":1320}," → the bill's ",{"type":43,"tag":90,"props":1322,"children":1324},{"className":1323},[],[1325],{"type":49,"value":1326},"configuredAsset.identifier",{"type":49,"value":1328}," (e.g. the\nUSDC contract), or the invoice's expected asset,",{"type":43,"tag":78,"props":1330,"children":1331},{},[1332,1338,1340,1346,1347,1352,1354,1359,1361,1367],{"type":43,"tag":90,"props":1333,"children":1335},{"className":1334},[],[1336],{"type":49,"value":1337},"children_FiatValue_Between: \"\u003Clow>,\u003Chigh>\"",{"type":49,"value":1339}," → fiat window around ",{"type":43,"tag":90,"props":1341,"children":1343},{"className":1342},[],[1344],{"type":49,"value":1345},"origAmount",{"type":49,"value":383},{"type":43,"tag":90,"props":1348,"children":1350},{"className":1349},[],[1351],{"type":49,"value":879},{"type":49,"value":1353},"). This is\na ",{"type":43,"tag":82,"props":1355,"children":1356},{},[1357],{"type":49,"value":1358},"string",{"type":49,"value":1360}," of two comma-separated numbers. Example: ",{"type":43,"tag":90,"props":1362,"children":1364},{"className":1363},[],[1365],{"type":49,"value":1366},"\"0.4,0.6\"",{"type":49,"value":1368}," for a $0.50 bill.",{"type":43,"tag":78,"props":1370,"children":1371},{},[1372,1374,1380,1382,1388],{"type":49,"value":1373},"Optionally ",{"type":43,"tag":90,"props":1375,"children":1377},{"className":1376},[],[1378],{"type":49,"value":1379},"children_BalanceFactor: -1",{"type":49,"value":1381}," (outflow, for bills) or ",{"type":43,"tag":90,"props":1383,"children":1385},{"className":1384},[],[1386],{"type":49,"value":1387},"1",{"type":49,"value":1389}," (inflow, for invoices).",{"type":43,"tag":78,"props":1391,"children":1392},{},[1393,1395,1401],{"type":49,"value":1394},"Use ",{"type":43,"tag":90,"props":1396,"children":1398},{"className":1397},[],[1399],{"type":49,"value":1400},"children_Amount_Between",{"type":49,"value":1402}," as an additional filter only when the fiat price can't be trusted\n(pre-priced historical assets, etc.).",{"type":43,"tag":78,"props":1404,"children":1405},{},[1406],{"type":49,"value":1407},"If the resulting set is still large, ask the user for a tighter date or an amount refinement before\npresenting.",{"type":43,"tag":78,"props":1409,"children":1410},{},[1411,1413,1418,1420,1433,1435,1448,1450,1455],{"type":49,"value":1412},"Present ",{"type":43,"tag":82,"props":1414,"children":1415},{},[1416],{"type":49,"value":1417},"up to 5",{"type":49,"value":1419}," candidate transactions as a numbered list — show for each:\n",{"type":43,"tag":82,"props":1421,"children":1422},{},[1423,1425,1431],{"type":49,"value":1424},"tx hash (truncated ",{"type":43,"tag":90,"props":1426,"children":1428},{"className":1427},[],[1429],{"type":49,"value":1430},"0xabcd…1234",{"type":49,"value":1432},"), sender → recipient addresses (same shortened form), token amount +\nsymbol, fiat value, and timestamp.",{"type":49,"value":1434}," The tx hash is the user-facing identifier they recognize; the raw\naddresses and token amounts disambiguate when fiat alone is too ambiguous (many txs cluster near the same\namount). ",{"type":43,"tag":82,"props":1436,"children":1437},{},[1438,1440,1446],{"type":49,"value":1439},"Never show internal IDs like ",{"type":43,"tag":90,"props":1441,"children":1443},{"className":1442},[],[1444],{"type":49,"value":1445},"subTxId",{"type":49,"value":1447}," to the user — they're meaningless to them.",{"type":49,"value":1449}," Hold the\n",{"type":43,"tag":90,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":49,"value":1445},{"type":49,"value":1456}," internally for the mutation; reference the tx by its hash in all user-visible output.\nIf no good matches, say so and ask for a tx hash — don't guess-dump a big list.",{"type":43,"tag":63,"props":1458,"children":1459},{},[],{"type":43,"tag":67,"props":1461,"children":1463},{"id":1462},"step-4-user-picks-a-match-or-asks-for-more",[1464],{"type":49,"value":1465},"Step 4 — User picks a match (or asks for more)",{"type":43,"tag":52,"props":1467,"children":1468},{},[1469,1471],{"type":49,"value":1470},"Prompt: ",{"type":43,"tag":477,"props":1472,"children":1473},{},[1474,1476,1482],{"type":49,"value":1475},"\"Pick a number, or type ",{"type":43,"tag":90,"props":1477,"children":1479},{"className":1478},[],[1480],{"type":49,"value":1481},"more",{"type":49,"value":1483}," to widen the search (give me a contact name, date, or amount to focus\non).\"",{"type":43,"tag":283,"props":1485,"children":1486},{},[1487,1500,1512],{"type":43,"tag":78,"props":1488,"children":1489},{},[1490,1492,1498],{"type":49,"value":1491},"On a number: capture the chosen ",{"type":43,"tag":90,"props":1493,"children":1495},{"className":1494},[],[1496],{"type":49,"value":1497},"(subTxId, invoiceOrBillId, entityType)",{"type":49,"value":1499}," and continue to Step 5.",{"type":43,"tag":78,"props":1501,"children":1502},{},[1503,1505,1510],{"type":49,"value":1504},"On ",{"type":43,"tag":90,"props":1506,"children":1508},{"className":1507},[],[1509],{"type":49,"value":1481},{"type":49,"value":1511},": re-query with looser windows or with the user's added hints (contact filter, expanded date range,\namount range), present a fresh list, repeat.",{"type":43,"tag":78,"props":1513,"children":1514},{},[1515,1517],{"type":49,"value":1516},"On \"none of these\" or similar: stop gracefully — ",{"type":43,"tag":477,"props":1518,"children":1519},{},[1520],{"type":49,"value":1521},"\"OK, no match made. Tell me when you have more info.\"",{"type":43,"tag":63,"props":1523,"children":1524},{},[],{"type":43,"tag":67,"props":1526,"children":1528},{"id":1527},"step-5-configure-payment-account-and-optional-fiat-alignment",[1529],{"type":49,"value":1530},"Step 5 — Configure payment account and (optional) fiat alignment",{"type":43,"tag":52,"props":1532,"children":1533},{},[1534],{"type":49,"value":1535},"Once a match pair is chosen:",{"type":43,"tag":74,"props":1537,"children":1538},{},[1539,1701],{"type":43,"tag":78,"props":1540,"children":1541},{},[1542,1555,1557,1562,1564,1570,1572,1578,1579,1585,1587,1593,1594,1598,1600],{"type":43,"tag":82,"props":1543,"children":1544},{},[1545,1547,1553],{"type":49,"value":1546},"Deposit account (for ",{"type":43,"tag":90,"props":1548,"children":1550},{"className":1549},[],[1551],{"type":49,"value":1552},"matchApAr.depositAccountId",{"type":49,"value":1554},").",{"type":49,"value":1556}," This is an ",{"type":43,"tag":82,"props":1558,"children":1559},{},[1560],{"type":49,"value":1561},"ERP integration account",{"type":49,"value":1563},"\n(the GL account in Xero\u002FQBO\u002FNetSuite that the bill will post against — e.g. \"Crypto Wallet – ETH\",\n\"Cash and cash equivalents\"). It is NOT a tres internal\u002Fwallet account. The schema FK is against\n",{"type":43,"tag":90,"props":1565,"children":1567},{"className":1566},[],[1568],{"type":49,"value":1569},"schema_integrationaccount",{"type":49,"value":1571},"; the value lives on ",{"type":43,"tag":90,"props":1573,"children":1575},{"className":1574},[],[1576],{"type":49,"value":1577},"ErpBill.depositAccount",{"type":49,"value":457},{"type":43,"tag":90,"props":1580,"children":1582},{"className":1581},[],[1583],{"type":49,"value":1584},"ErpInvoice.depositAccount",{"type":49,"value":1586},"\nas ",{"type":43,"tag":90,"props":1588,"children":1590},{"className":1589},[],[1591],{"type":49,"value":1592},"IntegrationAccountQuery { id name type value }",{"type":49,"value":431},{"type":43,"tag":1595,"props":1596,"children":1597},"br",{},[],{"type":49,"value":1599},"Resolution order:",{"type":43,"tag":74,"props":1601,"children":1602},{},[1603,1637,1662],{"type":43,"tag":78,"props":1604,"children":1605},{},[1606,1611,1613,1619,1621,1627,1629,1635],{"type":43,"tag":82,"props":1607,"children":1608},{},[1609],{"type":49,"value":1610},"Use the pre-set one on the bill\u002Finvoice.",{"type":49,"value":1612}," When the entity was created in the ERP, the user\ntypically already picked a deposit account. Read ",{"type":43,"tag":90,"props":1614,"children":1616},{"className":1615},[],[1617],{"type":49,"value":1618},"erpBills.results[].depositAccount.id",{"type":49,"value":1620}," (or\n",{"type":43,"tag":90,"props":1622,"children":1624},{"className":1623},[],[1625],{"type":49,"value":1626},"erpInvoices.results[].depositAccount.id",{"type":49,"value":1628},"). If it's non-null, use that id as ",{"type":43,"tag":90,"props":1630,"children":1632},{"className":1631},[],[1633],{"type":49,"value":1634},"depositAccountId",{"type":49,"value":1636},"\nand just mention it in the summary — no prompt.",{"type":43,"tag":78,"props":1638,"children":1639},{},[1640,1645,1647,1653,1655,1661],{"type":43,"tag":82,"props":1641,"children":1642},{},[1643],{"type":49,"value":1644},"Otherwise ask.",{"type":49,"value":1646}," Query ",{"type":43,"tag":90,"props":1648,"children":1650},{"className":1649},[],[1651],{"type":49,"value":1652},"integrationAccount(integration: \u003CerpId>, first: 100)",{"type":49,"value":1654}," and show the\nuser the ASSET-type accounts (cash\u002Fwallet\u002Fcrypto GL accounts) as a numbered list; capture the\nchosen ",{"type":43,"tag":90,"props":1656,"children":1658},{"className":1657},[],[1659],{"type":49,"value":1660},"integrationAccount.id",{"type":49,"value":431},{"type":43,"tag":78,"props":1663,"children":1664},{},[1665,1671,1673,1678,1680,1684,1686,1691,1693,1699],{"type":43,"tag":90,"props":1666,"children":1668},{"className":1667},[],[1669],{"type":49,"value":1670},"paymentToInternalAccounts",{"type":49,"value":1672}," maps ",{"type":43,"tag":477,"props":1674,"children":1675},{},[1676],{"type":49,"value":1677},"wallet → asset",{"type":49,"value":1679}," on the tres side and is useful for payout\nworkflows — it is ",{"type":43,"tag":82,"props":1681,"children":1682},{},[1683],{"type":49,"value":1177},{"type":49,"value":1685}," the source of ",{"type":43,"tag":90,"props":1687,"children":1689},{"className":1688},[],[1690],{"type":49,"value":1634},{"type":49,"value":1692}," for ",{"type":43,"tag":90,"props":1694,"children":1696},{"className":1695},[],[1697],{"type":49,"value":1698},"matchApAr",{"type":49,"value":1700},". Don't reach for it\nhere.",{"type":43,"tag":78,"props":1702,"children":1703},{},[1704,1709,1711,1717,1719,1724,1726],{"type":43,"tag":82,"props":1705,"children":1706},{},[1707],{"type":49,"value":1708},"Fiat alignment.",{"type":49,"value":1710}," Compare the sub-tx ",{"type":43,"tag":90,"props":1712,"children":1714},{"className":1713},[],[1715],{"type":49,"value":1716},"fiatValue",{"type":49,"value":1718}," to the invoice\u002Fbill ",{"type":43,"tag":90,"props":1720,"children":1722},{"className":1721},[],[1723],{"type":49,"value":1345},{"type":49,"value":1725},". Three cases:",{"type":43,"tag":283,"props":1727,"children":1728},{},[1729,1759,1786],{"type":43,"tag":78,"props":1730,"children":1731},{},[1732,1737,1739,1744,1746,1751,1752,1757],{"type":43,"tag":90,"props":1733,"children":1735},{"className":1734},[],[1736],{"type":49,"value":1716},{"type":49,"value":1738}," is ",{"type":43,"tag":82,"props":1740,"children":1741},{},[1742],{"type":49,"value":1743},"null or 0",{"type":49,"value":1745},": ask ",{"type":43,"tag":477,"props":1747,"children":1748},{},[1749],{"type":49,"value":1750},"\"This transaction has no fiat value set. Align it to ${origAmount}\nso the {bill\u002Finvoice} closes fully? (y\u002Fn)\"",{"type":49,"value":235},{"type":43,"tag":82,"props":1753,"children":1754},{},[1755],{"type":49,"value":1756},"no default",{"type":49,"value":1758},", require an explicit yes.",{"type":43,"tag":78,"props":1760,"children":1761},{},[1762,1767,1769,1774,1775,1780,1781,1785],{"type":43,"tag":90,"props":1763,"children":1765},{"className":1764},[],[1766],{"type":49,"value":1716},{"type":49,"value":1768}," differs from ",{"type":43,"tag":90,"props":1770,"children":1772},{"className":1771},[],[1773],{"type":49,"value":1345},{"type":49,"value":1745},{"type":43,"tag":477,"props":1776,"children":1777},{},[1778],{"type":49,"value":1779},"\"Align tx fiat value from $X to $Y so the AP\u002FAR\ncloses fully? (y\u002Fn)\"",{"type":49,"value":235},{"type":43,"tag":82,"props":1782,"children":1783},{},[1784],{"type":49,"value":1756},{"type":49,"value":1758},{"type":43,"tag":78,"props":1787,"children":1788},{},[1789,1791,1804],{"type":49,"value":1790},"Values match: skip.\n",{"type":43,"tag":82,"props":1792,"children":1793},{},[1794,1796,1802],{"type":49,"value":1795},"Never run ",{"type":43,"tag":90,"props":1797,"children":1799},{"className":1798},[],[1800],{"type":49,"value":1801},"setManualFiatValue",{"type":49,"value":1803}," without a clear yes",{"type":49,"value":1805}," — even if the user's original request implied\n\"close the invoice\", the fiat alignment is a separate write and needs its own consent. If they say no,\nthe match still proceeds but the entity may stay partially paid.",{"type":43,"tag":63,"props":1807,"children":1808},{},[],{"type":43,"tag":67,"props":1810,"children":1812},{"id":1811},"step-6-confirm-and-apply",[1813],{"type":49,"value":1814},"Step 6 — Confirm and apply",{"type":43,"tag":52,"props":1816,"children":1817},{},[1818,1820,1825,1827,1832,1834,1839,1840,1845,1847,1853],{"type":49,"value":1819},"Show this summary table — use ",{"type":43,"tag":82,"props":1821,"children":1822},{},[1823],{"type":49,"value":1824},"human-readable values only",{"type":49,"value":1826},": tx hash (truncated), deposit account ",{"type":43,"tag":82,"props":1828,"children":1829},{},[1830],{"type":49,"value":1831},"name",{"type":49,"value":1833},"\n(never its id), invoice\u002Fbill number or customer\u002Fvendor name. Internal IDs (",{"type":43,"tag":90,"props":1835,"children":1837},{"className":1836},[],[1838],{"type":49,"value":1445},{"type":49,"value":221},{"type":43,"tag":90,"props":1841,"children":1843},{"className":1842},[],[1844],{"type":49,"value":1634},{"type":49,"value":1846},",\nDB ",{"type":43,"tag":90,"props":1848,"children":1850},{"className":1849},[],[1851],{"type":49,"value":1852},"entityId",{"type":49,"value":1854},") are for the mutation payload, never for the user.",{"type":43,"tag":1856,"props":1857,"children":1858},"table",{},[1859,1874],{"type":43,"tag":1860,"props":1861,"children":1862},"thead",{},[1863],{"type":43,"tag":1864,"props":1865,"children":1866},"tr",{},[1867,1871],{"type":43,"tag":1868,"props":1869,"children":1870},"th",{},[],{"type":43,"tag":1868,"props":1872,"children":1873},{},[],{"type":43,"tag":1875,"props":1876,"children":1877},"tbody",{},[1878,1897,1916,1929,1942],{"type":43,"tag":1864,"props":1879,"children":1880},{},[1881,1887],{"type":43,"tag":1882,"props":1883,"children":1884},"td",{},[1885],{"type":49,"value":1886},"Transaction",{"type":43,"tag":1882,"props":1888,"children":1889},{},[1890,1895],{"type":43,"tag":90,"props":1891,"children":1893},{"className":1892},[],[1894],{"type":49,"value":1430},{"type":49,"value":1896}," · {asset.symbol} {amount} · ${fiatValue}",{"type":43,"tag":1864,"props":1898,"children":1899},{},[1900,1905],{"type":43,"tag":1882,"props":1901,"children":1902},{},[1903],{"type":49,"value":1904},"Invoice\u002FBill",{"type":43,"tag":1882,"props":1906,"children":1907},{},[1908,1914],{"type":43,"tag":90,"props":1909,"children":1911},{"className":1910},[],[1912],{"type":49,"value":1913},"{invoiceNumber or billNumber}",{"type":49,"value":1915}," · {customer\u002Fvendor} · ${origAmount} {currency}",{"type":43,"tag":1864,"props":1917,"children":1918},{},[1919,1924],{"type":43,"tag":1882,"props":1920,"children":1921},{},[1922],{"type":49,"value":1923},"Payment account",{"type":43,"tag":1882,"props":1925,"children":1926},{},[1927],{"type":49,"value":1928},"{depositAccount.name}",{"type":43,"tag":1864,"props":1930,"children":1931},{},[1932,1937],{"type":43,"tag":1882,"props":1933,"children":1934},{},[1935],{"type":49,"value":1936},"Align fiat",{"type":43,"tag":1882,"props":1938,"children":1939},{},[1940],{"type":49,"value":1941},"yes → ${origAmount} \u002F no",{"type":43,"tag":1864,"props":1943,"children":1944},{},[1945,1950],{"type":43,"tag":1882,"props":1946,"children":1947},{},[1948],{"type":49,"value":1949},"Sync to ERP after match",{"type":43,"tag":1882,"props":1951,"children":1952},{},[1953],{"type":49,"value":1954},"yes \u002F no",{"type":43,"tag":52,"props":1956,"children":1957},{},[1958,1960,1970,1972,1977],{"type":49,"value":1959},"Ask: ",{"type":43,"tag":477,"props":1961,"children":1962},{},[1963,1965,1968],{"type":49,"value":1964},"\"Apply these changes to ",{"type":43,"tag":82,"props":1966,"children":1967},{"org-name":100},[],{"type":49,"value":1969},"? (yes\u002Fno)\"",{"type":49,"value":1971}," — only proceed on yes. Treat this as approval for\nthe ",{"type":43,"tag":82,"props":1973,"children":1974},{},[1975],{"type":49,"value":1976},"match only",{"type":49,"value":1978},". Fiat alignment and ERP sync each need their own explicit yes captured earlier (Step 5\nfor fiat, the prompt below for sync) — even if the user's opening request said \"sync to QBO\", still confirm\nhere, because the request was issued before they saw the actual match details.",{"type":43,"tag":52,"props":1980,"children":1981},{},[1982],{"type":49,"value":1983},"Then run mutations in this order, reporting the result of each:",{"type":43,"tag":74,"props":1985,"children":1986},{},[1987,2188,2268],{"type":43,"tag":78,"props":1988,"children":1989},{},[1990,1995,2040,2043,2045],{"type":43,"tag":82,"props":1991,"children":1992},{},[1993],{"type":49,"value":1994},"Match (always):",{"type":43,"tag":175,"props":1996,"children":1998},{"className":177,"code":1997,"language":179,"meta":100,"style":100},"mutation Match($entityType: String!, $matches: [SubTxMatchInput]!) {\n  matchApAr(entityType: $entityType, matches: $matches) {\n    results { subTxId entityId depositAccountId }\n  }\n}\n",[1999],{"type":43,"tag":90,"props":2000,"children":2001},{"__ignoreMap":100},[2002,2010,2018,2026,2033],{"type":43,"tag":185,"props":2003,"children":2004},{"class":187,"line":188},[2005],{"type":43,"tag":185,"props":2006,"children":2007},{},[2008],{"type":49,"value":2009},"mutation Match($entityType: String!, $matches: [SubTxMatchInput]!) {\n",{"type":43,"tag":185,"props":2011,"children":2012},{"class":187,"line":537},[2013],{"type":43,"tag":185,"props":2014,"children":2015},{},[2016],{"type":49,"value":2017},"  matchApAr(entityType: $entityType, matches: $matches) {\n",{"type":43,"tag":185,"props":2019,"children":2020},{"class":187,"line":546},[2021],{"type":43,"tag":185,"props":2022,"children":2023},{},[2024],{"type":49,"value":2025},"    results { subTxId entityId depositAccountId }\n",{"type":43,"tag":185,"props":2027,"children":2028},{"class":187,"line":555},[2029],{"type":43,"tag":185,"props":2030,"children":2031},{},[2032],{"type":49,"value":642},{"type":43,"tag":185,"props":2034,"children":2035},{"class":187,"line":564},[2036],{"type":43,"tag":185,"props":2037,"children":2038},{},[2039],{"type":49,"value":651},{"type":43,"tag":1595,"props":2041,"children":2042},{},[],{"type":49,"value":2044},"Variables:",{"type":43,"tag":283,"props":2046,"children":2047},{},[2048,2088,2106,2172],{"type":43,"tag":78,"props":2049,"children":2050},{},[2051,2057,2059,2064,2065,2071,2073,2079,2081,2087],{"type":43,"tag":90,"props":2052,"children":2054},{"className":2053},[],[2055],{"type":49,"value":2056},"entityType",{"type":49,"value":2058},": ",{"type":43,"tag":82,"props":2060,"children":2061},{},[2062],{"type":49,"value":2063},"lowercase",{"type":49,"value":235},{"type":43,"tag":90,"props":2066,"children":2068},{"className":2067},[],[2069],{"type":49,"value":2070},"\"invoice\"",{"type":49,"value":2072}," or ",{"type":43,"tag":90,"props":2074,"children":2076},{"className":2075},[],[2077],{"type":49,"value":2078},"\"bill\"",{"type":49,"value":2080},". Uppercase values are rejected with\n",{"type":43,"tag":90,"props":2082,"children":2084},{"className":2083},[],[2085],{"type":49,"value":2086},"Invalid entity_type",{"type":49,"value":431},{"type":43,"tag":78,"props":2089,"children":2090},{},[2091,2097,2099,2105],{"type":43,"tag":90,"props":2092,"children":2094},{"className":2093},[],[2095],{"type":49,"value":2096},"matches[].subTxId",{"type":49,"value":2098},": string (e.g. ",{"type":43,"tag":90,"props":2100,"children":2102},{"className":2101},[],[2103],{"type":49,"value":2104},"\"4548595830\"",{"type":49,"value":1554},{"type":43,"tag":78,"props":2107,"children":2108},{},[2109,2115,2116,2121,2123,2128,2130,2136,2138,2144,2146,2151,2152,2157,2159,2164,2166,2171],{"type":43,"tag":90,"props":2110,"children":2112},{"className":2111},[],[2113],{"type":49,"value":2114},"matches[].entityId",{"type":49,"value":2058},{"type":43,"tag":82,"props":2117,"children":2118},{},[2119],{"type":49,"value":2120},"integer",{"type":49,"value":2122}," — the DB ",{"type":43,"tag":90,"props":2124,"children":2126},{"className":2125},[],[2127],{"type":49,"value":339},{"type":49,"value":2129}," of the invoice\u002Fbill (from ",{"type":43,"tag":90,"props":2131,"children":2133},{"className":2132},[],[2134],{"type":49,"value":2135},"erpInvoices.results[].id",{"type":49,"value":2137},"\n\u002F ",{"type":43,"tag":90,"props":2139,"children":2141},{"className":2140},[],[2142],{"type":49,"value":2143},"erpBills.results[].id",{"type":49,"value":2145},"), NOT the human-facing ",{"type":43,"tag":90,"props":2147,"children":2149},{"className":2148},[],[2150],{"type":49,"value":409},{"type":49,"value":411},{"type":43,"tag":90,"props":2153,"children":2155},{"className":2154},[],[2156],{"type":49,"value":417},{"type":49,"value":2158},". Passing a string\nerrors with ",{"type":43,"tag":477,"props":2160,"children":2161},{},[2162],{"type":49,"value":2163},"\"Int cannot represent non-integer value\"",{"type":49,"value":2165},"; passing a bill number looks up nothing\nand errors with ",{"type":43,"tag":477,"props":2167,"children":2168},{},[2169],{"type":49,"value":2170},"\"One or more Bill IDs not found\"",{"type":49,"value":431},{"type":43,"tag":78,"props":2173,"children":2174},{},[2175,2181,2182,2186],{"type":43,"tag":90,"props":2176,"children":2178},{"className":2177},[],[2179],{"type":49,"value":2180},"matches[].depositAccountId",{"type":49,"value":2058},{"type":43,"tag":82,"props":2183,"children":2184},{},[2185],{"type":49,"value":2120},{"type":49,"value":2187}," — the integration account id (see Step 5).",{"type":43,"tag":78,"props":2189,"children":2190},{},[2191,2196,2226,2229,2231,2236,2238,2244,2245,2251,2253,2258,2260,2266],{"type":43,"tag":82,"props":2192,"children":2193},{},[2194],{"type":49,"value":2195},"Fiat alignment (only if user opted in):",{"type":43,"tag":175,"props":2197,"children":2199},{"className":177,"code":2198,"language":179,"meta":100,"style":100},"mutation AlignFiat($id: String!, $newFiatValue: String!, $currency: String) {\n  setManualFiatValue(id: $id, newFiatValue: $newFiatValue, currency: $currency) { success }\n}\n",[2200],{"type":43,"tag":90,"props":2201,"children":2202},{"__ignoreMap":100},[2203,2211,2219],{"type":43,"tag":185,"props":2204,"children":2205},{"class":187,"line":188},[2206],{"type":43,"tag":185,"props":2207,"children":2208},{},[2209],{"type":49,"value":2210},"mutation AlignFiat($id: String!, $newFiatValue: String!, $currency: String) {\n",{"type":43,"tag":185,"props":2212,"children":2213},{"class":187,"line":537},[2214],{"type":43,"tag":185,"props":2215,"children":2216},{},[2217],{"type":49,"value":2218},"  setManualFiatValue(id: $id, newFiatValue: $newFiatValue, currency: $currency) { success }\n",{"type":43,"tag":185,"props":2220,"children":2221},{"class":187,"line":546},[2222],{"type":43,"tag":185,"props":2223,"children":2224},{},[2225],{"type":49,"value":651},{"type":43,"tag":1595,"props":2227,"children":2228},{},[],{"type":49,"value":2230},"Pass the sub-transaction ID as ",{"type":43,"tag":90,"props":2232,"children":2234},{"className":2233},[],[2235],{"type":49,"value":339},{"type":49,"value":2237},", the target value as a string in ",{"type":43,"tag":90,"props":2239,"children":2241},{"className":2240},[],[2242],{"type":49,"value":2243},"newFiatValue",{"type":49,"value":383},{"type":43,"tag":90,"props":2246,"children":2248},{"className":2247},[],[2249],{"type":49,"value":2250},"\"123.45\"",{"type":49,"value":2252},", the\ninvoice\u002Fbill ",{"type":43,"tag":90,"props":2254,"children":2256},{"className":2255},[],[2257],{"type":49,"value":1345},{"type":49,"value":2259},"), and ",{"type":43,"tag":90,"props":2261,"children":2263},{"className":2262},[],[2264],{"type":49,"value":2265},"currency: \"usd\"",{"type":49,"value":2267},". If the response returns an error about a \"locked\nperiod\", the accounting period containing the tx is closed — surface that to the user; don't try to force.",{"type":43,"tag":78,"props":2269,"children":2270},{},[2271,2276,2278,2283,2284,2289,2291,2321,2324,2330,2332,2337],{"type":43,"tag":82,"props":2272,"children":2273},{},[2274],{"type":49,"value":2275},"ERP sync (ask first, every time):",{"type":49,"value":2277}," ",{"type":43,"tag":477,"props":2279,"children":2280},{},[2281],{"type":49,"value":2282},"\"Sync this transaction to {erpName} now? (y\u002Fn)\"",{"type":49,"value":235},{"type":43,"tag":82,"props":2285,"children":2286},{},[2287],{"type":49,"value":2288},"never sync\nwithout an explicit yes at this point",{"type":49,"value":2290},", even if the user's original ask included \"and sync to QBO\". The\nsync call is visible in the ERP and harder to undo than the match itself, so it gets its own gate. If yes:",{"type":43,"tag":175,"props":2292,"children":2294},{"className":177,"code":2293,"language":179,"meta":100,"style":100},"mutation Sync($txIds: [String]!, $entityType: String!) {\n  syncSpecificTransactions(transactionIds: $txIds, entitySourceType: $entityType) { status }\n}\n",[2295],{"type":43,"tag":90,"props":2296,"children":2297},{"__ignoreMap":100},[2298,2306,2314],{"type":43,"tag":185,"props":2299,"children":2300},{"class":187,"line":188},[2301],{"type":43,"tag":185,"props":2302,"children":2303},{},[2304],{"type":49,"value":2305},"mutation Sync($txIds: [String]!, $entityType: String!) {\n",{"type":43,"tag":185,"props":2307,"children":2308},{"class":187,"line":537},[2309],{"type":43,"tag":185,"props":2310,"children":2311},{},[2312],{"type":49,"value":2313},"  syncSpecificTransactions(transactionIds: $txIds, entitySourceType: $entityType) { status }\n",{"type":43,"tag":185,"props":2315,"children":2316},{"class":187,"line":546},[2317],{"type":43,"tag":185,"props":2318,"children":2319},{},[2320],{"type":49,"value":651},{"type":43,"tag":1595,"props":2322,"children":2323},{},[],{"type":43,"tag":90,"props":2325,"children":2327},{"className":2326},[],[2328],{"type":49,"value":2329},"entitySourceType",{"type":49,"value":2331}," mirrors ",{"type":43,"tag":90,"props":2333,"children":2335},{"className":2334},[],[2336],{"type":49,"value":2056},{"type":49,"value":2338}," from the match call.",{"type":43,"tag":52,"props":2340,"children":2341},{},[2342,2344,2349,2351,2355,2357,2362,2363,2368],{"type":49,"value":2343},"When reporting results back to the user, refer to the transaction by its ",{"type":43,"tag":82,"props":2345,"children":2346},{},[2347],{"type":49,"value":2348},"tx hash",{"type":49,"value":2350}," (truncated) and the\ndeposit account by ",{"type":43,"tag":82,"props":2352,"children":2353},{},[2354],{"type":49,"value":1831},{"type":49,"value":2356}," — never by ",{"type":43,"tag":90,"props":2358,"children":2360},{"className":2359},[],[2361],{"type":49,"value":1445},{"type":49,"value":2072},{"type":43,"tag":90,"props":2364,"children":2366},{"className":2365},[],[2367],{"type":49,"value":1634},{"type":49,"value":2369},". Those internal IDs are for debugging,\nnot user output.",{"type":43,"tag":52,"props":2371,"children":2372},{},[2373],{"type":49,"value":2374},"If any mutation errors, surface the error message verbatim and offer to retry. The match is the one that\nactually links the records — if it fails, the rest is moot.",{"type":43,"tag":63,"props":2376,"children":2377},{},[],{"type":43,"tag":67,"props":2379,"children":2381},{"id":2380},"step-7-loop",[2382],{"type":49,"value":2383},"Step 7 — Loop",{"type":43,"tag":52,"props":2385,"children":2386},{},[2387,2388],{"type":49,"value":1959},{"type":43,"tag":477,"props":2389,"children":2390},{},[2391],{"type":49,"value":2392},"\"Match another transaction or invoice\u002Fbill? (y\u002Fn)\"",{"type":43,"tag":283,"props":2394,"children":2395},{},[2396,2401],{"type":43,"tag":78,"props":2397,"children":2398},{},[2399],{"type":49,"value":2400},"yes → restart from Step 2 (skip Step 1 — keep the cached ERP from this session).",{"type":43,"tag":78,"props":2402,"children":2403},{},[2404,2406],{"type":49,"value":2405},"no → wrap up: ",{"type":43,"tag":477,"props":2407,"children":2408},{},[2409],{"type":49,"value":2410},"\"Done. Closed {n} item(s) this session.\"",{"type":43,"tag":63,"props":2412,"children":2413},{},[],{"type":43,"tag":67,"props":2415,"children":2417},{"id":2416},"verified-tres-mcp-operations-used",[2418],{"type":49,"value":2419},"Verified TRES MCP operations used",{"type":43,"tag":1856,"props":2421,"children":2422},{},[2423,2444],{"type":43,"tag":1860,"props":2424,"children":2425},{},[2426],{"type":43,"tag":1864,"props":2427,"children":2428},{},[2429,2434,2439],{"type":43,"tag":1868,"props":2430,"children":2431},{},[2432],{"type":49,"value":2433},"Purpose",{"type":43,"tag":1868,"props":2435,"children":2436},{},[2437],{"type":49,"value":2438},"Operation",{"type":43,"tag":1868,"props":2440,"children":2441},{},[2442],{"type":49,"value":2443},"Type",{"type":43,"tag":1875,"props":2445,"children":2446},{},[2447,2468,2496,2528,2549,2569,2589,2610,2630,2651,2673,2694],{"type":43,"tag":1864,"props":2448,"children":2449},{},[2450,2455,2463],{"type":43,"tag":1882,"props":2451,"children":2452},{},[2453],{"type":49,"value":2454},"Org identity",{"type":43,"tag":1882,"props":2456,"children":2457},{},[2458],{"type":43,"tag":90,"props":2459,"children":2461},{"className":2460},[],[2462],{"type":49,"value":95},{"type":43,"tag":1882,"props":2464,"children":2465},{},[2466],{"type":49,"value":2467},"MCP tool",{"type":43,"tag":1864,"props":2469,"children":2470},{},[2471,2476,2492],{"type":43,"tag":1882,"props":2472,"children":2473},{},[2474],{"type":49,"value":2475},"Schema discovery",{"type":43,"tag":1882,"props":2477,"children":2478},{},[2479,2485,2486],{"type":43,"tag":90,"props":2480,"children":2482},{"className":2481},[],[2483],{"type":49,"value":2484},"introspect",{"type":49,"value":221},{"type":43,"tag":90,"props":2487,"children":2489},{"className":2488},[],[2490],{"type":49,"value":2491},"build_query",{"type":43,"tag":1882,"props":2493,"children":2494},{},[2495],{"type":49,"value":2467},{"type":43,"tag":1864,"props":2497,"children":2498},{},[2499,2504,2523],{"type":43,"tag":1882,"props":2500,"children":2501},{},[2502],{"type":49,"value":2503},"Check ERP connections",{"type":43,"tag":1882,"props":2505,"children":2506},{},[2507,2513,2515,2521],{"type":43,"tag":90,"props":2508,"children":2510},{"className":2509},[],[2511],{"type":49,"value":2512},"integration",{"type":49,"value":2514}," (filter ",{"type":43,"tag":90,"props":2516,"children":2518},{"className":2517},[],[2519],{"type":49,"value":2520},"isErp=true",{"type":49,"value":2522},")",{"type":43,"tag":1882,"props":2524,"children":2525},{},[2526],{"type":49,"value":2527},"query",{"type":43,"tag":1864,"props":2529,"children":2530},{},[2531,2536,2545],{"type":43,"tag":1882,"props":2532,"children":2533},{},[2534],{"type":49,"value":2535},"Fetch tx by hash",{"type":43,"tag":1882,"props":2537,"children":2538},{},[2539],{"type":43,"tag":90,"props":2540,"children":2542},{"className":2541},[],[2543],{"type":49,"value":2544},"transaction(identifier:)",{"type":43,"tag":1882,"props":2546,"children":2547},{},[2548],{"type":49,"value":2527},{"type":43,"tag":1864,"props":2550,"children":2551},{},[2552,2557,2565],{"type":43,"tag":1882,"props":2553,"children":2554},{},[2555],{"type":49,"value":2556},"Fetch invoices (with embedded suggestions)",{"type":43,"tag":1882,"props":2558,"children":2559},{},[2560],{"type":43,"tag":90,"props":2561,"children":2563},{"className":2562},[],[2564],{"type":49,"value":455},{"type":43,"tag":1882,"props":2566,"children":2567},{},[2568],{"type":49,"value":2527},{"type":43,"tag":1864,"props":2570,"children":2571},{},[2572,2577,2585],{"type":43,"tag":1882,"props":2573,"children":2574},{},[2575],{"type":49,"value":2576},"Fetch bills (with embedded suggestions)",{"type":43,"tag":1882,"props":2578,"children":2579},{},[2580],{"type":43,"tag":90,"props":2581,"children":2583},{"className":2582},[],[2584],{"type":49,"value":463},{"type":43,"tag":1882,"props":2586,"children":2587},{},[2588],{"type":49,"value":2527},{"type":43,"tag":1864,"props":2590,"children":2591},{},[2592,2597,2606],{"type":43,"tag":1882,"props":2593,"children":2594},{},[2595],{"type":49,"value":2596},"Pre-computed sub-tx → invoice match suggestions",{"type":43,"tag":1882,"props":2598,"children":2599},{},[2600],{"type":43,"tag":90,"props":2601,"children":2603},{"className":2602},[],[2604],{"type":49,"value":2605},"subTransactionToInvoiceMatchSuggestions",{"type":43,"tag":1882,"props":2607,"children":2608},{},[2609],{"type":49,"value":2527},{"type":43,"tag":1864,"props":2611,"children":2612},{},[2613,2618,2626],{"type":43,"tag":1882,"props":2614,"children":2615},{},[2616],{"type":49,"value":2617},"COA-mapped payment accounts",{"type":43,"tag":1882,"props":2619,"children":2620},{},[2621],{"type":43,"tag":90,"props":2622,"children":2624},{"className":2623},[],[2625],{"type":49,"value":1670},{"type":43,"tag":1882,"props":2627,"children":2628},{},[2629],{"type":49,"value":2527},{"type":43,"tag":1864,"props":2631,"children":2632},{},[2633,2638,2646],{"type":43,"tag":1882,"props":2634,"children":2635},{},[2636],{"type":49,"value":2637},"Match sub-tx ↔ invoice\u002Fbill",{"type":43,"tag":1882,"props":2639,"children":2640},{},[2641],{"type":43,"tag":90,"props":2642,"children":2644},{"className":2643},[],[2645],{"type":49,"value":1698},{"type":43,"tag":1882,"props":2647,"children":2648},{},[2649],{"type":49,"value":2650},"mutation",{"type":43,"tag":1864,"props":2652,"children":2653},{},[2654,2659,2669],{"type":43,"tag":1882,"props":2655,"children":2656},{},[2657],{"type":49,"value":2658},"Align fiat value",{"type":43,"tag":1882,"props":2660,"children":2661},{},[2662,2667],{"type":43,"tag":90,"props":2663,"children":2665},{"className":2664},[],[2666],{"type":49,"value":1801},{"type":49,"value":2668}," (verify args at runtime)",{"type":43,"tag":1882,"props":2670,"children":2671},{},[2672],{"type":49,"value":2650},{"type":43,"tag":1864,"props":2674,"children":2675},{},[2676,2681,2690],{"type":43,"tag":1882,"props":2677,"children":2678},{},[2679],{"type":49,"value":2680},"Sync transactions to the ERP",{"type":43,"tag":1882,"props":2682,"children":2683},{},[2684],{"type":43,"tag":90,"props":2685,"children":2687},{"className":2686},[],[2688],{"type":49,"value":2689},"syncSpecificTransactions",{"type":43,"tag":1882,"props":2691,"children":2692},{},[2693],{"type":49,"value":2650},{"type":43,"tag":1864,"props":2695,"children":2696},{},[2697,2702,2711],{"type":43,"tag":1882,"props":2698,"children":2699},{},[2700],{"type":49,"value":2701},"Undo a match (on user request)",{"type":43,"tag":1882,"props":2703,"children":2704},{},[2705],{"type":43,"tag":90,"props":2706,"children":2708},{"className":2707},[],[2709],{"type":49,"value":2710},"manualUnmatchSubtransactions",{"type":43,"tag":1882,"props":2712,"children":2713},{},[2714],{"type":49,"value":2650},{"type":43,"tag":63,"props":2716,"children":2717},{},[],{"type":43,"tag":67,"props":2719,"children":2721},{"id":2720},"out-of-scope-politely-redirect-if-asked",[2722],{"type":49,"value":2723},"Out of scope (politely redirect if asked)",{"type":43,"tag":283,"props":2725,"children":2726},{},[2727,2732,2752,2765,2777],{"type":43,"tag":78,"props":2728,"children":2729},{},[2730],{"type":49,"value":2731},"Bulk matching (many ↔ many) — not yet supported by this skill.",{"type":43,"tag":78,"props":2733,"children":2734},{},[2735,2737,2743,2744,2750],{"type":49,"value":2736},"Sending payments (",{"type":43,"tag":90,"props":2738,"children":2740},{"className":2739},[],[2741],{"type":49,"value":2742},"sendBillPayment",{"type":49,"value":221},{"type":43,"tag":90,"props":2745,"children":2747},{"className":2746},[],[2748],{"type":49,"value":2749},"sendInvoicePayment",{"type":49,"value":2751},") — separate workflow.",{"type":43,"tag":78,"props":2753,"children":2754},{},[2755,2757,2763],{"type":49,"value":2756},"Connecting or revoking the ERP itself — use the ",{"type":43,"tag":90,"props":2758,"children":2760},{"className":2759},[],[2761],{"type":49,"value":2762},"tres-settings-management",{"type":49,"value":2764}," skill.",{"type":43,"tag":78,"props":2766,"children":2767},{},[2768,2770,2776],{"type":49,"value":2769},"Explaining a transaction in narrative form — use ",{"type":43,"tag":90,"props":2771,"children":2773},{"className":2772},[],[2774],{"type":49,"value":2775},"tres-tx-story",{"type":49,"value":431},{"type":43,"tag":78,"props":2778,"children":2779},{},[2780,2782,2788],{"type":49,"value":2781},"Importing an explorer link into the ledger — use ",{"type":43,"tag":90,"props":2783,"children":2785},{"className":2784},[],[2786],{"type":49,"value":2787},"tres-explorer-tx-to-ledger",{"type":49,"value":431},{"type":43,"tag":2790,"props":2791,"children":2792},"style",{},[2793],{"type":49,"value":2794},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2796,"total":2898},[2797,2816,2835,2849,2861,2873,2885],{"slug":2798,"name":2798,"fn":2799,"description":2800,"org":2801,"tags":2802,"stars":26,"repoUrl":27,"updatedAt":2815},"quickdesign","generate AI media assets","Use the `quickdesign` CLI to generate AI media — UGC promo videos, image edits, product creatives, video upscales — through Seedance, Kling, Sora2, Nano Banana, and GPT Image. Invoke this skill whenever the user asks for a talking-avatar video, multi-segment ad \u002F promo \u002F explainer, image edit (object swap, angle change, state change), product photoshoot, or video upscale via QuickDesign.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2803,2806,2809,2812],{"name":2804,"slug":2805,"type":16},"Creative","creative",{"name":2807,"slug":2808,"type":16},"Image Generation","image-generation",{"name":2810,"slug":2811,"type":16},"Marketing","marketing",{"name":2813,"slug":2814,"type":16},"Video","video","2026-07-01T08:09:32.316182",{"slug":2817,"name":2817,"fn":2818,"description":2819,"org":2820,"tags":2821,"stars":26,"repoUrl":27,"updatedAt":2834},"testdino-audit","audit Playwright test code","Use only when the user explicitly asks for a TestDino audit of Playwright automated test code. Routes through the audit tools the TestDino MCP server exposes (get_audit_report + submit_audit_report, or the legacy test_audit). For generic code review or non-Playwright targets, do a normal review instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2822,2825,2828,2831],{"name":2823,"slug":2824,"type":16},"Audit","audit",{"name":2826,"slug":2827,"type":16},"Code Analysis","code-analysis",{"name":2829,"slug":2830,"type":16},"Playwright","playwright",{"name":2832,"slug":2833,"type":16},"Testing","testing","2026-07-02T07:37:17.341081",{"slug":2836,"name":2836,"fn":2837,"description":2838,"org":2839,"tags":2840,"stars":26,"repoUrl":27,"updatedAt":2848},"testdino-health","manage TestDino connection status","Use when the user wants to check TestDino connection status, validate their PAT, discover available organizations and projects, or find the right projectId. Always call this first when the project context is ambiguous before any other TestDino tool.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2841,2844,2847],{"name":2842,"slug":2843,"type":16},"Monitoring","monitoring",{"name":2845,"slug":2846,"type":16},"QA","qa",{"name":2832,"slug":2833,"type":16},"2026-07-02T07:37:18.566504",{"slug":2850,"name":2850,"fn":2851,"description":2852,"org":2853,"tags":2854,"stars":26,"repoUrl":27,"updatedAt":2860},"testdino-manual-runs","manage manual QA execution runs in TestDino","Use when the user wants to manage a manual execution run or update case-level results inside a run — listing runs, creating runs for a release, inspecting a run, assigning cases, or marking case results (passed\u002Ffailed\u002Fblocked\u002Fskipped\u002Fretest\u002Funtested). Accepts counter-style IDs like RUN-12 and TC-156.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2855,2858,2859],{"name":2856,"slug":2857,"type":16},"Operations","operations",{"name":2845,"slug":2846,"type":16},{"name":2832,"slug":2833,"type":16},"2026-07-02T07:37:23.446065",{"slug":2862,"name":2862,"fn":2863,"description":2864,"org":2865,"tags":2866,"stars":26,"repoUrl":27,"updatedAt":2872},"testdino-manual-tests","manage manual QA test cases in TestDino","Use when the user wants to create, update, or browse manual QA test cases and suites in TestDino — not execution runs. Covers list_manual_test_suites, list_manual_test_cases, get_manual_test_case, create_manual_test_case, update_manual_test_case, create_manual_test_suite.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2867,2870,2871],{"name":2868,"slug":2869,"type":16},"Documentation","documentation",{"name":2845,"slug":2846,"type":16},{"name":2832,"slug":2833,"type":16},"2026-07-02T07:37:22.247052",{"slug":2874,"name":2874,"fn":2875,"description":2876,"org":2877,"tags":2878,"stars":26,"repoUrl":27,"updatedAt":2884},"testdino-releases","manage TestDino releases and milestones","Use when the user wants to browse, inspect, create, or update releases\u002Fmilestones in a TestDino project. Covers list_releases, get_release, create_release, and update_release. Accepts counter-style IDs like MS-12.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2879,2882,2883],{"name":2880,"slug":2881,"type":16},"Project Management","project-management",{"name":2845,"slug":2846,"type":16},{"name":2832,"slug":2833,"type":16},"2026-07-02T07:37:19.793846",{"slug":2886,"name":2886,"fn":2887,"description":2888,"org":2889,"tags":2890,"stars":26,"repoUrl":27,"updatedAt":2897},"testdino-runs","inspect automated test runs","Use when the user wants to inspect automated test runs, list failed or flaky tests, debug a failing testcase with historical context, or filter runs by branch, commit, author, environment, browser, status, or tags. Includes list_testruns, get_run_details, list_testcase, get_testcase_details, and debug_testcase.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2891,2894,2895,2896],{"name":2892,"slug":2893,"type":16},"Debugging","debugging",{"name":2829,"slug":2830,"type":16},{"name":2845,"slug":2846,"type":16},{"name":2832,"slug":2833,"type":16},"2026-07-02T07:37:16.07175",30,{"items":2900,"total":3083},[2901,2920,2934,2946,2965,2976,2997,3017,3031,3046,3054,3067],{"slug":2902,"name":2902,"fn":2903,"description":2904,"org":2905,"tags":2906,"stars":2917,"repoUrl":2918,"updatedAt":2919},"algorithmic-art","create algorithmic art with p5.js","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2907,2908,2911,2914],{"name":2804,"slug":2805,"type":16},{"name":2909,"slug":2910,"type":16},"Design","design",{"name":2912,"slug":2913,"type":16},"Generative Art","generative-art",{"name":2915,"slug":2916,"type":16},"JavaScript","javascript",161831,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fskills","2026-04-06T17:56:15.455818",{"slug":2921,"name":2921,"fn":2922,"description":2923,"org":2924,"tags":2925,"stars":2917,"repoUrl":2918,"updatedAt":2933},"brand-guidelines","apply Anthropic brand colors and typography","Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2926,2929,2930],{"name":2927,"slug":2928,"type":16},"Branding","branding",{"name":2909,"slug":2910,"type":16},{"name":2931,"slug":2932,"type":16},"Typography","typography","2026-04-06T17:56:05.042852",{"slug":2935,"name":2935,"fn":2936,"description":2937,"org":2938,"tags":2939,"stars":2917,"repoUrl":2918,"updatedAt":2945},"canvas-design","create posters and visual art as PNG or PDF","Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2940,2941,2942],{"name":2804,"slug":2805,"type":16},{"name":2909,"slug":2910,"type":16},{"name":2943,"slug":2944,"type":16},"PDF","pdf","2026-04-06T17:56:03.794732",{"slug":2947,"name":2947,"fn":2948,"description":2949,"org":2950,"tags":2951,"stars":2917,"repoUrl":2918,"updatedAt":2964},"claude-api","build apps with the Claude API","Reference for the Claude API \u002F Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration.\nTRIGGER — read BEFORE opening the target file; don't skip because it \"looks like a one-liner\" — whenever: the prompt names Claude\u002FAnthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing\u002Fmodel choice\u002Flimits\u002Fcaching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent\u002FMCP\u002Ftool-definition\u002Fmulti-agent\u002FRAG\u002FLLM-judge\u002Fcomputer-use; generate\u002Fsummarize\u002Fextract\u002Fclassify\u002Frewrite\u002Fconverse over NL; debugging refusals\u002Fcutoffs\u002Fstreaming\u002Ftool-calls\u002Ftokens).\nSKIP only when another provider is being worked on (overrides all triggers): OpenAI\u002FGPT\u002FGemini\u002FLlama\u002FMistral\u002FCohere\u002FOllama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2952,2955,2956,2959,2961],{"name":2953,"slug":2954,"type":16},"Agents","agents",{"name":9,"slug":8,"type":16},{"name":2957,"slug":2958,"type":16},"Anthropic SDK","anthropic-sdk",{"name":2960,"slug":2947,"type":16},"Claude API",{"name":2962,"slug":2963,"type":16},"LLM","llm","2026-07-28T05:36:08.213335",{"slug":2966,"name":2966,"fn":2967,"description":2968,"org":2969,"tags":2970,"stars":2917,"repoUrl":2918,"updatedAt":2975},"doc-coauthoring","co-author documentation and technical specs","Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2971,2972],{"name":2868,"slug":2869,"type":16},{"name":2973,"slug":2974,"type":16},"Technical Writing","technical-writing","2026-04-06T17:56:14.18897",{"slug":2977,"name":2977,"fn":2978,"description":2979,"org":2980,"tags":2981,"stars":2917,"repoUrl":2918,"updatedAt":2996},"docx","create and edit Word documents","Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2982,2985,2987,2990,2993],{"name":2983,"slug":2984,"type":16},"Documents","documents",{"name":2986,"slug":2977,"type":16},"DOCX",{"name":2988,"slug":2989,"type":16},"Office","office",{"name":2991,"slug":2992,"type":16},"Templates","templates",{"name":2994,"slug":2995,"type":16},"Word","word","2026-07-18T05:16:23.136271",{"slug":2998,"name":2998,"fn":2999,"description":3000,"org":3001,"tags":3002,"stars":2917,"repoUrl":2918,"updatedAt":3016},"frontend-design","design production-grade frontend interfaces","Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3003,3004,3007,3010,3013],{"name":2909,"slug":2910,"type":16},{"name":3005,"slug":3006,"type":16},"Frontend","frontend",{"name":3008,"slug":3009,"type":16},"React","react",{"name":3011,"slug":3012,"type":16},"Tailwind CSS","tailwind-css",{"name":3014,"slug":3015,"type":16},"UI Components","ui-components","2026-04-06T17:56:16.723469",{"slug":3018,"name":3018,"fn":3019,"description":3020,"org":3021,"tags":3022,"stars":2917,"repoUrl":2918,"updatedAt":3030},"internal-comms","write internal company communications","A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3023,3026,3027],{"name":3024,"slug":3025,"type":16},"Communications","communications",{"name":2991,"slug":2992,"type":16},{"name":3028,"slug":3029,"type":16},"Writing","writing","2026-04-06T17:56:20.695522",{"slug":3032,"name":3032,"fn":3033,"description":3034,"org":3035,"tags":3036,"stars":2917,"repoUrl":2918,"updatedAt":3045},"mcp-builder","build MCP servers","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node\u002FTypeScript (MCP SDK).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3037,3038,3041,3042],{"name":2953,"slug":2954,"type":16},{"name":3039,"slug":3040,"type":16},"API Development","api-development",{"name":2962,"slug":2963,"type":16},{"name":3043,"slug":3044,"type":16},"MCP","mcp","2026-04-06T17:56:10.357665",{"slug":2944,"name":2944,"fn":3047,"description":3048,"org":3049,"tags":3050,"stars":2917,"repoUrl":2918,"updatedAt":3053},"read edit and manipulate PDF files","Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text\u002Ftables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting\u002Fdecrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3051,3052],{"name":2983,"slug":2984,"type":16},{"name":2943,"slug":2944,"type":16},"2026-04-06T17:56:02.483316",{"slug":3055,"name":3055,"fn":3056,"description":3057,"org":3058,"tags":3059,"stars":2917,"repoUrl":2918,"updatedAt":3066},"pptx","create and edit PowerPoint presentations","Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3060,3063],{"name":3061,"slug":3062,"type":16},"PowerPoint","powerpoint",{"name":3064,"slug":3065,"type":16},"Presentations","presentations","2026-07-18T05:16:24.1471",{"slug":3068,"name":3068,"fn":3069,"description":3070,"org":3071,"tags":3072,"stars":2917,"repoUrl":2918,"updatedAt":3082},"skill-creator","create and optimize agent skills","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3073,3074,3075,3078,3081],{"name":2953,"slug":2954,"type":16},{"name":2868,"slug":2869,"type":16},{"name":3076,"slug":3077,"type":16},"Evals","evals",{"name":3079,"slug":3080,"type":16},"Performance","performance",{"name":2973,"slug":2974,"type":16},"2026-04-19T06:45:40.804",490]