What is Automated Collections? #
Chargent Automated Collections automatically retries payment collection on missed and late payments. This add-on also communicates with those customers – letting them know that they’ve missed a payment – and provides them with a Payment Request link that allows them to update their payment information and get their account back in the black. All this on the schedule and cadence that you choose.
This great add-on takes minutes to configure and activate, and requires no developer work or coding. Once activated, there’s no more need to spend staff time sending emails and making phone calls to collect on late payments.
Prerequisites #
If you’re reading this guide you’ve most likely already installed and configured the most up-to-date versions of our core packages, Chargent Base and Chargent Orders. If not, please click here to get those taken care of.
The other items you’ll want squared away are:
- Chargent Order licenses are assigned
- A payment Gateway record has been created and tested
- The Automated Collections feature is activated
- At least one Payment Request template is configured
- Your user profile has “View Setup and Configuration” and “Customize Application” enabled.
If you would like assistance with any of those items, our Support Team is ready to help. Click here to reach out to them.
Configuring Automated Collections #
Now that you’ve completed the prerequisites, let’s get started on configuring Chargent Automated Collections.
- Click the App Launcher icon
at the top-left of your screen, search for “Chargent”, then click the “Chargent” app
- Click the “Chargent Settings” tab
- Click the “Automated Collections” tab from the settings navigation
- If needed, enable Automated Collections in your org by clicking toggle switch to the “Enabled” position
- Click the [New] button at the top-left portion of the screen
- Choose the type of Automated Collections process you wish to create from the pop-up:

- Enter a value into the “AC Process” Name field
- Select an email address from the “Sender Email Address” picklist. This is the address that emails sent by this process will come from. This picklist will populate with emails configured in Salesforce Setup > Organization-Wide Addresses
- Select an option from the “Payment Request Page” picklist. This is the Payment Request template that customers will land on when clicking the link included in the email this process sends
- Select an option from the “Criteria” picklist:
- All Chargent Orders = this Automated Collections process will trigger when a scheduled payment is missed on any Chargent Order record
- Rule-based = this Automated Collections process will trigger only when the value in the “AC Criteria” field on a given Chargent Order record matches the “AC Criteria Value” populated on this configuration

“AC Criteria Value” field on an Automated Collections Configuration

