Templates / Order to cash / payment-collection
Payment Collection & Dunning
Sends an invoice and waits for the payment message, correlated on the invoice id. Each payment is applied to the ledger: a settled invoice is closed, a balance under 5 is written off, and a larger balance gets a statement before waiting again. Every 14 days without payment a reminder goes out, and after the third the invoice is handed to collections.
Scenarios · 2
- The customer pays in full and the invoice is closed send-invoice → await-payment → apply-payment → close-invoice → invoice-paid
- A 2.40 shortfall is written off apply-payment → write-off → close-invoice → invoice-paid
Job types · 5
-
collections-assignHand over to collections -
invoice-sendSend invoice, Send payment reminder, Send balance statement -
ledger-apply-paymentApply payment to ledger -
ledger-close-invoiceClose invoice -
ledger-write-offWrite off small balance
Files · 2
- payment-collection.bpmn Process model
- payment-collection.bpmn.tests.json Test scenarios (runScenario format)
Every scenario passes on @bpmnkit/engine's runScenario in the
package's tests. casen template use payment-collection [dir] writes the files above
into your project — see the templates guide for running
the scenarios and deploying.