Accounts and contacts are the backbone of Salesforce, allowing you to quickly identify relationships between your customers and their related records from a central location. Chargent uses lookup relationships to Salesforce’s standard Account and Contact objects to help you easily match your Chargent records with your accounts and contacts. While these fields are not required, we recommend populating Chargent’s Billing Account and Billing Contact lookup fields wherever possible to ensure high-quality data.
What are Chargent’s Account and Contact Fields? #
Chargent respects that all your customer data may already exist in Salesforce. That’s why Chargent’s Billing Account and Billing Contact lookup fields are on more than one object Chargent object.
Chargent Order Lookup Fields
The Chargent order record is the backbone of Chargent and includes the Billing Account and Billing Contact lookup fields. Your payment process determines the source of the account and contact information, as outlined in Populating Chargent’s Account and Contact Fields. If the Payment Method Default field on the Chargent Order record is changed, the Billing Account and Billing Contact lookup fields on the Chargent Order will update to match the lookup fields on the payment method.
Chargent Payment Method Lookup Fields
The Billing Account and Billing Contact fields on the Chargent Payment Method object allow you to associate a payment method with a specific customer. When a new payment method is created, these fields are automatically populated based on the Billing Account and Billing Contact fields of the Chargent Order record associated with the charge.
Additionally, Chargent uses these fields to detect duplicate payment methods. If the account and contact fields are not populated on the payment method record, the record will not be included in duplication checks. Duplication Management is automatically enabled in your payment method settings. Visit Payment Methods Duplication Management for more information.
Populating Chargent’s Account and Contact Fields #
When submitting payments through Chargent, account and contact information is provided to the Chargent Order’s Billing Account and Billing Contact fields based on how the payment was initiated. When first generating a payment and creating a new payment method, the account and contact information are populated on the Chargent Order record and copied to the Chargent Payment Method record. Conversely, when updating an existing Chargent Order’s payment method or creating a Chargent Order using an existing payment method, the account and contact information will be copied from the Chargent Payment Method record to the Chargent Order record.
The following sections describe the source of the account and contact information for each of Chargent’s payment features when a new Chargent payment method record is created.
Payment Console
The account and contact information are populated on the Chargent order record based on the Billing Account and Billing Contact lookup fields API Names in the Chargent Anywhere configuration. The account and contact information are then copied to the Chargent payment method record. The example below shows Chargent Anywhere configured on the Opportunity object.
Payment Request
There are two possible sources for account and contact information, depending on whether the Contact is populated in the Payment Request window.
- If the Contact is not populated in the Payment Request window, the account and contact information are populated on the Chargent order record based on the Billing Account Lookup Field API Name and Billing Contact Lookup Field API Name in the Chargent Anywhere configuration. The account and contact information are then copied to the Chargent payment method record after the customer makes a successful payment via the payform by clicking Pay.
- If the contact is populated in the Payment Request window (as shown below), the contact and the contact’s related account are populated on the Chargent Order based on the contact chosen. The account and contact information are then copied to the Chargent payment method record after the customer makes a successful payment via the payform by clicking Pay.
Take Payment Component
The Take Payment component is designed to be added to your community, allowing authenticated users to save their payment methods for use at a later time. The account and contact information are populated on the Chargent Order record based on the community user’s contact record and associated account. The account and contact information are then copied to the related Chargent Payment Method record.
Chargent Buttons
If you use the action buttons on the Chargent order record, such as the Charge button, the account and contact information are copied from the Chargent order to the Chargent payment method record.
Batch Processes
When a batch process creates a new Chargent payment method record, the account and contact information are copied from the Chargent order to the Chargent payment method record.
API Parameters
The API (Apex, Flow, REST) also includes parameters for passing the account and contact values to the Billing Account and Billing Contact fields, allowing your developers to use these object relationships when building their custom configurations. See our developer documentation for more information.
Considerations and Best Practices #
Maintaining quality data is vital to your business. Consider the following best practices to improve the quality of your data in Salesforce.
Migrating Custom Lookup Field Data
If you’ve created your own custom lookup relationships to Accounts or Contacts on the Chargent Orders object, we highly recommend migrating the data to Chargent’s Billing Account and Billing Contact lookup fields to take advantage of Chargent’s automated processes and duplication management. This can be accomplished using a custom flow, trigger, or by using the Data Loader. Remember to update any custom configurations or code referencing your old custom lookup fields, including flows, Apex Triggers, etc. You can update records in Salesforce in many ways. For instructions on updating a large number of records at once, see Salesforce’s Data Loader Guide.
Ensure Your Lookup Fields Match
Chargent automatically populates the Billing Account and Billing Contact fields on the Chargent Payment Method object after you have activated and enabled Payment Methods. However, it does not check for these fields to match with the same fields on the Chargent Order. We recommend customers who were part of Chargent’s Payment Methods Pilot Program update the Billing Account and Billing Contact fields on the Chargent Order using the values in those fields from the Chargent Payment Method.
You can update these values by repopulating the Payment Method Default field on the Chargent Order record, automatically updating the Billing Account and Billing Contact fields. You can also use the Salesforce Data Loader.
See Also
Chargent Order Fields
Payment Methods Fields
Setting Up Payment Methods
Payment Methods Duplication Management