Database to Salesforce Integration
Last updated
Last updated
DBSync for Database To Salesforce Integration is an easy to use solution. It integrates Database with Salesforce objects like accounts, contacts, products, opportunity & opportunity line items.
This tutorial shows how to read various records from Database and write to the respective mapped objects of Salesforce . The table below shows the data flow between tables from Database to Salesforce objects.
The data flow may be different for each implementation. The following table is just one of the examples.
The process map for the Database To Salesforce solution is as shown in the image below.
The integration prerequisites are as follows:
Have valid licenses to DBSync Salesforce, Database Connector and Username and Password to connect with DBSync iPaaS platform.
Have Salesforce login and password to access their Web Services.
Setup security in Salesforce to connect to external integration.
Have a valid database Username, Password, host/IP address and Port on the hosted database.
· The Username and Password configured for Database Connector instance should have sufficient privilege to access the database required for integration.
Follow the steps below to get started with a database and to configure the database connector.
The table below gives the required, and optional, parameters to be set for establishing a connection of database and to write various tables as chosen in the relevant workflows.
Click Save to save the parameter settings:
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.
sqlserver
oracle
mysql
postgresssql
db2
access
Yes
Database URL
JDBC connection string
SQLServer: jdbc:sqlserver://[hostname]:[port];databaseName=[databasename]
Oracle: jdbc:oracle:thin:@[hostname]:[port]:[sid]
mySQL: jdbc:mysql://[hostname]:[port]/[databasename]
PostgresSQL: jdbc:postgresql://[host]:[port]/[database]
DB2: jdbc:db2://[host]:[port]/[database]
Access: jdbc:[databasename]
Yes
Follow the steps to configure the DBSync's Salesforce Connector:
Click Edit on the Salesforce connector to input Salesforce parameters.
Click Save to save the settings.
The table below 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 Salesforce.
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
For the sake of understanding, we have chosen the MySQL database with tables like Contacts, Customers, Items, Oppheader, and Opplineitem. Data from the database is sent to a configured Salesforce instance. You can download the SQL script from the download script link. Then, import the table structures into your MySQL database if you have the same integration requirement listed in the tutorial.
Log in to your DBSync account.
Once logged in, click on the template library menu from the left side navigation.
Create a project for salesforce and database.
Navigate to the Connector listing of the Salesforce To Database.
In the Connector listing page, you can see Salesforce and the database Connector.
Individual Connector configurations are explained in the subsequent sections.
Navigate to the flow page for mappings.
Various transformations can be applied to each field through the mapping section. Then, save the workflow.
Click the 'Run Now' button to initiate the integration of the selected workflow.
The sync can be monitored through the log section in the event of an error. You can also drill down to each event log to debug and fix the error at its occurrence.
Integration can be run using a scheduler or by clicking on the 'Run Now' button. Scheduler jobs are used to trigger processes at scheduled time intervals automatically. On the other hand, manual triggering of the sync can be initiated by clicking on the 'Run Now' button from the process listing page/workflow page.
Scheduler
To create a scheduler job, follow the steps below.
Inside a Project, navigate to the Scheduler page from the left side navigation.
From the 'Add schedule section,' create a schedule job. Select the process from the drop-down menu, then choose start on date, start on time, and repeat frequency. Save the job.
If repeat frequency is set to no repeat, then the scheduled job triggers syncs only once - as per the scheduled date and time.
If repeat frequency is set to either minutes, hourly, or weekly, then the process is scheduled to run at the repeated set frequency.