When working with the Chargent Orders package, Salesforce records will be automatically created. Even though your record will be automatically created, you are still required to run the Salesforce connector prior to the Chargent connector in order for the charge to associated with that object. This is the same setup for all Chargent packages.
Working with Account Records
If you would like for the record created with the Orders package to be associated with an Account record, you will need to create, update, or look up the account in a Salesforce connector that runs before the Chargent connector.
If you do this, the account that is created or updated will automatically be associated with the charge (i.e. the Account field on the charge object will be set to the Account ID).
Working with Opportunity or Contact Records
Associating a charge with an Opportunity or Contact record requires some additional steps. For these records, you will need to set up the association in a Salesforce connector that runs after the Chargent connector, and you will need to use the form field aliases to associate the charge information to the record you want to work with.
When you add your Chargent connector to a form, hidden fields will automatically be added at the end of the form. You can find the aliases for these fields at the bottom of the notifications page for that specific form. We recommend that you submit a test response, and see which specific aliases are populated with values. These are the aliases that you will want to map in your connector. For example:
In the above example, you would only want to map the aliases for those fields that are actually being populated with values upon submission. The easiest way to do this is to count. So in the example above, the "Chargent Order Object ID" that is populated would be the second "Chargent Order Object ID" when looking at your alias page.
Once you have your aliases, you will need to open the Salesforce connector that is setup after the Chargent connector in the connector timeline.
You will then need to look up the Record ID field of the ChargentOrders__ChargentOrder__c record using the CHARGENT_ORDER_OBJECT_IDXXXX alias from the previous step. You will not want to use the alias for the similarly named Order ID, instead, you want the Order Object ID.
Once you map the Order Object ID, you will be able to look up the appropriate record created by the Chargent connector and can then map any additional fields you want to. For example: