> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erstan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounts receivable & collections

> Find overdue invoices, understand customer balances, and draft collections outreach — with approvals on every change.

This playbook shows how to put Erstan to work on accounts receivable: surfacing overdue invoices, reading a customer's balance in context, and drafting collections outreach. Each recipe works two ways — ask in [Chat](/chat/overview), or run a saved [agent](/agents/overview) — and every write to NetSuite pauses for your approval.

<Info>
  These recipes read from your own NetSuite account, so the numbers, customers, and invoices are yours. Reads (aging, balances, SuiteQL) run on their own; only actions that change NetSuite or send a message ask for approval first.
</Info>

## Two ways to run a recipe

<Tabs>
  <Tab title="Ask in chat">
    Open Chat, type the prompt, and send. Erstan finds the records, runs read-only queries, and streams back a summary you can refine in follow-up messages. Good for one-off questions and exploration. See [Chatting with Erstan](/chat/overview).
  </Tab>

  <Tab title="Run a saved agent">
    Install or build a collections agent and run it on demand, on a [schedule](/agents/schedules), or as a [task](/tasks/overview) someone reviews. Good for repeatable, recurring work. Browse the **Accounts Receivable** desk in the [Marketplace](/marketplace/overview), or [build your own](/agents/create-first-agent).
  </Tab>
</Tabs>

## Recipe: AR aging summary

Get a snapshot of what's outstanding, bucketed by how overdue it is.

<Steps>
  <Step title="Ask for the aging summary">
    In Chat, send a prompt like:

    > Give me an AR aging summary as of today — total open receivables grouped into current, 1–30, 31–60, 61–90, and 90+ days past due.
  </Step>

  <Step title="Let Erstan query and bucket">
    Erstan runs read-only [SuiteQL](/playbooks/reporting-suiteql) against your open invoices, groups them by days past due, and returns a table with totals per bucket.
  </Step>

  <Step title="Open the detail in Canvas">
    Click the query or result reference to open it in the [Canvas panel](/chat/canvas), where you can read the underlying rows and export them to a [document](/content/documents) or workbook.
  </Step>
</Steps>

<Tip>
  Narrow the picture with follow-ups in the same thread: "Just subsidiary EMEA", "Only customers over \$10,000 past due", or "Show the 90+ bucket by customer".
</Tip>

## Recipe: overdue invoices over a threshold

Pull the specific invoices that need chasing, filtered to what matters.

Example prompts:

* *"List open invoices more than 30 days past due with a balance over \$5,000, sorted by amount."*
* *"Which customers have the largest past-due balances right now? Show the top 10."*
* *"Show overdue invoices for Acme Corp and how many days past due each one is."*

Erstan returns a ranked list with the invoice number, customer, amount, due date, and days overdue. Open any result in [Canvas](/chat/canvas) to inspect the NetSuite record inline, or ask Erstan to turn the list into a document you can share with your team.

## Recipe: customer balance with context

Before reaching out, understand the relationship — not just the number.

<Steps>
  <Step title="Ask for the balance and history">
    > What's Acme Corp's current open balance? Break it down by invoice, and note their recent payment history and any credits on file.
  </Step>

  <Step title="Read the grounded answer">
    Erstan pulls the customer's open invoices, payments, and credit memos from NetSuite and summarizes the balance with the context behind it — useful before a call or a dunning email.
  </Step>

  <Step title="Add references for richer context">
    Turn on [Knowledge](/chat/knowledge-tools-models) so Erstan can factor in your searchable Team File notes or policies alongside the live data.
  </Step>
</Steps>

## Recipe: draft a dunning email (with approval)

Drafting a reminder is a read step. Sending it, or posting anything back to NetSuite, is a write — so Erstan pauses for you.

<Steps>
  <Step title="Ask for the draft">
    > Draft a polite but firm payment reminder to Acme Corp's AP contact covering their 3 invoices over 60 days past due. Reference the invoice numbers and amounts.
  </Step>

  <Step title="Review and refine the draft">
    Erstan writes the email in the transcript. Edit it with follow-ups — "make it warmer", "add our payment portal link", "offer a 10-day extension" — until it reads right.
  </Step>

  <Step title="Approve before anything is sent or written">
    If you ask Erstan to send the message or log activity on the customer record, an **approval card** appears with **Run action** / **Don't run** and an expandable Before/After preview. Nothing leaves Erstan or touches NetSuite until you approve. See [Approving and rejecting AI actions](/chat/approvals).
  </Step>
</Steps>

<Warning>
  Sending outreach and writing to NetSuite (logging an activity, updating a record) are **write actions**. They require your approval by default. **Auto-approve writes** skips that prompt for the session — leave it off for collections work so you review every message before it goes out, and every change before it posts.
</Warning>

## Make it repeatable with an agent

When you run the same collections review every week, save it as an agent instead of re-typing prompts.

<AccordionGroup>
  <Accordion title="Install one from the Marketplace">
    Open the [Marketplace](/marketplace/overview) and browse the **Accounts Receivable** desk for ready-made agents that find overdue invoices and draft outreach grounded in your NetSuite data. Adding one creates an editable agent (or runs a guided setup that connects the services it needs). See [Adding agents from the Marketplace](/marketplace/add-agents).
  </Accordion>

  <Accordion title="Build your own Assistant">
    Create an [Assistant](/agents/overview) agent with a Chat trigger, give it instructions like "find overdue invoices and draft reminders, always pausing for approval before sending", and attach the NetSuite tools it needs. Walk through it in [Create your first agent](/agents/create-first-agent).
  </Accordion>

  <Accordion title="Run it on a schedule and review the output">
    Put the agent on a weekly [schedule](/agents/schedules). Each run becomes a [task](/tasks/overview) that moves Queued → In Progress → Needs Review → Complete, so a collections owner reviews the aging summary and approves any outreach from the **Needs Review** queue. See [Reviewing and approving agent work](/tasks/review-approve).
  </Accordion>
</AccordionGroup>

<Warning>
  A scheduled or task-run agent still pauses for approval on writes. Decide who **reviews** each run and confirm the agent's NetSuite tools use **Require approval** for any send or update — see [Managing NetSuite: tools & write policy](/connectors/netsuite-manage).
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Approvals" icon="shield-check" href="/chat/approvals">
    How write actions pause for your sign-off, with the Before/After preview.
  </Card>

  <Card title="Reporting with SuiteQL" icon="database" href="/playbooks/reporting-suiteql">
    Go deeper on querying NetSuite and turning results into documents.
  </Card>

  <Card title="Add a collections agent" icon="store" href="/marketplace/add-agents">
    Install a ready-made agent from the Accounts Receivable desk.
  </Card>

  <Card title="Accounts payable" icon="file-text" href="/playbooks/accounts-payable">
    The sister playbook for vendor bills and payment runs.
  </Card>
</CardGroup>
