Agreement reconciliation

From wyre-technology/msp-claude-plugins · View interactive version

Agreement reconciliation is an AI agent skill from the GitHub repository wyre-technology/msp-claude-plugins. Reconciling PSA contract/agreement entitlements (seats, hours, recurring services) against invoiced reality in an accounting platform, across any combination of PSA (Autotask, HaloPSA, ConnectWise, Syncro) and accounting platform (QuickBooks Online, Xero). Covers building the entitlement ledger, the

How to use this skill

Skill file

Agreement Reconciliation

Overview

MSP revenue is only as reliable as the agreement it is billed against. A contract

signed for 25 managed seats drifts silently when 5 new hires never get added to

the invoice line, or when a client offboards a location and the recurring service

never gets removed. This skill teaches Claude how to pull the entitlement

(what the PSA contract/agreement says the client should be paying for) and the

invoiced reality (what the accounting platform actually billed), and surface

every place they disagree.

The reconciliation answers one question: **"Does every active PSA agreement have

a matching, correctly-quantified line item on the client's accounting invoices —

and does every invoiced recurring line item still have a live agreement behind

it?"**

How this differs from `shared/skills/billing-reconciliation`

The repo already ships CODE0,

which is narrower and vendor-specific: it reconciles **Pax8 marketplace

subscriptions against Xero/QuickBooks invoices** — a two-system,

distribution-to-accounting comparison. This skill covers a different pair:

PSA contract/agreement entitlements against accounting invoices, and it is

written to be PSA-agnostic (Autotask, HaloPSA, ConnectWise, or Syncro — whichever

is actually connected) rather than assuming a single accounting platform.

The two skills are complementary, not competing, and a full month-end close often

runs both:

| | shared/skills/billing-reconciliation | agreement-reconciliation (this skill) |

|---|---|---|

| Entitlement source | Pax8 active subscriptions | PSA contract/agreement (seats, hours, recurring services) |

| Comparison target | Xero / QuickBooks invoice lines | Xero / QuickBooks invoice lines |

| PSA involved? | No | Yes — required |

| Distributor involved? | Yes — required (Pax8) | No (see license-true-up for Pax8/Sherweb seat matching) |

| Typical gap found | Unbilled marketplace seat | Under-billed contract, over-billed contract, lapsed agreement still invoiced |

Reuse its matching strategy (fuzzy product/company name matching, amount

tolerance bands, severity tiers) rather than re-deriving one — the logic

transfers directly from "subscription line vs invoice line" to "contract term vs

invoice line."

Anti-triggers

bundle associations, block hours, and renewals are the PSA's surface; use

autotask-contracts or halopsa-contracts.

the accounting connector's surface; use xero-invoices or

qbo-invoices.

use Renewal and Price-Increase Prep,

which composes this skill with Margin Analysis.

Connected Systems

| System | Role | Required? |

|--------|------|-----------|

| PSA — Autotask / HaloPSA / ConnectWise / Syncro | Source of contract/agreement entitlements (seats, hours, recurring service lines, status, term dates) | Yes (at least one) |

| Accounting — QuickBooks Online / Xero | Source of invoiced reality (line items, quantities, amounts, invoice status) | Yes (at least one) |

Reconciliation Workflow

Step 1: Discover what's actually connected

Call conduit__search_tools first — do not assume Autotask, HaloPSA,

ConnectWise, Syncro, QuickBooks Online, or Xero are connected just because they

appear in examples below. Search for terms like "contract", "agreement",

"invoice" to see which vendor-prefixed tools come back for this org, then

proceed only with what's live. If exactly one PSA and one accounting platform

are connected, the rest of this workflow is unambiguous. If multiple of either

are connected (e.g. a client base split across two PSAs post-acquisition), run

the reconciliation once per PSA and merge the reports.

Step 2: Pull active PSA agreements/contracts

For each connected PSA, pull active contracts/agreements per client. Resolve

status and type IDs via each PSA's own list/lookup tools rather than hardcoding

IDs — they are tenant-specific.

