Inspiration
Following up on overdue invoices is repetitive but operationally important. Small finance and accounts-receivable teams often spend time repeatedly calling customers, recording what happened, deciding when to follow up again, and remembering which cases require human attention.
A phone call alone does not solve that problem. The real challenge is what happens after the call.
DueCall turns invoice follow-up into a complete workflow where CALL-E handles the conversation and the application turns the result into a safe next action.
What it does
DueCall is an autonomous accounts-receivable follow-up application powered by CALL-E.
An overdue invoice can trigger a CALL-E Goal Run that calls the customer and returns a structured result such as:
- promised to pay
- payment pending
- already paid
- invoice not received
- disputed
- wrong contact
- human follow-up required
DueCall stores that result and applies a deterministic decision policy to decide whether to:
- stop follow-up,
- retry later, or
- hand the case to a human.
When an automatic retry is appropriate, DueCall can schedule another CALL-E attempt while enforcing safety guardrails.
Automatic follow-ups respect the contact's local business hours, require explicit opt-in, enforce a maximum automatic call limit, prevent duplicate follow-up attempts, and stop when an invoice has been paid or cancelled.
Each automatic retry creates a new CallAttempt linked to its parent, giving operators a clear audit trail instead of reusing or hiding previous calls.
CALL-E results are synchronized in the background and pushed to the browser in real time, so operators can see call outcomes and next actions without refreshing the page.
How we built it
DueCall is built with Ruby on Rails and PostgreSQL.
CALL-E Goal Runs handle the actual phone conversations and return structured results.
The application then uses:
- Rails models for invoice and call-attempt domain behavior
- CALL-E Goal Runs for outbound conversations
- Solid Queue for durable polling and scheduled follow-up jobs
- PostgreSQL for invoices, contacts, call attempts, and workflow state
- Turbo Streams and Solid Cable for real-time result updates
- parent/child CallAttempt relationships for automatic retry history
- contact time zones and business-hour calculations for safe scheduling
The workflow is:
Overdue invoice → CALL-E call → structured result → decision policy → guarded scheduling → follow-up call or human handoff
Safety and guardrails
Autonomous phone calls can create real-world side effects, so DueCall is deliberately conservative.
Automatic follow-up requires explicit opt-in and includes:
- contact-local business hours
- time-zone-aware scheduling
- maximum automatic attempt limits
- duplicate-call prevention
- stop conditions for paid or cancelled invoices
- human escalation for uncertain or sensitive outcomes
- a separate CallAttempt for every phone call
- an auditable parent/child call history
The CALL-E goal is also designed not to invent invoice facts, make threats or legal claims, negotiate unsupported terms, or disclose invoice information to an unverified wrong contact.
Challenges we ran into
The difficult part was not simply making a phone call.
The harder problem was safely connecting an unpredictable real-world conversation to deterministic application behavior.
We had to handle asynchronous CALL-E results, background polling, retry scheduling, contact time zones, business-hour boundaries, duplicate protection, and the possibility that a scheduled job executes after the invoice state has changed.
The system therefore re-checks important conditions when a scheduled follow-up actually executes instead of assuming that the original scheduling decision is still valid.
Accomplishments that we're proud of
DueCall grew from a single CALL-E call into an autonomous multi-step workflow.
We implemented:
- real CALL-E Goal Run integration
- structured phone-call outcome extraction
- deterministic stop / retry / human-handoff decisions
- durable scheduled retries with Solid Queue
- business-hours and time-zone guardrails
- duplicate-call protection
- automatic call limits
- parent/child automatic call history
- real-time Turbo updates
- an operational dashboard for AR activity
The application also has a comprehensive automated test suite covering the decision and autonomous follow-up workflow.
What we learned
Voice agents become much more useful when the phone call is treated as one step in a larger business process rather than the entire product.
CALL-E provides the bridge into the real-world conversation. The application around it needs to decide what the conversation means, preserve state, schedule future work safely, and know when automation should stop.
That orchestration layer is what turns a phone call into an operational agent.
What's next for DueCall
Next steps include supporting more accounts-receivable workflows, richer policies for different customer segments, integrations with accounting systems, improved reporting, and configurable follow-up strategies.
The broader goal is to let finance teams define the boundaries while DueCall handles routine payment follow-up safely and autonomously.
Built With
- call-e
- postgresql
- ruby
- ruby-on-rails
- solid-cable
- solid-queue
- tailwind-css
- turbo