SK SKYVVA Documentation

How to Synchronize MySQL Database Data Using an Inbound Interface via a Scheduler?

Introduction

This tutorial will guide you on how to synchronize the data from the database and push it to salesforce. For the database, we can select the data from the table or we can use the Stored Procedure to push the data into Salesforce. On the Salesforce side, We do any operation such as upsert, insert, and update or use the custom class when the business logic is complex that is something available already in the SKYVVA solution. MYSQL database is used for example to retrieve data from the existing records in the database and it located on EC2 instance. Pre-requisites:-

How to do synchronize database data using an inbound Interface?

In this case, we need a scheduler to synchronize data from the database into Salesforce. The scheduler will fetch the database record based on the value put on Database Query in Interface. Step-1: Create Integration and test connection destination. Create new Integration by following the guide, Link is given below. #article/what-is-an-integration-and-how-to-create-it

Step-2: Create an Inbound Database Adapter on the new Agent Control Board

* on EC2, make sure you have allowed MYSQL port 3306 on Group Policy for connectivity from other system.

Step-3 Generate Message Type from the database

Note: For Select operation, we have a template for generating Message Type for a single Table -  Create a root Message Type with the prefix “Database_” + “Table’s name” within type as “Database Table Template” -  Create two Message Type as a child of the root with the fixed name. The first one is “Request”, type as “Database Request”. And the other one is “Response”, type as “Database Response” -  Under “Request”, create a Message Type as the child. The Table’s name is used for this Message Type within type as “Database Table”. i.e:  tbl_account_db_atn. In this Message Type, was generated the field name like on Table -  Under “Response”, create a Message Type as the child with the fixed name “records” within type as “Plain structure” -  Under “records”, create a Message Type as the child. The Table’s name is used for this Message Type within type as “Plain structure”. In this Message Type, was generated the field name like on Table Step 4: Create Interface

Agent scheduler will be generated after the user clicks the Scheduler tab.

Note: If the machine has a small memory, we should not set the time for running every 1 minute because it will block another job. Running every 10 minutes or more is a good recommendation.

The time that we define here, is the time on the server that is Agent running.

Open this article in the interactive viewer →