Commerce Accounts Receivable
Track customer receivables, manage collections, issue credit memos, and monitor AR aging.
How It Works
- Monitor AR aging to identify overdue accounts.
- Log collection activities (dunning letters, calls, emails).
- Issue credit memos for returns, pricing errors, or goodwill.
- Apply payments and credit memos to outstanding invoices.
- Write off uncollectible balances with approval.
- Generate customer statements.
Usage
- MCP tools:
get_ar_aging, get_customer_ar_aging, log_collection_activity, create_credit_memo, apply_credit_memo, apply_payment_to_invoice, create_write_off, get_customer_statement, get_customer_ar_summary.
- Writes require
--apply.
Collection Statuses
- None -> Reminder1Sent -> Reminder2Sent -> Reminder3Sent -> InCollections -> SentToAgency (or WrittenOff/PromiseToPay/PaymentPlan)
Dunning Letter Types
- Reminder1, Reminder2, Reminder3, DemandLetter, CollectionNotice
Credit Memo Reasons
- ReturnedGoods, PricingError, Overpayment, Damaged, ServiceCredit, GoodwillAdjustment, Other
Write-Off Reasons
- Uncollectible, Bankruptcy, CustomerDispute, SmallBalance, AccountClosed, Deceased, Other
Aging Buckets
- Current, 1-30 days, 31-60 days, 61-90 days, 90+ days
Output
{"status":"dunning_sent","customer_id":"cust_123","dunning_type":"Reminder2","total_overdue":3250.00,"invoices_overdue":3}
Present Results to User
- Customer name and total outstanding balance.
- Aging breakdown by bucket.
- Collection activity history and next recommended action.
- Credit memo and write-off totals.
Troubleshooting
- Credit memo won't apply: verify memo status is Open and invoice has remaining balance.
- Write-off rejected: ensure approver and GL account are provided.
- Aging mismatch: confirm invoice dates and payment applications are current.
References
- references/ar-collections.md
- /home/dom/stateset-icommerce/crates/stateset-core/src/models/accounts_receivable.rs
- /home/dom/stateset-icommerce/crates/stateset-embedded/src/accounts_receivable.rs
1---2name: commerce-accounts-receivable3description: Manage customer receivables, collections, credit memos, and AR aging. Use when tracking overdue invoices, sending dunning letters, creating write-offs, or generating customer statements.4---5
6# Commerce Accounts Receivable
7
8Track customer receivables, manage collections, issue credit memos, and monitor AR aging.
9
10## How It Works
11
121. Monitor AR aging to identify overdue accounts.
132. Log collection activities (dunning letters, calls, emails).
143. Issue credit memos for returns, pricing errors, or goodwill.
154. Apply payments and credit memos to outstanding invoices.
165. Write off uncollectible balances with approval.
176. Generate customer statements.
18
19## Usage
20
21- MCP tools: `get_ar_aging`, `get_customer_ar_aging`, `log_collection_activity`, `create_credit_memo`, `apply_credit_memo`, `apply_payment_to_invoice`, `create_write_off`, `get_customer_statement`, `get_customer_ar_summary`.
22- Writes require `--apply`.
23
24## Collection Statuses
25
26- None -> Reminder1Sent -> Reminder2Sent -> Reminder3Sent -> InCollections -> SentToAgency (or WrittenOff/PromiseToPay/PaymentPlan)
27
28## Dunning Letter Types
29
30- Reminder1, Reminder2, Reminder3, DemandLetter, CollectionNotice
31
32## Credit Memo Reasons
33
34- ReturnedGoods, PricingError, Overpayment, Damaged, ServiceCredit, GoodwillAdjustment, Other
35
36## Write-Off Reasons
37
38- Uncollectible, Bankruptcy, CustomerDispute, SmallBalance, AccountClosed, Deceased, Other
39
40## Aging Buckets
41
42- Current, 1-30 days, 31-60 days, 61-90 days, 90+ days
43
44## Output
45
46```json
47{"status":"dunning_sent","customer_id":"cust_123","dunning_type":"Reminder2","total_overdue":3250.00,"invoices_overdue":3}
48```
49
50## Present Results to User
51
52- Customer name and total outstanding balance.
53- Aging breakdown by bucket.
54- Collection activity history and next recommended action.
55- Credit memo and write-off totals.
56
57## Troubleshooting
58
59- Credit memo won't apply: verify memo status is Open and invoice has remaining balance.
60- Write-off rejected: ensure approver and GL account are provided.
61- Aging mismatch: confirm invoice dates and payment applications are current.
62
63## References
64- references/ar-collections.md
65- /home/dom/stateset-icommerce/crates/stateset-core/src/models/accounts_receivable.rs
66- /home/dom/stateset-icommerce/crates/stateset-embedded/src/accounts_receivable.rs