Page tree
Skip to end of metadata
Go to start of metadata

Overview

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. 


Data Flow

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.


Process Map

The process map of the solution - between Salesforce and database - is as shown in following image.


Prerequisites For Integration

The integration prerequisites are as follows:

  • Have valid licenses to DBSync Salesforce, Database Connector and Username, 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 which database is hosted.
  • For integration, it is required that the Username and Password configured for Database Connector instance should have sufficient privilege to access the Database.


Configuring Source App

Follow the steps to get started with your Salesforce instance and to configure the DBSync's Salesforce Connector: 

  1. Click Edit of the Salesforce Connector to input the Salesforce parameters.
  2. Click Save to save the settings.

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

https://www.salesforce.com/services/Soap/u/32.0

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

Configuring Target App

Follow the steps to get started with a Database and to configure the Database Connector.

  1. The following table gives the required, and optional, parameters to be set for establishing a connection to the Database and write to various tables selected in the relevant workflows .
  2. Click on save to save the parameter settings.
PropertyDescriptionRequired
UsernameDatabase usernameYes
PasswordDatabase passwordYes
HostHost name or IP address of the database serverYes
PortThe port used to connect to database serverYes
DatabaseThe name of your databaseYes
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

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.

DBSync Project Setup

  1. Login into www.mydbsync.com. Click on Customer Login.
  2. Enter your DBSync Username and Password. Click on Login.
  3. Once logged in, click on template library menu from the left side navigation.
  4. Search for template name Salesforce To Database: uni-directional template and import to your workspace.
  5. You will be re-directed to Connector listing of the Salesforce To Database: uni-directional template.
  6. In the Connector listing page, you can see Salesforce and Database connector.
  7. Click Edit to configure Connectors respectively. Individual Connector configuration are explained in the subsequent sections.
  8. Navigate to the Process listing page to view the pre-defined mappings.
  9. The various transformations can be applied to each field through the mapping section. Then, save the workflow 
  10. Click 'Run Now' button to initiate the integration of the selected workflow.
  11. The sync can be monitored through the log section. In the event of the error, you can drill down to each event log to debug and to fix the error at its occurrence.


Guide Lines For customization And Mapping

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.

Run Integrations

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.

Scheduler 

Follow the steps to create a scheduler job:

  1. Inside a project, navigate to the Scheduler page from the left side navigation.
  2. From the 'Add schedule section' create a schedule job. Select the process from the drop down then choose start on date , start on time and repeat frequency. Save the job. 
  3. If repeat frequency is set to no repeat then, the scheduled job triggers syncs only once - as per scheduled date and time.
  4. If repeat frequency is set to either minutes, hourly, weekly then, the process is scheduled to run at the repeated set frequency.

Run Now 

To manually trigger the sync, click 'Run Now' button:

  1. From the process listing page.
  2. From workflow listing page.
  3. From the Trigger page.


Related References

Salesforce Connector

Database Connector

Scheduler

  • No labels