Starting in Salesforce’s Spring ’23 release, you can no longer create new processes using Process Builder. We recommend transitioning to Flow for your Salesforce automation needs.
For more information, see Workflow Rules & Process Builder End of Support.
To automate Chargent in Salesforce, we recommend Automating Chargent With Flow. The documentation below is maintained for historical purposes and for customers who have already created processes for Chargent using Process Builder.
What is Process Builder? #
Process Builder is a point-and-click Salesforce tool that lets you easily automate if/then business processes and see a graphical representation of your process as you build. Every process consists of a trigger, at least one criteria node, and at least one action.
Process Builder vs. Flow #
Many of the tasks you assign, the emails you send, and other record updates are vital parts of your standard processes. Instead of doing this repetitive work manually, you can configure processes to accomplish these tasks automatically. Process Builder, built via an intuitive graphical representation, helps you automate your business processes. While Process Builder is a useful tool, we recommend transitioning to its more powerful automation feature, Flow.
Process Builder and Flow are declarative solutions, but Process Builder uses a simplified approach, generating formulas akin to IF statements in code. Flow can perform all of the actions available in Process Builder but can also delete records and update multiple records. Additionally, the Flow Builder allows for more complex custom solutions, including the creation of screenflows, a useful tool when creating a payment solution using our Flow API.
While we recommend transitioning to Flow as soon as possible, we understand that many admins are more familiar with Process Builder. Below, we’ve included our considerations and examples related to automating Chargent using Process Builder. When you’re ready, use Salesforce’s ‘Migrate to Flow’ tool to transition your Process Builder automation to Flow.
Process Builder Capabilities #
Without writing code, Process Builder can accomplish the following tasks:
- Update the current record
- Update a related record in a lookup or master-detail relationship
- Create new records automatically
- Send email alerts
- Post to Chatter
- Submit a record for approval
- Launch a flow
- And More!
To learn more, check out Lightning Process Builder.
Considerations & Best Practices #
Feature Retirement
Salesforce Flow has replaced Process Builder. We recommend transitioning to Flow as soon as possible.
For more information, see Workflow Rules & Process Builder End of Support.
Order of Operations
Processes attempt to execute without awareness of other processes and procedures. To avoid problems, consider the interaction between Flow, Apex, Validation Rules, Workflows, and other processes.
For more information, see Considerations for Designing Processes.
Governor Limits
Process Builder is subject to governor limits in Salesforce. Always check Salesforce’s documentation for current limits:
Error Emails
When a process (or flow interview) fails, a detailed error email is sent to the admin who last modified the process or flow. If that admin isn’t the best person to read and act on the details of what was executed and what went wrong, you can choose to send error emails to the Apex exception email recipients, which you specify and control in Setup.
For more information, see Control Who Receives Flow and Process Error Emails.
Managing Multiple Processes
As a system’s dependencies grow, its complexity becomes harder to manage. It is often recommended to use some percentage of time (usually 10% – 20%) reworking or refactoring existing processes. See the following tips:
- Naming convention – Avoid unclear names
- Combine, collapse – Try to group conditions when possible to have one process instead of many
- Consistent design – Keep your design principles consistent
- Collaborate – Find effective ways to communicate with your team
Troubleshooting
Use the error messages that appear in the Process Builder and the emails you receive when a process fails to help solve problems that arise when you’re working with processes. When all else fails, look at the Apex debug logs for your processes.
The following is a common design problem that causes processes to fail:
- The process references a field that hasn’t been set. For example, you reference [ChargentOrders__Transaction__c].Order.Opportunity in your process. If the Opportunity lookup field isn’t set on the Chargent Order, the process fails because it doesn’t know which Opportunity to reference.
The workaround for this issue depends on where the reference exists in the process.
- If you reference it in filter conditions, add another filter condition that checks whether the lookup field is set. You can do the same workaround if it’s referenced in a formula, for example, [ChargentOrders__Transaction__c].ChargentOrders__Order__r.Opportunity__c Is null False.
- Otherwise, consider making the field required.
To learn more, check out Troubleshoot Processes.
Best Practices
When designing your Process Builder automation, we recommend following these best practices:
- Plot your business logic on paper or on a chart prior to creating your Process Builder automation.
- Revise existing components if needed. Something that worked last week may not work with the new requirements you just received, and it may need to be brought into the scope of what you are working on.
- Always avoid unnecessary recursion and infinite loops within logic and strive for simplicity.
- When you replace a Workflow Rule or Apex Trigger with Process Builder automation, deactivate the workflow rule or trigger before you activate the process. Otherwise, you can get unexpected results, such as overwritten records or redundant email messages.
To learn more, check out Best Practices for Designing Processes and Salesforce Process Builder Best Practices.
Process Builder Examples #
Chargent is a flexible application that makes payment processing easy to manage, but every organization has different needs and complexities in its design. With Salesforce providing organizations with special features that can be enabled that are not common in every instance, tailoring an application to fit every process isn’t realistic. This is why Process Builder can help you fill those needs by automating actions that are unique to your organization.
Below, we have included Process Builder recipes designed to help you automate actions unique to your organization. As such, the following recipes represent an example of what can be done using Process Builder in Chargent. Custom automation is generally considered outside the scope of Chargent’s support.
Process Recipe #1 – Chargent Anywhere with Person Accounts Enabled
Person Accounts store information about individual people by combining certain account and contact fields into a single record. Is important to know that after Person Accounts are enabled in Salesforce, it can’t be disabled. If you haven’t enabled Person Accounts and are considering this option, we recommend that you read Considerations for Using Person Accounts before you decide.
Use Case: For Chargent Anywhere’s Payment Console to work properly with person accounts enabled, you will need to create an automation using Process Builder. This automation will update Person Account related contact’s Mailing Address with Person Account Billing Address when record is created.
Complexity Level: Beginner
Requirements: Chargent Anywhere Installed & Configured, Person Accounts Enabled
Instructions:
- Go to Setup
- In the Quick Find box type: Process Builder
- Click on Process Builder
- Click on New
- The following screen will appear, requires input. See image below for reference.

