Sunday, September 25, 2016

Data Driven Integration Framework


Data Driven Integration Framework: Scalable, Re-usable approach for systems Integration

Scenario: On Premise Application Integration with Salesforce.com

Why?

  • Eliminate code redundancy for multiple integration syncs between systems
  • Leverage for future integration between systems
  • De-coupling the change management between systems
  • Productivity


What?
  • A Script Interpreter Framework which is used to read the integration script definitions (curl calls) stored in a data store for performing the integration calls using the real time data
How?
Use Case/Example:
Automation of syncing contact information from an “On Premise Application” to “Salesforce CRM” for a given account without leveraging any salesforce connectors/tools for Salesforce.

Flow:
When the contact sync event is triggered from the “On Premise Application” the following steps needed to be performed:
1> Find the “Account Record Id in Salesforce CRM” with the “Account Name” field in the “On Premise Application”. If not found create it.
2> Find the “Contact Record Id in Salesforce CRM” with the “Contact Email Address” field in the “On Premise Application”. If not found create it.
3> Find if the record exists in “Account Contact Role object” in Salesforce CRM. If does not exist then insert.
4> Repeat the steps (2 and 3) for “multiple contacts” sync for the given account.

What is the one of the simplest solutions can be using “Standard Salesforce Rest API”?:
1> Write 6 curl statements by sending the necessary data from the On Premise Applications.
2> Use a loop in case of multiple contacts.

Challenges with the above solution:
1> The code is not re-usable/scalable as code needs to be changed whenever field API name changes, new object integrations etc.

How “Data Driven Integration framework” can solve some of the above changes?
1> Create a XML based configuration or a data store with the following attributes:
  1. Event name
  2. Step Sequence #
  3. Step Name
  4. Dynamic Script
  5. Alternate Script
  6. Operation Type (Get/Set/Insert/Upsert/Delete)
  7. Transaction Type (single/multiple)
2> Develop a “Script Interpreter” that Reads the configuration, interprets and executes the integration calls.
In the above example the configuration will look as follows: