If you previously stored your data in another payment system or need to move your data from one Salesforce org to another, Salesforce allows you to quickly and easily migrate your payment data into Chargent’s objects and fields. We recommend that all data migrations be performed by someone familiar with migrating large amounts of data in Salesforce. You can migrate your data using any standard migration tool, such as Salesforce’s Data Loader.
Before Migrating Your Data #
You can transfer your customer data and payment information from another payment system by exporting it from your old system and importing it into Salesforce. Before migrating your data, install the latest version of Chargent and configure your user permissions. Guides for these topics are available below to help you get started:
- Installing and Updating Chargent
- Assigning Chargent Licenses (Production Only, not required for Sandbox)
- Assigning Chargent Permissions
Note: We always recommend installing and testing Chargent in a sandbox before installing it in your production environment.
Next, it is essential to understand Chargent’s data model and import your data in a specific order based on object relationships (similar to importing account records before importing contacts or opportunities).
Additionally, all records in Salesforce, such as accounts, contacts, Chargent orders, and transactions, are defined by a unique record ID. This prevents you from importing Bob Smith’s payment information into another Bob or Robert Smith account. To properly prepare relational data for import, we recommend matching the old record IDs in your import file with the newly created record IDs in Chargent.
Review your exported data using a spreadsheet tool like Microsoft Excel or Google Sheets. This way, you can check the data for strange characters or unusual data types before importing.
Check with your gateway to see if you require specific payment data, like CVC. At the very least, if you want to process payments via an imported Chargent order record, you’ll need to import a token, complete credit card information, or complete bank account information.
Note: Before moving into production, we recommend testing your migration with small batches of less than ten records in a sandbox environment.
Understanding Chargent’s Data Model
We recommend familiarizing yourself with Chargent’s data model prior to migrating your payment data. A data model is the architecture of your data elements (like fields) that shows how each is related. Fields are stored on objects such as Salesforce’s accounts and contacts or Chargent’s orders and transactions. Before migrating your payment data into Chargent, review Understanding Chargent Architecture to determine how your data fits within this data model.
Data Migration Use Cases #
Migrating Payment Data From One Chargent-Enabled Salesforce Org To Another
The first use case for migrating data into Chargent occurs when moving transaction data from one Salesforce org to another. In this case, you can directly migrate all Chargent data from each Chargent object. You don’t require custom fields or need to consider any mapping challenges during your migration.
To begin migrating your Chargent data from one Salesforce org to another, your import must create a Chargent order and one or more related transactions.
To migrate all your Chargent data from one Chargent installation to another, follow these steps:
- Run a complete Salesforce backup and export all the data from your original Salesforce org.
- Import all your Chargent order data into the new Salesforce org.
- Export all the new Chargent order IDs from the new Salesforce org. Map these new Chargent orders record IDs with the appropriate child records in your import files for the remaining Chargent objects, such as transactions, email notifications, tokens, gateways, etc.
- Import additional child Chargent object data, matched with each Chargent order parent record.
Migrating Chargent Data From Another Non-Chargent Payment System
The second use case for migrating data into Chargent occurs when migrating payment data from another non-Chargent system. In this case, you only need to focus on populating data in the Chargent order and transaction records. Chargent will automatically create all related child records when you begin processing transactions.
If applicable to your implementation, we recommend creating new custom fields to store any data specific to your previous payment system that does not directly map to Chargent’s out-of-the-box fields. Review Chargent’s data model to determine if your previous payment system includes data you want to import as legacy information. For example, you can create a custom field for your legacy system to store the record ID from the old system and select “External ID” for that field so that it is indexed.
To migrate all your existing payment data into Chargent, follow these steps:
- Create custom fields for any legacy data you want available in Salesforce that does not belong in any Chargent field. For example, this can be the record ID for your legacy system to use as a reference. Ensure this custom field has an “External ID” so that Salesforce indexes it.
- Map all the legacy data to a Chargent field or custom field in your import file.
- Import all your Chargent order data into the new Salesforce org.
- Export all the new Chargent order IDs and map them to the appropriate child records in your import files for the remaining Chargent objects, such as transactions, email notifications, tokens, gateways, etc.
- Import all the other child Chargent object data, matching them with each order parent record.
Migration Order #
Many objects in Salesforce have a parent-child relationship. This means that one parent account record can have many child contact records. When importing the data in these related objects, Salesforce recommends importing them in a specific order so that the record IDs for the parent exist to associate with the correlating child records. For example, Salesforce recommends doing data imports to these objects in this order:
- Accounts
- Contacts
- Opportunities
- Cases
Chargent has a similar architecture with objects that have a parent-child relationship. We recommend importing Chargent object data in the following order:
- Chargent Orders
- Transactions
- Account Updater Logs (when migrating from one Chargent-enabled Salesforce org to another)
- Email Notifications (when migrating from one Chargent-enabled Salesforce org to another)
- Payment Requests (when migrating from one Chargent-enabled Salesforce org to another)
With your historical and recurring Chargent Orders and Transactions imported, all related objects will be created and updated automatically as you begin taking payments using Chargent.
Migrating Recurring Transactions #
Recurring billing requires a bit more care so that you won’t have any interruptions in billing or duplicate charges. When migrating recurring billing details, you must include payment information and recurring billing options. The fields that need to be populated on the Chargent Order object to ensure charges occur on the next scheduled date are as follows:
- Payment Start Date – This is extremely important. Ensure this is the date of the following transaction; otherwise, it could be picked up in the batch and processed sooner than expected. This field also updates and automatically populates the Next Transaction Date field.
- Payment Status – This needs to be set to “Recurring” to be processed in the batch.
- Frequency – This tells the batch how frequently the transactions should be processed (Annually, Monthly, Weekly).
- Token – If you are using tokenization, you should be able to run a report at your gateway and import this data into the Token field.
If Payment Methods is enabled in your org, Chargent will automatically create a payment method record once the next recurring payment is processed.
Chargent uses past transactions and their gateway date to calculate the next date a transaction should be processed. We recommend loading data into the Chargent Transactions object and making sure you set these field values:
Field Name | Value |
---|---|
Gateway Date | Time of transaction |
Response Status | “Approved” |
Type | “Charge” |
Amount | The amount of the transaction |
Recurring | “True” (if applicable) |
For more information, see Setting Up Recurring Billing.
Migrating Tokens #
We recommend migrating your tokens if you are using tokenization. If you are not using tokenization, please remember that Chargent doesn’t store the CVC (Credit Card Verification Code) because doing so could increase the scope of your PCI compliance. If you are migrating data into Chargent using the same gateway, you will only require the token to collect additional payments from an existing customer. If your gateway requires the CVC and you are changing gateways, you must obtain the payment information and generate new tokens. Please contact your gateway provider for options regarding token migration between gateways.
Migrating Payment Methods #
If you have enabled Chargent Payment Methods, you don’t need to migrate your payment information as a Chargent payment method record. Chargent payment method records are automatically created when your gateway processes a charge or authorization. To avoid duplicate payment methods, see Payment Methods Duplication Management.
Testing Your Migration #
After your data migration, you can search and retrieve your customer information within Salesforce. Run several reports to validate your record counts, verifying that all the data was imported correctly. Review any error logs from your import to determine why any records failed the import process. Often, it means you need to correct a data type or unfamiliar character and attempt to import them again.
In data migration, you should only turn off the old system once you have properly tested the migration. In many cases, running the old and new systems in parallel for a short time is recommended. Look for a successful batch of transactions processed as part of Chargent’s Recurring Batch to ensure your recurring transactions work as they should.
Getting Help #
Data migration can become complex, especially when dealing with large amounts of data or custom configurations. AppFrontier works with several partners who are data migration and payment systems experts. Please see our Partners page for more information. If you need assistance, we are happy to refer you to the best implementation partner for your business needs.
Next Steps #
Now that your data migration is complete, you can finalize your payment process and prepare to go live with Chargent!
See Also
Data Loader
Testing Chargent
Chargent Quick Start Guide
Chargent Transaction Fields