- After you are done with this screen, click Save.
- Choose Object and Specify when to start the process. See image below for reference.

- Click [Save].
- Name and Define Criteria for this Action Group. See image below for reference.

- Click [Save].
- Add Action and Select Action Type: Update Records
- Give Action a Name
- Select Record Type: Record related to the Account
- Click on Drop Down and Type: Contact ID
- Select Contact ID
- Define Action. See image below for reference.

- Click [Save].
- Activate Process.


Don’t forget to run Mass Update to update all Contacts Mailing Addresses. You can use tools like Dataloader.io to update existing records.
Process Recipe #2 – Paid Amount to Related Object
The Paid Amount is the total amount paid towards the full amount due.
Use Case: Chargent Orders has a field called Total Transactions that captures this amount but some companies want to see this amount on a related object to see at a glance how much has their customer paid towards the full amount. An example would be using this field to verify if the deposit has been paid toward a Reservation, this will allow the agent to continue with the booking process.
Complexity Level: Beginner
Requirements: 1 Custom Currency Field in the Opportunity object and Lookup Relationship to Opportunity Object. (if you are using Chargent Anywhere in Opportunity this relationship has been already created)
- Object: Opportunity
- Create New Field
- Data Type: Currency
- Field Label: Paid Amount
- Length: 16
- Decimal Places: 2
- Default Value: 0
Important Information: This automation is to be used for one Chargent Order with One or Multiple Transactions, Multiple Chargent Orders Will break this automation. This is great for recurring billing and verifying if the initial deposit amount has been met.
Instructions:
- Go to [Setup]
- In the Quick Find box type: Process Builder
- Click on Process Builder
- Click on [New]
The following screen will appear, requiring input. See image below for reference.

After you are done with this screen, click Save.
- Choose Object and Specify when to start the process. See image below for reference.

- Click [Save].
- Name and Define Criteria for this Action Group. See image below for reference.

- Click [Save].
- Add Action and Select Action Type: Update Records
- Give Action a Name
- Select Record Type: Record related to the Chargent Order
- Click on Drop Down and Type: Opportunity (or any other related object)
- Select Opportunity
- Define Action. See image below for reference.

Click Save.
- Activate Process.


Process Recipe #3 – Most Recent Transaction Response
The Most Recent Transaction (MRT) is the most recent transaction related to opportunity.
Use Case: To allow Sales Agents to Immediately identify an Opportunity record with a payment issue. Also, they will be able to create actionable list views to easily find the Opportunities that need attention.
Complexity Level: Beginner
Requirements: 2 Custom Text Fields added to the Opportunity Object
- MRT-Response Message
- MRT-Response Status
Action Delay Trick: if you would like to delay automation for less that an Hour Create the following Custom Formula Field to use in the Automation.
Note: This is not an exact science so delay may take less or a bit longer time but is the best workaround for short delays.
- Object: Transaction
- Create New Field
- Data Type: Formula
- Field Label: 55 minutes ago
- Formula Return Type: Date/Time
- Formula:
Now() – (55/1440) |
Instructions:
- Click the gear icon and choose Setup
- In the Quick Find search and select: Process Builder
- Click on [New]
The following screen will appear, requiring input. See image below for reference.

- Click [Save].
- Choose Object and Specify when to start the process. See image below for reference.

- Click [Save].
- Name and Define Criteria for this Action Group. See image below for reference.

- Click [Save].
- Under Scheduled Action Set Time for Action to Execute, See image for reference.

- Click [Save].
- Add Action and Select Action Type: Update Records
- Give Action a Name
- Select Record Type: Record related to the Transaction
- Click on the Drop Down and Type: Order
- Select Order
- On the Second Drop Down Type: Opportunity
- Select Opportunity
- Define Action. See image below for reference

- Click [Save].
- [Activate] Process


See Also
Automating Chargent
Automating Chargent With Flow
Troubleshooting Automation and Validation Rules