autotask__search_contract_services (or the contract's service line detail)

for the billed units per service (seats, block hours, recurring flat fee).

contract detail, or a dedicated contract-listing tool if the org exposes one.

agreement additions (the line-item-equivalent of seats/services on a CW

agreement).

Key fields to extract per agreement:

Build an entitlement ledger, one row per contract line:

PSA Agreement Ledger
────────────────────────────────────────────────────────────
Client          Contract              Line Item        Qty  Unit Price  Monthly
Acme Corp       Managed Services MSA  Managed Seat      42     $145.00   $6,090.00
Acme Corp       Managed Services MSA  After-Hours SLA    1     $250.00     $250.00
Beta LLC        Block Hours Q1        Prepaid Hours     20      $95.00   (prepaid, not recurring)
Gamma Inc       Legacy MSA (expired)  Managed Seat      18     $120.00   $2,160.00 [EXPIRED 2026-04-30]
────────────────────────────────────────────────────────────

Flag any contract whose term end date is in the past but status still shows

active in the PSA — that is itself a data-hygiene finding worth reporting

separately (the contract should have been renewed or closed).

Step 3: Pull invoiced line items from accounting

For the same billing period, pull sales invoices from whichever accounting

platform(s) are connected.

filtered to the billing period and, where possible, the specific customer.

filtered by contact where possible.

Key fields: customer/contact name, line description, quantity, unit price,

line amount, invoice status (draft/authorised/paid), invoice date.

Step 4: Match agreement lines to invoice lines

Use the same matching priority as shared/skills/billing-reconciliation:

  1. Client/company name match (PSA client to accounting contact/customer) —

exact, then contains, then DBA/trading-name fallback, then ask the user.

  1. Line-description fuzzy match (contract service name to invoice line

description) — MSPs abbreviate ("Managed Seat" vs "MSP Managed Service —

per user").

  1. Quantity comparison.
  2. Amount comparison within a tolerance band (default ±5%; rounding and partial

billing periods are common and not automatically a gap).

Step 5: Classify gaps

quantity (e.g. contract says 42 seats, invoice reflects 37). Dollar impact =

(contracted qty − invoiced qty) × unit price.

a client-facing risk (overcharge, potential refund obligation), not just an

MSP-favorable discrepancy — treat it with the same urgency as under-billing.

expired/cancelled/terminated in the PSA, but a recurring invoice line for it

is still appearing on current invoices. This is billing a client for a

contract that no longer exists.

PSA with no corresponding invoice line at all in the period. Distinct from a

quantity mismatch — this is total non-billing.

differs from the contracted rate (rate never updated after a contract

amendment, or a manual invoice override).

Step 6: Report

Group findings by severity, always leading with dollar impact so the reader can

triage by size, not just category. See Report Format below.

Report Format

═══════════════════════════════════════════════════════════════════
AGREEMENT RECONCILIATION REPORT
Period: [Month Year]
PSA: [Autotask / HaloPSA / ConnectWise / Syncro — whichever connected]
Accounting: [QuickBooks Online / Xero — whichever connected]
Generated: [Date]
═══════════════════════════════════════════════════════════════════

SUMMARY
  Clients Checked:          [N]
  Contract Lines Reviewed:  [N]
  Matched Clean:            [N]
  Gaps Found:               [N]
    CRITICAL: [N]  (est. $[X]/month impact)
    HIGH:     [N]  (est. $[X]/month impact)
    MEDIUM:   [N]

───────────────────────────────────────────────────────────────────
CRITICAL — Lapsed Agreements Still Invoiced
───────────────────────────────────────────────────────────────────
  [Client] — [Contract name], expired [date], still billing $[X]/month
    Action: Confirm with account manager — either renew the agreement or
    remove the recurring line.

───────────────────────────────────────────────────────────────────
CRITICAL — Active Agreements With No Invoice
───────────────────────────────────────────────────────────────────
  [Client] — [Contract line], [qty] contracted, $0 invoiced
    Action: Add missing invoice line; investigate why it was never billed.

───────────────────────────────────────────────────────────────────
HIGH — Under-Billing (Quantity Mismatch)
───────────────────────────────────────────────────────────────────
  [Client] — [Line], contracted [X], invoiced [Y], $[Z]/month underbilled

───────────────────────────────────────────────────────────────────
HIGH — Over-Billing (Client Risk)
───────────────────────────────────────────────────────────────────
  [Client] — [Line], contracted [X], invoiced [Y], $[Z]/month overbilled
    Action: Verify with account manager before next invoice — possible refund
    obligation.

───────────────────────────────────────────────────────────────────
MEDIUM — Price Drift
───────────────────────────────────────────────────────────────────
  [Client] — [Line], contracted rate $[X], invoiced rate $[Y]

───────────────────────────────────────────────────────────────────
MATCHED — No Issues
───────────────────────────────────────────────────────────────────
  [N] contract lines confirmed matching invoiced amounts within tolerance.
═══════════════════════════════════════════════════════════════════

Graceful Degradation

| Missing / Unavailable | Handling |

|---|---|

| No PSA connected | Cannot run — no entitlement source. State this explicitly; do not substitute invoice-only guessing. |

| No accounting platform connected | Report the PSA agreement ledger as a standalone entitlement list; note reconciliation could not be performed. |

| Multiple PSAs connected | Run the workflow once per PSA, merge into one report, and label each finding with its source PSA. |

| Client exists in PSA but not in accounting | Flag as CRITICAL — likely an entirely unbilled client, same severity class as "active agreement, no invoice." |

| Contract line has no clear per-unit price (fully bundled flat fee) | Compare total line amount instead of per-unit; note the comparison basis in the report. |

| PSA contract data incomplete (e.g. missing term end date) | Note as a data-hygiene flag alongside billing findings — don't silently skip the line. |

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.