“AC Criteria” field on a Chargent Order record
- For each stage, you may configure the timing, the Retry option, and the Email options
- Time Frame options (first column) will dictate when this stage will execute
- Time Frame = the general timing option. For instance: Immediately, # of Days, # of Weeks, Day of The Month
- The “Immediately” option may only be used for sending an email for the first stage
- Time Frame Detail = the specific timing detail. For instance: a numeric value for # of Days, a numeric value for Day of The Month, a day of the week
- Time Frame = the general timing option. For instance: Immediately, # of Days, # of Weeks, Day of The Month
- Payment Retry options (second column) will dictate whether the Chargent application will automatically attempt to collect the payment during this stage
- Yes
- No
- No – Mark order as error (typically only used for the last stage)
- Email options (third column) will dictate whether an email is sent during this stage, who that email is from (if different than the “Sender Email Address” selection above, and whether that email will be CC’d to an internal email address
- The Send Email option only executes if the payment retry configured for the same stage fails to collect a payment
- Time Frame options (first column) will dictate when this stage will execute
NOTE: To create additional email templates, navigate to Salesforce Setup > Classic Email Templates > Chargent Automated Collections Templates (folder), then click the [New Template] button. You may also edit existing templates here.
Once the email is created and saved, it will appear in the [Send Email] picklist when configuring an Automated Collections process.
The elements below can be added to your Automated Collections email templates in order to populate relevant information. They function similarly to standard Salesforce merge fields, but use a different format in some cases.
[[amount due]]
This will populate the Charge Amount on the Chargent Order record at the time that Automated Collections was triggered
[[decline date]]
This will populate the date of the payment decline that triggered Automated Collections for this record
[[payment request link]]
This will provide a Payment Request link that the recipient may click to be taken to a secure page where they may update their payment information and submit the payment
The following standard merge fields are often used in Automated Collections emails as well:
{!ChargentOrders__ChargentOrder__c.ChargentOrders__Payment_Title__c}
This will show the value from in the “Order Title” field on the Chargent Order record. This is useful in that it expresses the purpose of the payment being collected
{!ChargentOrders__ChargentOrder__c.ChargentOrders__Payment_Descriptor__c}
This will show the value from the “Order Descriptor” field on the Chargent Order record. This is useful in that it expresses the details of the payment being collected.
{!Recipient.FirstName}
This will populate the first name found in the Billing First Name field on the Chargent Order record.
{!Organization.Name}
This will populate the value found in the “Organization Name” field found in Salesforce Setup > Company Settings > Company Information.
- For each stage, you may configure the timing, the Retry option, and the Email options

Chargent Automated Collections Stage Configuration
- Once you’ve configured all stages, click the [Save] button to save your new Automated Collections process.
- Note that your new process will be enabled by default. To disable it, click the caret (downward arrow) button next to the process in the left-side navigation, then click ‘Disable’
That’s it! In just a few minutes and a handful of clicks, you’ve configured Chargent’s Automated Collections feature in your Org.
Automated Collections Process Example #
If you’re just getting started with Automated Collections, and are looking for a boilerplate process, here’s a good template to start with. This template assumes a monthly recurring payment, and is designed to be friendly throughout, but to also escalate the tone as the stages are executed. Note the custom merge fields used that include [[ ]] wrappers.
Stage | Timing & Actions | Messaging |
1 | Immediately Send email w/ Payment Request link No retry | Email Template Subject: Heads up – your payment was declined {!Recipient.FirstName}, Hey there! Your payment of [[amount due]] was declined on [[decline date]]. You can update your payment details and submit the payment again by clicking here: [[payment request link]]. {!ChargentOrders__ChargentOrder__c.ChargentOrders__Payment_Title__c}{!ChargentOrders__ChargentOrder__c.ChargentOrders__Payment_Descriptor__c} Thank you, {!Organization.Name} Payment Request Template The text of the Payment Request template should be friendly, and reflect that the consumer is updating their payment method and sending a payment for the product / service they’ve agreed to pay for. |
2 | 1 Day Later Retry payment No email | |
3 | 3 Days Later Retry payment Send email w/ Payment Request link | Email Template Subject: 2nd Notice – your payment was declined, please update payment method {!Recipient.FirstName}, We emailed you a few days ago about your recently declined payment. We tried to collect that payment again today using the payment method on file, but it was declined. Please update the payment method on file here [[payment request link]], or contact our Billing Team at: 555-555-5555 [email protected] Thank you, {!Organization.Name} |
4 | Day of Month = 16 Retry payment Send email | Email Template Subject: Warning: Your payment was not received {!Recipient.FirstName}, Your recent scheduled payment was declined. We’ve attempted to collect this missed payment, and have emailed you about it. Please contact our Billing Team to prevent account suspension: 555-555-5555 [email protected] Thank you, {!Organization.Name} |
5 | 3 Days Later No retry – Mark as Error Send email | Email Template Subject: Account Suspended for non-payment {!Recipient.FirstName}, As we have not been able to collect your previously declined payment, your account has been suspended. Please contact our Billing team to arrange payment and reinstate your account: 555-555-5555 [email protected] Thank you, {!Organization.Name} |
How Automated Collections Works #
Now that you’re configured and activated Automated Collections, let’s take a look at how this feature works. In a nutshell, Automated Collections has three major stages:
1st | Automated Collections is Triggered (automatically or manually) | Automated Collections record is created Automated Collections Stages records are created Payment Request link is generated The “Payment Status” field on the Chargent Order record is changed to “Automated Collections” |
2nd | Stages are Scheduled / Executed | Automatic payment collection retries are executed on the schedule established Emails are sent to customers on the schedule established |
3rd | Automated Collections Completes | Automated Collections Process for that Chargent Order is halted Unused Automated Collections Stage records are automatically deleted The “Payment Status” field on the Chargent Order is changed to “Recurring” upon successful payment collection, or “Error” upon unsuccessful payment collection. |
Triggering Automated Collections #
Automated Collections can be triggered in many ways:
When a Scheduled Payment Fails
This is the typical method used by most businesses, wherein a scheduled payment is declined, and the Automated Collections process begins because of that decline. To leverage this approach, either configure an Automated Collections process with the Criteria value of “All Chargent Orders,” or a Criteria value of “Rule-Based,” and ensure that the AC Criteria field for each Chargent Order record is populated with the value that matches the AC Criteria Value field on the Automated Collections configuration.
Start Automated Collections Action
Chargent understands that your business will sometimes need the option to start the Automated Collections process manually.
With Chargent’s Collect Any Payment feature, users can click the [Start Automated Collections] action on the Chargent Order record to initiate an Automated Collections process.
- Navigate to the Chargent Order Record
- Click the [Start Automated Collections] action
- Select the Automated Collection Process you want to trigger
- Click the [Start Collections] button

Automated Collections In Flows
Chargent makes it easy to collect payments anywhere in Salesforce. This is why we have enabled Flow for Automated Collections. We’ve even included an Automated Collections Flow Template to help get you started. Clone that template, then modify it to fit your business needs.

Within the Flow, you can use an Apex Action to trigger Automated Collections using a Global class called ACFlowCreate.
Use the InvocableMethod createAutomatedCollections to receive a list of AutomatedCollectionsInput.
Below is a description of each attribute:

- AC Process to Trigger: This is used to specify which Automated Collections Process to trigger
- Record ID List: This is used to define the Chargent Order Record IDs to be targeted for the triggering of Automated Collections
- Post-Collection Payment Status (optional): This is the value applied to the ‘Payment Status’ field on the related Chargent Order record after this Automated Collections process has collected a payment
Below are the Output Values:

- Chargent Orders – AC Triggered: This is the list of Chargent Order records for which AC has been triggered
- Chargent Orders – AC Not Triggered: This is the list of Chargent Order records for which AC could not be triggered
- DML Status: This is the status of the DML operation
- Result: This is the result of the operation
Automated Collections using an API Trigger
In the diagram below, you’ll see that Chargent uses the ACWebservice class as an entry point. This class includes the webservice annotation to allow it to be used in the SOAP API.

Note: The ActionService class, getService(), and performAction(String input) methods are global. This means that those methods can be accessed and used in apex code outside the package.
createAutomatedCollections (from ChargentOrders)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acw="http://soap.sforce.com/schemas/class/ChargentBase/ACWebservice">
<soapenv:Header>
<acw:SessionHeader>
<acw:sessionId>***************</acw:sessionId>
</acw:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<acw:createAutomatedCollections>
<!-One or more repetitions:->
<acw:lstRecordObjectIds>lstRecordObjectIds1
</acw:lstRecordObjectIds>
<acw:lstRecordObjectIds>lstRecordObjectIds2
</acw:lstRecordObjectIds>
<acw:processId>processId</acw:processId>
<acw:onCompletePaymentStatus>onCompletePaymentStatus
</acw:onCompletePaymentStatus>
</acw:createAutomatedCollections>
</soapenv:Body>
</soapenv:Envelope>
createAutomatedCollectionsForObject (from any object that has a relationship to ChargentOrder)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acw="http://soap.sforce.com/schemas/class/ChargentBase/ACWebservice">
<soapenv:Header>
<acw:SessionHeader>
<acw:sessionId>***************</acw:sessionId>
</acw:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<acw:createAutomatedCollectionsForObject>
<!-One or more repetitions:->
<acw:lstRecordObjectIds>lstRecordObjectIds1
</acw:lstRecordObjectIds>
<acw:lstRecordObjectIds>lstRecordObjectIds2
</acw:lstRecordObjectIds>
<acw:processId>processId</acw:processId>
<acw:onCompletePaymentStatus>onCompletePaymentStatus
</acw:onCompletePaymentStatus>
<acw:lookupRelationWithOrders> ChargentBase__Order__c
</acw:lookupRelationWithOrders>
</acw:createAutomatedCollectionsForObject>
</soapenv:Body>
</soapenv:Envelope>
By initiating the Automated Collections process, the following is executed:
- Email with a Payment Request link (if your process includes email) is scheduled
- Payment Request record is created
- Chargent Automated Collection record is created
- Chargent Automated Collection Stage records are created
The “Payment Status” field on the Chargent Order record will be updated to Automated Collections when the process begins.
Automated Collections Objects #
The two main objects you’ll interact with when using Automated Collections are “Chargent Automated Collections” and “Chargent Automated Collections Stages.”
Chargent Automated Collections
This record is created when an Automated Collections process has been triggered for a given record. It is the Master object in a Master-Detail relationship with the Chargent Automated Collections Stages object. The fields on the page layout by default are listed in the table below.
Field Name | Field Purpose |
Chargent Automated Collections ID | The automatically generated unique identifier for this record. |
Chargent Order | The Chargent Order Record from which the failed payment occurred. |
Account | The Account record associated with that Chargent Order. |
Contact Emailed | The Contact emailed when the payment failed and the Automated Collections process began. |
Status | The status of this Automated Collections process; Completed or In Progress |
Payment Received | The date on which the successful payment that completed this process was received. |
Payment Received Via | Indicates how the payment was collected. |
Last Stage Executed | The last Chargent Automated Collections Stage that was executed before the successful payment was received |
Post-Collection Payment Status | This field indicates what the value of the ‘Payment Status’ field will be on the related Chargent Order record after this Automated Collections process has collected a payment. |
AC Process | Provides a lookup to the record for the Automated Collections configuration triggered. |
AC Process Name | Displays the name of the Automated Collections configuration triggered. |
PR Page | Displays the name of the Payment Request template used for the automatically generated Payment Request record used for this process. |
States Total | Displays the total number of Automated Collections Stages scheduled for this process. |
Next Stage Date | Displays the date that the next scheduled stage will execute. |

Chargent Automated Collections Stage
These records are created when Automated Collections is triggered. They represent the stages that were configured, and which will execute for this process. This object is the Detail object in the Master-Detail relationship with the Chargent Automated Collections object.
Field Name | Field Purpose |
Automated Collections Stage ID | The automatically generated unique identifier for this record. |
Automated Collections Record | The Chargent Automated Collections record, which is the Master in the Master-Detail relationship for this record. |
AC Stage | The stage number in the series of stages configured for this Automated Collections process. For instance: “Stage 2/3” |
Email Template | The record ID of the email template used for this stage. |
Next Stage | A lookup to the next Automated Collections Stage record to be executed. |
Sender Email Address | Displays the record ID of the Organization-Wide Address used as the Sender Email Address for this stage. |
Execute Date | The date on which this stage will / did execute. |
Emailed Sent | Indicates whether an email was sent as part of this stage. |
CC Email Address | Displays the email address if this stage was configured to CC one during this stage. |
Transaction | Displays a link to the Transaction record generated if a payment retry was executed during this stage. |
Payment Retry | This field indicates the automatic retry status of this stage. This will display whether the charge is scheduled or not, and whether that retry resulted in a successful payment collection. |
