Data Sync – On-Premises Lead Management Systems and Salesforce

As businesses develop, the amount of critical information they spawn and store grows as well. Data migration or data sync is important, making it crucial for businesses to have the proper tools to do so.

This blog explains an implementation scenario where the data related to leads needs to be synced between SFDC and legacy Lead Management Systems (two of them on-premises) in both directions.

  • From SFDC to Legacy Lead management systems and
  • From Legacy Lead Management Systems to SFDC
In summary, here is what we want to achieve:
  1. Connecting Legacy Lead Management System 1 having MySQL as DB to SFDC (Salesforce)
  2. Connecting Legacy Lead Management System 2 having Oracle as DB to SFDC (Salesforce)
  3. Connecting SFDC (Salesforce) to both Legacy Lead Management Systems
Architecture of our applications is presented in the following two diagram:

Synching Legacy Lead Management systems to SFDC

Here is a description of the first two flows:
Flow 1
  • This flow receives data from both Legacy Lead Management Systems, it will then transform and then push to Salesforce.
  • This flow uses database adapter to get updated records from Legacy system 1 and a queue adapter to get updated records from legacy system 2 (through an ActiveMQ queue).
Flow 2
  • This flow fetches the changed records from Oracle DB and pushes it to the ActiveMQ queue

Synching SFDC to Legacy Lead systems

Here is a brief description of the remaining flows:
Flow 3
  • Salesforce connector will be used to get new, updated records from Salesforce which are then published as persistent messages on two topics i.e. Leads from USA and International leads.
Flow 4
  • Contains a JMS adapter with durable subscription to the topic, after getting the data it updates the MySQL DB
Flow 5
  • Contains a JMS adapter with durable subscription to the topic, after getting the data it updates the Oracle DB

Best Practices:

Some of the best practices followed are mentioned below:
  • Relied on making reusable components and broke flows into various sub-flows and flows to make them maintainable, reusable and scalable.
  • Gave values in the form of variables in property files so that we do not need to change it everywhere in the code, just need to change once and changes are applied everywhere.
  • MUnit is also applied to ensure validation.
  • Did not rely on MuleSoft default exception handling and provided our own custom exceptions.
  • Proper logging was done to ensure proper debugging
  • Meaningful names were given to flows and sub-flows to ensure consistency and better readability
  • Applied security vaults and the properties are given were encrypted so that no one can see the information. This feature we will explain a bit in detail next.

How to Encrypt Property Files/Applying Security Vaults:

  1. Separate all your configurations in property file in the form of variables.
  2. In the toolbar, go to Help, select Install New Software from the drop down.
  3. Write Mule Security Module in the Work with box
  4. Install all the security modules.
  5. Now right click on the property file, from the drop-down select Open with and from the drop-down select, Mule Properties Editor.
  1. When we double click on each property and we will be able to see something like this:
  1. Once we click on encrypt, we will be able to see this menu:
  1. Select Algorithm and Key and click OK.
  2. That’s it, we have successfully encrypted the properties.
  3. Now to add them in your application, Go to Global Elements, click on Create.
  4. In the filter, write Secure Property Placeholder
  1. Fill the boxes according to the configuration required
  1. We have successfully encrypted property files and associated them in our application.

Royal Cyber can help you sync data across SaaS services such as Salesforce and on-premises systems in lesser time. Here we demonstrated the capability using MuleSoft but we can also help you achieve this objective using other solutions such as IBM App Connect, Dell Boomi etc. We can make businesses to interact with valuable information seamlessly. For more information about this custom solution built, email us at [email protected] or visit

Leave a Reply