RJ DowellPERSONAL PORTFOLIO
← All projects

PROFESSIONAL WORK · Finance & review

Invoice automation

Creates accounting invoices from approved timesheets and contract terms, and blocks duplicates when the same event arrives twice.

BuiltProductionDocumented October 15, 2026

150invoices created · Jun 13–Oct 6, 2026
185duplicate triggers blocked · as of Oct 6, 2026

My contribution

Designed, built, tested, and operated the invoicing workflow, working with finance on exceptions and corrections.

Tools
Python · Webhooks · QuickBooks Online · PostgreSQL

How it works

Invoice automation workflow
  1. InputApproved timesheetWebhook event from the timesheet system
  2. StepLoad agreement termsRates, holiday dates, overtime rules
  3. StepCalculate line itemsRegular, overtime, holiday, on-call, callback, orientation

    Unknown holiday allowance → regular/overtime pricing, flagged for review

  4. CheckDuplicate checkSource-specific identity for each timesheet

    Replayed event → blocked

  5. OutputCreate the invoiceQuickBooks Online
  6. PersonFinance reviewEach outcome is recorded for exceptions and corrections

Decisions that mattered

Duplicates need business identity

Repeated webhook delivery is expected. Source-specific identity checks prevent a replay from creating another invoice; matching a customer and amount alone can incorrectly block two legitimate invoices.

Agreement terms beat calendar assumptions

Holiday treatment follows the client agreement’s allowed dates. An unknown allowance falls back to regular/overtime pricing and marks the draft for review.

Zero can mean missing context

A zero daily overtime threshold needed a scheduled-shift rule, rather than classifying every hour as overtime. This edge case became an explicit calculation path.

Separate creating from observing

Payment-status checks run on their own read-only path (below), so refreshing a status can never change invoice math or trigger an accounting write.

Results

Between June 13 and October 6, 2026, the workflow created 150 invoices in production (144 active, six cleared) and blocked 185 duplicate triggers across 133 timesheets.

Scope & limits

Financial amounts and customer records are left out. Corrections to agreement rules after launch are part of the production history.

Related projects

Next projectCRM note structuring