Historical Sync
  • 01 Feb 2024
  • 2 Minutes to read
  • Dark
    Light

Historical Sync

  • Dark
    Light

Article summary

Introduction

If you were a Stripe customer before coming to Blackthorn Payments, you may want to sync your Payment Gateway Customers, Payment Methods (Cards and Bank Accounts), and Transactions (payments) from Stripe to Salesforce.

During the sync, if the Payment Gateway Customer email matches a Salesforce Contact's Email, the matching Contact will be populated on the Payment Gateway Customer's Contact lookup field.

If the Payment Gateway Customer's email matches with more than one Contact record Email, the Payment Gateway Customer's Contact lookup field will not be populated.

Blackthorn Payments has no Contact creation logic.

Related record matching on 4.163 and beyond

We no longer have hard-coded matching based on email and first name. Matching is now handled using your active Salesforce Duplicate Rules. Click here for more information.

If you want a Contact record created, either create/update the Salesforce Contact record with the same email from Stripe. Do this before syncing/creating a Process Builder to create a Salesforce Contact when the Payment Gateway Customer record is created in Salesforce.

The sync process is only to migrate your records from that moment backward. Syncing Stripe with Salesforce going forward can be done through Webhooks, but you should not be originating records outside of Salesforce.

Syncing Historical Customers and Payment Methods

  1. Navigate to the Payment Gateway record that you want to sync.

    Lightning/Classic: Payments (Admin) App > Click the "Payment Gateways" Tab

  2. Select the "View All" option.

  3. Click on Payment Gateway record you want to sync.

  4. Click the Sync with Stripe button at the top of the page (Classic User Interface) or the blue drop-down arrow in the top right (Lightning User Interface).

  5. Select from 3 different tabs. (Core, Billing, or Connect)
    G_04 historical sync pic 1

  6. Choose a date/time range for the data sync by entering values in the From: and To: fields, if applicable.
    G_04 historical sync pic 2

  7. Click the button for the object you'd like to sync.
    G_04 historical sync pic 3

  8. A message will appear letting you know the process has started.
    When using this function, there are no "undo" calls, so be careful with your button click. If you want to make sure everything comes over correctly, sync a short amount of records before syncing them all.
    G_04 historical sync pic 4

If you have a lot of records (10,000+), click the Sync button and let it run all night.

Syncing Historical Transactions

Once your Customers and Payment Methods have completely synced over, sync your historical Transactions.

If you want to sync all your Transactions from Stripe, click the Sync with Stripe button. If you only want to sync records from a certain date(s), enter the date(s) in the From: and To: fields.

Upon completion, the Source field on each Transaction will be set to "Sync".

When using this function, there are no "undo" calls, so be careful with your button click. If you want to make sure everything comes over correctly, sync a short amount of records before syncing them all.

Historical Apex Job

  • To monitor each Historical Sync, navigate to Apex Jobs.

Lightning/Classic: Setup > In Quick Find, Search and Click: "Apex Jobs".

  • The Apex Class is called "PaymentGateway_SyncBatchable".

G_04 historical sync pic 5

Click Abort next to the "In Progress" job if you need to cancel the job.