2022
DBSync for Salesforce and Database Integration is an easy to use solution. It integrates Salesforce objects like - Accounts, Contacts, Products, Opportunity & Opportunity line items. Salesforce to Database Integration solution is also useful to migrate historical Salesforce data into database. DBSync provides uni-directional sync with pre-built field-to-field mapping along with flexibility for more complex and dynamic mapping capabilities.
This tutorial shows how to read various records from Salesforce and write to the configured tables of a database. The table below shows the data flow between various objects of Salesforce and Database tables.
The process map of the solution - between Salesforce and database - is as shown in following image.
The integration prerequisites are as follows:
For integration, it is required that the Username and Password configured for Database Connector instance should have sufficient privilege to access the Database.
Follow the steps to get started with your Salesforce instance and to configure the DBSync's Salesforce Connector:
The following table gives the required, and optional, parameters to be set for establishing a Connection of Salesforce from which you can read the data and write to the Database of your choice.
Property | Description | Required |
---|---|---|
UserName | The username to log into salesforce account. | Yes |
Password | The password to login to salesforce account | Yes |
End-point | Yes | |
Sid | Session Id | Optional |
Transport.compression | For compression | Optional |
Proxy Host | If you use a proxy server then put <<proxy ip or host>> | Optional |
Proxy Port | If you use a proxy server then put <<proxy port>> | Optional |
Proxy Username | If you use a proxy server then put <<proxy username>> | Optional |
Proxy Password | If you use a proxy server then put <<proxy password>> | Optional |
Accept Gzip | As Applicable | Optional |
Send Gzip | As Applicable | Optional |
Follow the steps to get started with a Database and to configure the Database Connector.
Property | Description | Required |
---|---|---|
Username | Database username | Yes |
Password | Database password | Yes |
Host | Host name or IP address of the database server | Yes |
Port | The port used to connect to database server | Yes |
Database | The name of your database | Yes |
Type | JDBC Driver for the Databases mentioned in the URL section in the same order.
| Yes |
Database URL | JDBC connection string
| Yes |
For the sake of understanding, I have selected MySQL database with tables like Contacts, Customers, Items, Oppheader, Opplineitem in which data from Salesforce is dumped. In case if you do not have database schema readily defined, you can use auto create functionality of the Database Connector. This will create the table structure and mapping based on the source objects of SF.
The above mappings are not standard and vary based on implementation to implementation. The above table shows mapping when an auto-create functionality is used so that all the tables of database replicate the Salesforce objects.
Integration can be run using scheduler; or, by clicking on the 'Run Now' button. Scheduler jobs are used to trigger process at scheduled time interval automatically. Manual trigger of the sync can be initiated by clicking on the Run Now button from the Process listing page/workflow page.
Follow the steps to create a scheduler job:
Run Now
To manually trigger the sync, click 'Run Now' button: