# Chase Invoices More Than 30 Days Overdue by Phone and Log What Each Customer Said

Each week an agent finds QuickBooks invoices over 30 days overdue, calls each customer through LumisReach, and logs their promised payment date or reason.

[Run this on Rush](https://cloud.getrush.ai/run/chase-unpaid-invoices/lumisreach/). Opens the console with this prompt ready to send. Connect LumisReach there first.

## What the agent does

This is for a small business that invoices other businesses and has more overdue balances than anyone has time to phone: a wholesaler, a contractor, an agency, a print shop. Reminder emails past 30 days stop working, and the call that does work is the one nobody gets to. Once a week the agent reads the overdue invoices from QuickBooks Online, calls each customer's accounts contact through [LumisReach](https://lumisreach.com), and writes down what they said. The run has no repository and names two connections: QuickBooks and LumisReach.

It sends `SELECT * FROM Invoice WHERE Balance > '0'` to the QuickBooks Accounting API's query endpoint, paging until it has every open invoice, and keeps those whose `DueDate` is more than 30 days before today. It groups them by `CustomerRef`, so a customer with three late invoices gets one call about all three, and reads each customer record for `PrimaryPhone` and `Notes`. A customer is called only when the notes carry the line 'Payment calls: yes', which your team adds for accounts contacts who agreed to be called about billing; every other customer is listed with the reason they were skipped.

For each customer it starts one call with `start_ai_phone_call`: the number in `to_numbers`, a `goal` to learn when the overdue balance will be paid, `instructions` that list each invoice's number, date, due date and balance, and an `opening_message` that says it is the business's AI assistant calling about overdue invoices. The instructions forbid taking card details on the phone, threatening anything, or agreeing a discount; the agent offers to have the invoices emailed again and passes anything else to a person. It sets `retry_attempts` to 1, `max_call_duration_seconds` to 300, and a voicemail asking for a call back to accounts.

It polls `get_quick_action_status` until each call has finished, reads the transcript of every answered call with `get_call`, and writes one row per customer to `calls.csv`: the outcome, the date they promised to pay, any dispute or reason they gave in their own words, and whether they asked for the invoices again. It writes nothing back to QuickBooks: no notes, no payments, no changes to an invoice.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Chase invoices more than 30 days overdue by phone. Business: {business}, accounts number {accounts_number}, time zone {time_zone}.\n\n1. With the QuickBooks connection, query SELECT * FROM Invoice WHERE Balance > '0', paging until done. Keep invoices whose DueDate is more than 30 days before today. Group them by CustomerRef.\n2. For each customer, read the Customer record: DisplayName, PrimaryPhone and Notes. Call only customers whose Notes contain the line 'Payment calls: yes' and who have a PrimaryPhone. List every other customer as skipped with the reason.\n3. For each customer to call, start one LumisReach job with start_ai_phone_call: to_numbers [PrimaryPhone], goal 'Find out when the overdue balance of {total} on the invoices listed will be paid, and note any reason or dispute', instructions 'You are the AI assistant for {business}, calling the accounts contact at {customer}. The overdue invoices are: {invoice list with DocNumber, TxnDate, DueDate and Balance}. Be polite and brief. Ask when payment will be made. Offer to email the invoices again. Never take card or bank details, never threaten, never agree a discount or a payment plan; say someone from accounts will call back about anything else. If they ask not to be called, apologise and end the call.', opening_message 'Hello, this is the AI assistant for {business}, calling about some overdue invoices. Am I speaking with accounts at {customer}?', retry_attempts 1, max_call_duration_seconds 300, voicemail_enabled true, voicemail_message 'This is the AI assistant for {business} about overdue invoices on your account. Please call accounts at {accounts_number}.'\n4. Poll get_quick_action_status for each job until its target is no longer pending or in_progress. For answered calls, read the call record, with its transcript, using get_call on last_call_id.\n5. Write calls.csv with one row per customer: customer, invoices (DocNumbers), total overdue, oldest days overdue, outcome (promised, disputed, asked for invoices, voicemail, no answer, failed, opted out, skipped), promised_date, what_they_said (their own words, at most 40 words), next_step. Read only in QuickBooks: change, note and record nothing there. Call no number that is not a customer's PrimaryPhone.",
  "connections": [
    "quickbooks",
    "lumisreach"
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is `calls.csv`, an artifact on the session, ready to sort by promised date or paste into the receivables sheet, and the run's closing message as the session's `result`, which totals the overdue amount by outcome: how much was promised for a date, how much is disputed, and how much is still waiting on a call back. The `what_they_said` column quotes the customer, so a promise reads as their words and not the agent's summary of them.

The session's transcript at `GET /o/{org}/sessions/{id}/messages` keeps every QuickBooks query with what it returned, each call request with the invoice list it read out, and every call record. When a customer later says they were never told about an invoice, or were told the wrong amount, the run shows what the call said and which invoice the number came from.

What a person does next: records each promised date where your team tracks it, sends the invoices to the customers who asked for them again, and calls back every disputed account. Check a promise against payments that arrived after the run read QuickBooks, so nobody chases a customer who paid that afternoon.

## Run it on every Tuesday morning

In the console, a Project automation with a `schedule` trigger runs this prompt once a week, a cron such as `0 10 * * 2` with `timezone` set to yours, which reaches accounts teams during office hours after Monday's post. Each run reads QuickBooks fresh, so an invoice paid since last week drops off the list before anyone is called about it.

An accounting firm that chases receivables for several clients can start the runs from its own practice system instead: one `POST /o/{org}/sessions` per client company each week, each naming that client's QuickBooks connection by its id, with a `request_id` that is a UUID v5 of the client and the week so a retried job places no second round of calls.

## Why run it on Rush?

Collections calls are slow and awkward, so they slip, and the balance that slips past 60 days is the one that never comes in. One run here does the reading, the calling and the note-taking for every overdue customer at once, and the person who picks up the list in the morning starts from what each customer said rather than from a blank call sheet.

The record is the point. Every figure read out on a call traces to a QuickBooks query in the run, and every promise to a transcript, so a disputed call can be settled from what was said. The run reaches only the two connections it names and reads the books without changing them.

LumisReach bills the calls to your own LumisReach account: $0.20 for each call placed, each retry counting as a new call, plus $0.20 a minute billed by the second ([its docs](https://docs.lumisreach.com/api-reference/mcp)). A two-minute answered call costs $0.60, and a customer who never answers costs $0.40 with one retry. Rush bills the run's compute and model usage from your credits, and the session's `total_cost_usd` reads that back.

## Frequently asked questions

### Can I call customers about money with an AI voice?

Only with their consent, which is why the prompt calls only customers whose QuickBooks notes say 'Payment calls: yes'. Under the TCPA, and since February 2024 the FCC treats AI-generated voices as artificial voices, a call like this needs prior consent; debt collection rules such as the FDCPA can apply too, especially when someone other than the business collects. LumisReach's site says every number is checked against federal, state and internal Do Not Call lists before dialing ([lumisreach.com](https://lumisreach.com)); its API docs do not repeat it, so the consent check here does not lean on it. This is not legal advice; check your own case with counsel.

### Will it take a payment on the phone?

No. The instructions forbid taking card or bank details and agreeing a discount or a plan. It asks when the customer will pay, offers to email the invoices again, and passes anything else to your accounts team, which keeps payment details out of a call transcript.

### Does it update QuickBooks with what the customer said?

No, the run is read only in QuickBooks, so a misheard date never lands in your books. The log comes back as `calls.csv`. If you want promised dates in QuickBooks, have a person enter them, or change the prompt to write a note once you trust the log.

### How do I connect QuickBooks and LumisReach?

Connect QuickBooks in Rush under Settings → Connections, signing in through Intuit and picking the company. For LumisReach, make an API key under Settings > Developer API in LumisReach (`app.lumisreach.com/settings/api`), with a card under Settings > Billing, and paste it under Settings → Connections → LumisReach, or send `POST /me/connections` with `{"type": "mcp", "name": "LumisReach", "url": "https://mcp.lumisreach.com/mcp", "auth": {"mode": "bearer", "token": "lumisreach_…"}}`.

## More LumisReach jobs

- [Confirm Tomorrow's Appointments by Phone Every Evening](https://getrush.ai/run/confirm-appointments/lumisreach/)
- [Call Every New Inbound Lead Within Minutes and Post the Outcome to Slack](https://getrush.ai/run/call-new-leads/lumisreach/)

## More jobs like this: Produce a report or file, no repo

- [Which Ports and Terminals Changed Their Hours or Closed Today? A Freight Forwarder's Morning Advisory Check](https://getrush.ai/run/check-port-and-terminal-advisories/web/)
- [Find Why Customers Churned in Stripe](https://getrush.ai/run/churn-analysis/stripe/)
- [What Did Customers Ask Us to Build This Week? A SaaS Customer-Success Team's Friday Digest From Shared Slack Channels](https://getrush.ai/run/collect-feature-requests-from-customer-channels/slack/)
- [Which Leads Came In Through Each Client's Website This Week? A Web Design Agency's Netlify Forms Digest](https://getrush.ai/run/collect-weekly-website-leads-by-client/netlify/)

## Keep reading

- [Connect LumisReach to Rush once, then name it on any run](https://getrush.ai/integrations/lumisreach/)
- [Start your first run from the developer API quickstart](https://getrush.ai/docs/quickstart/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
