Auto Credit Application
Overview
Auto Credit Application enables the automatic application of account credit balances to open invoices, reducing manual intervention and improving reconciliation. When enabled, this feature ensures that available credits are automatically used to settle outstanding invoices, streamlining the billing process and reducing confusion for both carriers and customers.
Key Concepts
Dynamic Setting: The feature is controlled by the
autoApplyExcessToInvoicesEnabled
flag that can be toggled on or off per plan that the account can refer.No Backfilling: The feature does not retroactively apply to past transactions; however, it will process existing tenants if the trigger conditions are met.
Automatic Triggers: Once deployed, the process is triggered automatically by the system when certion events occur.
How It Works
Configuration
The feature is activated by setting autoApplyExcessToInvoicesEnabled
flag to true in the relevant ExcessCreditPlanRef.
"AutoCreditApplication": {
// ...,
"disburseExcess": false,
"advanceDisbursementTo": "executed",
"autoApplyExcessToInvoicesEnabled": true,
// ...,
}
Create or update an account with this ExcessCreditPlanRef.
{
// ...,
"type": "ConsumerAccount",
"delinquencyPlanName": "Standard",
"excessCreditPlanName": "AutoCreditApplication",
// ...,
}
Since autoApplyExcessToInvoicesEnabled
is enabled for this account, the system will automatically attempt to apply any positive account credit balance to open invoices associated with this account.
Processing Logic
Check Credit Balance: The system checks if the account has a positive credit balance in the relevant currency.
Check for Open Invoices: If there are open invoices, the system proceeds; otherwise, it exits.
Sort Invoices: Invoices are sorted by their earliest due date, excluding any negative invoices that are found.
Apply Credits: One or more credit distributions are created and executed, applying available credits to the sorted invoices until we don’t have open invoices left or the account credit balance has been exhausted.
Handle Remainder: Any remaining credit that cannot be applied is left in the account for future use or disbursement.
Triggers
Credit Balance Increases: When the account credit balance becomes positive.
Example: Create and post a payment whose amount is more than the targets can use. Below is a payment request of $500, targeting only $200.00 to a specific invoice. The remaining $300.00 becomes a credit and will trigger the auto application process.
{
"accountLocator": "{accountLocator}",
"amount": 500.00,
"data": {
"payerFirstName": "first",
"payerLastName": "last",
"note": "payment"
},
"targets": [
{
"containerLocator": "{invoiceLocator}",
"containerType": "invoice",
"amount": 200.00
}
],
"transactionNumber": "abc1234",
"type": "StandardPayment"
}
New Invoices Generated: When new invoices are created, regardless of credit balance changes.
Example:
Set up an account with a positive
accountCreditBalance
by posting a payment and follow one of the steps below;Create and issue a new quote, which can result in an open invoice.
Create and issue a new transaction, which can result in an open invoice.
Do early invoicing for certain installments.
Add a new fee that can immediately be invoiced.
Automatic via the excess credit handling workflow
Whenever the excess credit handling workflow runs, it will first run the auto credit application if eligible before any other logic.
Best Practices
Enable Only When Needed: Only enable auto credit application for accounts or products where automatic reconciliation is desired.
Monitor Credit Balances: Regularly review accounts with frequent credits to ensure the feature is working as intended.
API Integration: Use the provided API for on-demand processing or integration with external workflows.
Limitations
No Backfilling: Past transactions are not automatically processed.
No Disbursement: The feature does not trigger disbursements, only credit applications to invoices.
Payments Preview: The feature is not triggered during payment previews.
Invoice Preview: The feature is not triggered during invoice previews.