Weekly ServiceTitan accounts receivable aging snapshot

By General Input

Every Monday morning, every unpaid invoice gets sorted into aging buckets, logged to a spreadsheet, and summarized in Slack so nothing ages past 90 days.

Integrations

  • ServiceTitan
  • Google Sheets
  • Slack Bot

Type

Deterministic Code

Categories

  • Finance
  • Operations

Every Monday at 7am, build my accounts receivable aging snapshot from ServiceTitan so nothing slips past 90 days without me seeing it. Use a cron trigger for the weekly schedule. Keep this strictly deterministic with no judgement calls: it is date math and formatting over structured invoice data.

Start with the ServiceTitan "List Invoices" operation to pull every invoice that still has a remaining balance greater than zero, paging through all results until there are no more. Then use the ServiceTitan "List Customers" operation to resolve the customer for each of those invoices, and attach the customer name to every outstanding invoice record.

For each outstanding invoice, work out its age in days as the difference between the run date and the invoice date, then sort the balance into one of four standard aging buckets: 0 to 30 days, 31 to 60 days, 61 to 90 days, and over 90 days. Base the bucketing on the invoice date.

Append one row per outstanding invoice to my Google Sheet using the "Append Values" operation. Each row should carry the run date, invoice number, invoice date, customer name, remaining balance, age in days, and the aging bucket it landed in. Always append and never overwrite, and stamp every row in the run with the same run date, so the sheet accumulates a week over week trend I can group and chart later rather than replacing last week's numbers.

Finally, post a summary to my accounts receivable channel with the Slack "Send a Message" operation, using the Slack Bot integration so it posts as a bot rather than as me. The message should show the total amount owed in each of the four buckets, the overall total outstanding, and then the five largest overdue balances sorted from largest to smallest, each listing the customer name, invoice number, amount owed, and days outstanding. Format currency amounts consistently and use Slack mrkdwn formatting.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensStop cold emails to anyone with a live deal in PipedriveLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery board