Automate your accounts receivable workflow with this chain

TL;DR: This 6-step prompt chain takes raw AR and CRM data, calculates a priority score for collections, drafts personalized dunning emails, and generates a CFO-ready dashboard.

The Breakdown

Managing unpaid invoices usually involves juggling messy spreadsheets and subjective decisions about who to contact first. The creator, u/Prestigious-Tea-6699, designed a prompt chain that acts as a full-stack finance department to solve this. It doesn’t just format data; it applies logic to determine which debts are actually risky.

The workflow operates in distinct stages:

  1. Data Cleaning: It standardizes two different data sources (Aging reports and CRM health) into clean tables.
  2. Scoring Logic: It applies a specific formula to calculate a “Collection Priority Score” based on due dates, dispute risks, and customer health.
  3. Action Planning: It segments accounts into priority bands (Critical, High, Medium, Low).
  4. Execution: It drafts the actual emails you need to send.
  5. Reporting: It summarizes the financial exposure for leadership.

Use Cases and Variations

This approach uses Persona Switching. By telling the AI to act as a “Senior AR Analyst,” then a “Data Scientist,” and finally a “Copywriter,” the author ensures the tone and output change appropriately for each step.

Why it works:

  • Explicit Constraints: The prompt uses mathematical formulas (e.g., `Aging_Score = Days Past Due / 90`) rather than asking the AI to “guess” priority.
  • Variable Definitions: Defining `[COMPANY_NAME]` and data inputs at the top prevents confusion later in the chain.

Try these variations:

  • Adjust the Weights: If your company cares more about churn than disputes, change the multiplier in step 3 (e.g., `Health_Adjust * 0.5`).
  • Change the Output: Ask the “Collections Team Lead” to generate a Slack update for the sales team instead of a list for the CFO.

Prompt of the Day

Here is the exact prompt chain provided by the author. Note that the tildes (`~`) represent breaks where you might need to pause or run the next section if your LLM doesn’t support long chains automatically.

Prompt:

VARIABLE DEFINITIONS
[COMPANY_NAME]=Name of the company whose receivables are being analyzed
[AR_AGING_DATA]=Latest detailed AR aging report (customer, invoice ID, amount, age buckets, etc.)
[CRM_HEALTH_DATA]=Customer-health metrics from CRM (engagement score, open tickets, renewal date & value, churn risk flag)

You are a senior AR analyst at [COMPANY_NAME].

Objective: Standardize and validate the two data inputs so later prompts can merge them.

Steps:

  1. Parse [AR_AGING_DATA] into a table with columns: Customer Name, Invoice ID, Invoice Amount, Currency, Days Past Due, Original Due Date.
  2. Parse [CRM_HEALTH_DATA] into a table with columns: Customer Name, Engagement Score (0-100), Open Ticket Count, Renewal Date, Renewal ACV, Churn Risk (Low/Med/High).
  3. Identify and list any missing or inconsistent fields required for downstream analysis; flag them clearly.
  4. Output two clean tables labeled “Clean_AR” and “Clean_CRM” plus a short note on data quality issues (if any). Request missing data if needed.

Example output structure:
Clean_AR: |Customer|Invoice ID|Amount|Currency|Days Past Due|Due Date|
Clean_CRM: |Customer|Engagement|Tickets|Renewal Date|ACV|Churn Risk|
Data_Issues: • None found

You are now a credit-risk data scientist.

Goal: Generate a composite “Collection Priority Score” for each overdue invoice.

Steps:

  1. Join Clean_AR and Clean_CRM on Customer Name; create a combined table “Joined”.
  2. For each row compute:
    1. Aging_Score = Days Past Due / 90 (cap at 1.2).
    2. Dispute_Risk_Score = min(Open Ticket Count / 5, 1).
    3. Renewal_Weight = if Renewal Date within 120 days then 1.2 else 0.8.
    4. Health_Adjust = 1 ‑ (Engagement Score / 100).
  3. Collection Priority Score = (Aging_Score * 0.5 + Dispute_Risk_Score * 0.2 + Health_Adjust * 0.3) * Renewal_Weight.
  4. Add qualitative Priority Band: “Critical” (>=1), “High” (0.7-0.99), “Medium” (0.4-0.69), “Low” (<0.4).
  5. Output the Joined table with new scoring columns sorted by Collection Priority Score desc.

You are a collections team lead.

Objective: Segment accounts and assign next best action.

Steps:

  1. From the scored table select top 20 invoices or all “Critical” & “High” bands, whichever is larger.
  2. For each selected invoice provide: Customer, Invoice ID, Amount, Days Past Due, Priority Band, Recommended Action (Call CFO / Escalate to CSM / Standard Reminder / Hold due to dispute).
  3. Group remaining invoices by Priority Band and summarize counts & total exposure.
  4. Output two sections: “Action_List” (detailed) and “Backlog_Summary”.

You are a professional dunning-letter copywriter.

Task: Draft personalized outreach templates.

Steps:

  1. Create an email template for each Priority Band (Critical, High, Medium, Low).
  2. Personalize tokens: {{Customer_Name}}, {{Invoice_ID}}, {{Amount}}, {{Days_Past_Due}}, {{Renewal_Date}}.
  3. Tone: Firm yet customer-friendly; emphasize partnership and upcoming renewal where relevant.
  4. Provide subject lines and 2-paragraph body per template.

Output: Four clearly labeled templates.

You are a finance ops analyst reporting to the CFO.

Goal: Produce an executive dashboard snapshot.

Steps:

  1. Summarize total AR exposure and weighted average Days Past Due.
  2. Break out exposure and counts by Priority Band.
  3. List top 5 customers by exposure with scores.
  4. Highlight any data quality issues still open.
  5. Recommend 2-3 strategic actions.

Output: Bullet list dashboard.

Review / Refinement

Please verify that:

  • All variables were used correctly and remain unchanged.
  • Output formats match each prompt’s specification.
  • Data issues (if any) are resolved or clearly flagged.

If any gap exists, request clarification; otherwise, confirm completion.

If you found this workflow helpful, check out the full discussion on Reddit.

Streamline your collection process with this powerful prompt chain. Prompt included.
by u/Prestigious-Tea-6699 in ChatGPTPromptGenius

Scroll to Top