Chargent Orders with Opportunities
In many instances customers want to the ability to allow payments to be managed from Salesforce Opportunities. Since the Salesforce Opportunity object is designated to manage potential deals for a Sales team, we recommend using the Chargent Orders object to manage payments to ensure financial requirements can operate independently of sales process requirements and validations.
Payment sources and transactions are still on the same screen, just on the Chargent Orders related list. This provides more flexibility from a Salesforce architecture perspective, ensuring that validation rules, required fields and other features commonly used on the Opportunity do not interfere with the processing of financial transactions. More importantly, it allows more flexibility in how the Org uses Opportunities and Chargent Orders for their respective functions -- deal flow and payment processing.
You will need to create a lookup field which allows you to tie the Opportunity and Chargent Orders objects together so that you can easily create your Chargent Order and view related Chargent Orders from an Opportunity.
Connecting with a Lookup Field
In order to connect Opportunities and Chargent Orders, you will need to create a lookup field in Salesforce. Once you create the lookup field, you will be able to create a new Chargent Order directly from the Opportunity and also add Chargent Orders as a Related List to the Opportunities Page Layout. You can then view Chargent Order related data right from the Opportunity.
- Setup > Objects and Fields > Chargent Orders > Fields & Relationships
- Create New Custom Field by Clicking New
- Select Lookup
- Choose the Object you want to Look up (Opportunities)
- Name the field
- Follow the steps to complete the Lookup field
Once the Lookup field is created you can then add the Chargent Orders to the Page Layout of the Opportunity.
- While in the Opportunity click on the Page Layout option.
- Select Chargent Orders under Related Lists and drag it into the Related Lists section of the Page Layout.
- Click the wrench icon next to the Chargent Orders Related List to pull up options to include in the view for the Opportunities Page Layout.
- Save Page Layout.
You can now create a new Chargent Order from the Opportunity and view the details from the Order under Related Lists.
Moving Data between the Objects
Generally the Amount from the Opportunity can be copied to the Total field on the Chargent Order. This can be done manually or via a custom trigger.
If you enable the checkbox Copy Billing Address from Account under the Chargent Settings tab, Advanced Settings, then when a new Chargent Order is created, the Billing Address will automatically be populated based on the values in the Account Billing Address fields.
Using Chargent Orders with Opportunities.
Once you have your Lookup field created and added the Related List to the Page Layout, the process is the same as creating a Chargent Order except you can do this now straight from the Opportunity. (Keep in mind Lightning allows you add a section to the Page Layout or add it as a Related Tab on the Opportunity).
The following fields are required in order to process a charge
- Payment Method
- Charge Amount Field with the Manual Charge box checked
- Billing Information (If your payment gateway requires Address Verification)
- Credit Card information
If you are looking to setup Recurring Billing you would also need to populate the Payment Start Date, Frequency, and set the Payment Status to Recurring. This includes one time payments made to be processed at a time in the future.
Once you have these fields set you can save the record. You can now Charge or Authorize from the Chargent Order and the status and details will be viewable from the Opportunity.