DEV Community

Ujjwal Dubey
Ujjwal Dubey

Posted on

Polite Overdue-Invoice Reminders With a Human Gate: An Accounting-Software-Neutral Workflow

Disclosure: I run NxFlowAI, an automation agency serving Australian businesses remotely from Mumbai. The pattern works with any accounting software that has an API.

Chasing overdue invoices comes up again and again when small businesses list the jobs they would most like to automate. It is repetitive and awkward, which makes it a good automation candidate, as long as a person stays in charge of anything sensitive. Here is the workflow I build as an AI automation agency for Australian small-business finance tasks.

1. Pull overdue invoices daily

def daily_overdue():
    for inv in accounting.invoices(status="unpaid", due_before=today()):
        if inv.amount_due <= 0 or inv.contact.do_not_chase:
            continue
        yield inv
Enter fullscreen mode Exit fullscreen mode

Keep a do_not_chase flag per contact for customers on payment plans, in dispute or handled personally.

2. Decide the step from a schedule, not a model

reminder_schedule:
  - days_overdue: 3    # friendly nudge, automatic
    template: gentle
    auto_send: true
  - days_overdue: 10   # firmer, needs approval
    template: firm
    auto_send: false
  - days_overdue: 21   # stop automation, owner calls
    action: create_task_for_owner
Enter fullscreen mode Exit fullscreen mode

Only the first, gentle reminder goes out on its own. Everything firmer waits for a person.

3. Let AI read replies, not write threats

When a customer replies ("paid yesterday", "can I pay half now?", "the job isn't finished"), an AI step classifies the reply and pauses the schedule:

REPLY_TYPES = ["says_paid", "asks_for_plan", "disputes_work", "question", "other"]

def on_reply(inv, text):
    kind = llm.classify(text, REPLY_TYPES)
    pause_reminders(inv)
    create_task(owner_for(inv), kind=kind, text=text)   # a person responds
Enter fullscreen mode Exit fullscreen mode

Any reply pauses reminders. Disputes go straight to the owner.

4. Log everything

Store invoice id, step, template, who approved, when sent, and any reply. If a customer asks "why did I get this?", you can answer.

5. Test the awkward cases

  • Partial payment recorded after the reminder was queued.
  • Two invoices for the same customer, one disputed.
  • Credit note issued but not yet applied.
  • Customer on a payment plan.

We design workflows like this after a 72-hour audit. For the owner-level view of that audit, see the workflow audit guide on our blog.

Top comments (0)