- Home
- Skills
- Finance & Accounting
- Balanced Journal Entries for Ledger Sync (QuickBooks)
Balanced Journal Entries for Ledger Sync (QuickBooks)
The accountant works from the ledger, so what they need from your billing system is the ledger movement, not every customer record copied into a second system.
$29
Works with the AI Agents you already use
Balanced Journal Entries for Ledger Sync (QuickBooks)
Example session with this skill installed
Generate a journal entry for a revenue run totaling 50000 cents, with 45000 cents in 'water_revenue' and 5000 cents in 'tax_payable' using mapping.json.
- Read your context and instructions
- Compiled the balanced journal entries
Processed revenue run for period. Verified totals against mapping rules. Generated QuickBooks-ready payload with deterministic DocNumber and idempotency key.
Journal Entry Result
| Field | Value |
|---|---|
| Status | Balanced |
| Total (USD) | $500.00 |
| DocNumber | REV-20231027-8A3B |
| IdempotencyKey | run_592_post_20231027 |
| Memo | Revenue Run: water_revenue, tax_payable |
{
"docNumber": "REV-20231027-8A3B",
"date": "2023-10-27",
"memo": "Revenue Run: water_revenue, tax_payable",
"quickBooks": {
"Line": [
{
"Description": "Total Receivables",
"Amount": 500.00,
"DetailType": "JournalEntryLineDetail",
"JournalEntryLineDetail": {
"PostingType": "Debit",
"AccountRef": { "value": "1200" }
}
},
{
"Description": "water_revenue",
"Amount": 450.00,
"DetailType": "JournalEntryLineDetail",
"JournalEntryLineDetail": {
"PostingType": "Credit",
"AccountRef": { "value": "4000" }
}
},
{
"Description": "tax_payable",
"Amount": 50.00,
"DetailType": "JournalEntryLineDetail",
"JournalEntryLineDetail": {
"PostingType": "Credit",
"AccountRef": { "value": "2100" }
}
}
]
}
}
Next steps
- Store the
idempotencyKeyin your database with astatus: sendingflag. - POST the
quickBooksobject to the/journalentryendpoint. - Update your record to
status: postedupon success or 409 Conflict.
Connects securely to your tools. The creator never sees your data.
About this skill
The accountant works from the ledger, so what they need from your billing system is the ledger movement, not every customer record copied into a second system. Two things then have to be exactly right: the entry must balance in whole cents before it is sent, and nothing may post twice, because a retried timeout that creates a second entry is a duplicated month of revenue found in an audit rather than a log.
Mapping (createLedgerMapping): declare purposes (receivables, cash, one revenue purpose per category, an optional fallback, tax payable) and take the account ids the customer chose in a settings screen; missingRequired drives the screen. Nothing guesses an account: a recognised category without a mapped account refuses with ACCOUNT_NOT_MAPPED and the purpose, instead of posting to "other" balanced and accepted with no warning.
Revenue run (buildRevenueEntry): one credit per category with the period in the description, tax as its own credit only when billed, and a debit to receivables equal to the sum of the credits, compared with the run's stored total; a disagreement is refused with both numbers (TOTALS_DISAGREE), never reconciled.
Payments (buildPaymentsEntry): one entry per day, cash debited and receivables credited, the method breakdown checked against the total.
finalise: the only exit of every builder; refuses unbalanced, empty, zero-amount, unaccounted, undated or oddly numbered entries; converts cents to dollars exactly once; returns the neutral lines, a deterministic docNumber and idempotencyKey, and the QuickBooks Online JournalEntry body.
CLI (journal-cli.mjs) and 8 tests (split by category, tax present and absent, totals disagreement, unmapped and unknown categories with and without a fallback, payments with breakdown checks, odd cents and large amounts, every finalise refusal, the CLI). reference/posting-rules.md covers the two invariants, the idempotency record and mapping other ledgers. Node 18+, no packages, no network. Engineering guidance, not accounting advice.
Supports revenue runs and daily payments only. Excludes refunds and write-offs. Requires Node 18. Developer must implement the network transport layer.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
Requires