| name | freight-invoice-tracker |
| description | Auto-generate freight invoices after POD confirmation, track accounts receivable aging, send payment reminders, and monitor carrier payments. Use when a load is delivered and needs invoicing, broker wants AR status, an invoice is overdue, or payment reminders are needed. Triggered by phrases like "invoice load", "AR report", "paid invoice", "overdue invoices", "remind shipper", or automatically after POD confirmation. |
Freight Invoice Tracker
Automatically generates invoices when deliveries are confirmed, tracks AR aging, and sends payment reminders.
Setup
pip3 install reportlab
export EMAIL_HOST=imap.gmail.com
export EMAIL_USER=broker@gmail.com
export EMAIL_PASS=xxxx-xxxx-xxxx-xxxx
Usage
Generate invoice
cd skills/freight-invoice-tracker/scripts
python3 invoice_generator.py --load-id LOAD-001 --shipper "ABC Manufacturing" --amount 3500
python3 invoice_generator.py --load-id LOAD-001 --shipper "ABC" --amount 3500 --email ap@abc.com
AR Report
python3 ar_tracker.py --report
python3 ar_tracker.py --check-aging
Payment reminder
python3 payment_reminder.py --invoice INV-00001 --days 38
AR Aging Buckets
| Bucket | Days | Action |
|---|
| Current | 0-30 | No action |
| Aging | 31-60 | Friendly reminder at 45 days |
| Overdue | 60+ | Firm reminder, collection prep |
Broker Text Commands
| Command | Action |
|---|
invoice load [ID] | Generate invoice for a load |
AR report | Get accounts receivable summary |
paid [invoice#] | Mark invoice as paid |
remind [invoice#] | Send payment reminder |
overdue invoices | List all overdue invoices |
Example SMS Outputs
Invoice sent:
📄 INVOICE SENT - #4521
To: ABC Manufacturing
Amount: $3,500 | Due: Jan 15 (Net 30)
Load: Dallas→Chicago
Margin: $500 (14%)
Reply 'paid' when received
AR summary:
📊 AR SUMMARY
Total: $47,200 outstanding
Current (0-30d): $28,500 (6 invoices)
Aging (31-60d): $12,700 (3 invoices)
Overdue (60d+): $6,000 (1 invoice)
Oldest: ABC Shipper - $3,500 (62 days)
Overdue alert:
⚠️ OVERDUE - Invoice #4521
ABC Manufacturing | $3,500 | 38 days
Reply 'remind' to send follow-up
Reply 'note [text]' to add note
Cron Setup (Daily AR Check)
0 8 * * * cd /path/to/freight-invoice-tracker/scripts && python3 ar_tracker.py --check-aging >> /tmp/ar-alerts.log 2>&1
Integrations
This skill uses the following external services. See INTEGRATIONS.md for detailed setup instructions, API documentation links, and implementation guidance.
| Service | Purpose | Section in INTEGRATIONS.md |
|---|
| QuickBooks Online API | Invoice sync and accounting | Skill 4: QuickBooks Online API |
| Stripe | Credit card payments (optional) | Skill 4: Stripe |
| Gmail/Microsoft Graph | Send invoice emails | Skill 2: Email Providers |
| Twilio | SMS notifications | Shared Infrastructure: Twilio |
Invoice Storage
- PDF invoices:
~/.freight-broker/invoices/INV-{number}.pdf
- Invoice records: SQLite database (invoices table)
- Sequential numbering starting at 00001
- See INTEGRATIONS.md for complete integration architecture