Scribe Makes Integrations Easy
Scribe Software (now a Tibco product) allows integrations to be built easily, using an easy-to-use web interface and no custom programming.
Join the DZone community and get the full member experience.
Join For FreeWhen Tibco recently decided to acquire software as a service (SaaS) provider Scribe Software, they had a vision to further expose the cloud-based integration service that provides a codeless approach to integrating systems.
Since I have worked in the integration space for a large portion of my career in Information Technology, I thought I would create an article to demonstrate how easily Tibco Scribe can be used to integrate two applications.
The Source: MySQL
In this example, let’s assume the source data for our integration is stored in MySQL. The source system has the ability to capture end-user information. In our example, this information is sought by Sales team members to attempt to introduce existing customers to additional products available for purchase. The Sales team merely wants a first name, last name, company name, and email address so that they can reach out to clients from the source system.
To mimic this request, I created a very simple MySQL database with the following design:
CREATE TABLE contacts (
id INT,
firstName VARCHAR(50),
lastName VARCHAR(50),
email VARCHAR(50),
companyName VARCHAR(50),
created DATETIME,
updated DATETIME
);
Then, I loaded a few records into the table to simulate data:
INSERT INTO contacts (id, firstName, lastName, email, companyName, created, updated) VALUES (1, 'John', 'Smith', 'jsmith@example.com', 'Smith & Sons, Inc.','2018-08-01 11:17:00', '2018-08-01 11:17:00');
INSERT INTO contacts (id, firstName, lastName, email, companyName, created, updated) VALUES (2, 'Jane', 'Doe', 'jane.doe@example.com', 'Doe Bread Co.', '2018-08-01 15:17:00', '2018-08-01 15:17:00');
INSERT INTO contacts (id, firstName, lastName, email, companyName, created, updated) VALUES (3, 'Jose', 'Miller', 'jmiller3@example.com', 'Miller, LLC', '2018-08-02 8:17:00', '2018-08-02 8:17:00');
INSERT INTO contacts (id, firstName, lastName, email, companyName, created, updated) VALUES (4, 'Tim', 'Doe', 'tdoe@example.com', 'Doe Construction', '2018-08-03 10:17:00', '2018-08-03 10:17:00');
INSERT INTO contacts (id, firstName, lastName, email, companyName, created, updated) VALUES (5, 'Rick', 'Jones', 'rick.jones@example.com', 'RickCo', '2018-08-04 11:17:00', '2018-08-04 11:17:00');
INSERT INTO contacts (id, firstName, lastName, email, companyName, created, updated) VALUES (6, 'Sam', 'Johnson', 'sjohnson@example.com', 'Johnson Brothers, Inc.', '2018-08-05 12:17:00', '2018-08-05 12:17:00');
Once loaded, the database table appears as shown below:
The Target: Salesforce
In this example, the Sales team utilizes the Salesforce platform to manage their sales cycle. The request is that all the MySQL data will flow into Salesforce as new Leads. In the event that the data is updated, a shared key needs to exist between MySQL and Salesforce.
In my example, I created a custom field called MySQLId__c
and placed it on the lead. The other fields (first name, last name, company name, and email address) in the database will map to the corresponding fields in Salesforce.
Remember, this is a simple example.
I created an All Leads view in Salesforce, which included the MySQLId__c
field:
Scribe Agent and Connections
With the source and target set, we are ready to start using Scribe. The first thing I needed to do was to establish a Cloud Agent in my Scribe instance. This was pretty quick and easy:
Next, I needed to create Connections for MySQL and Salesforce. Since my example MySQL database is running in Amazon RDS, I was able to use the Cloud Agent (vs. an on-premises Agent) for the MySQL Connection which I called "Account Data."
Of course, the Salesforce Connection (called "JV Sandbox") could use the same Cloud Agent too.
Scribe Solution and Map(s)
Next, a Scribe Solution needs to be created.
Think of the Solution as a master container for a bunch of integrations. In our example, we will have only one integration, but we could add more if needed. I called my Solution "Create Accounts in Salesforce."
The integrations are referred to as Maps and I created a new Map of Integration called "Create/Update Leads" which will handle querying MySQL and adding/updating records into Salesforce as Leads.
The Scribe Solution includes a Trigger section, which determines when the Solution will be run. The two basic options are On Demand and Scheduled. For this example, we will simply use On Demand.
Create/Update Leads Map
Opening the new Map, I see some basic building blocks for my integration.
Next, I added the MySQL Connection (Account Data) to the flow, which gave the following building blocks:
Finally, I added the Salesforce Connection (JV Sandbox), which expanded the block section as shown below:
Using the blocks, I was able to create the following flow, where I begin with a simple MySQL query into the contacts table.
For each result in the table, I execute the following steps:
- Check to see if I can locate a Lead in Salesforce which contains a match for the
MySQLId__c
field that I use to keep the two records in sync. - If the Lead exists, I check to see if any of the metadata has been updated in MySQL.
- If the data in MySQL has been updated, the Lead is updated and the next record is processed. Otherwise, the record is skipped.
- If the Lead is not found, I create a new Lead record and persist the information into the Salesforce database.
Once all of the query results have been processed, the Map ends.
Below is a screenshot of the Solution ready to run:
When I used the Run button, the Solution was executed without any issues. Below is a screenshot of the execution history for this simple integration.
Final Result: Salesforce
Navigating to Salesforce and the All Leads view, I can now see all the records from MySQL are in Salesforce, ready for the Sales team to utilize.
Conclusion
In this example, there was zero coding required as part of the integration between MySQL and Salesforce. With the options used in this example, a Basic instance of Scribe could be utilized - at a very reasonable rate of $400/month.
In my next article, I will dive deeper into Scribe, showing how the Scribe Variables and Scribe Platform API connections can be used for more advanced flows...again, not requiring any custom code to implement.
If you have a need to integrate two systems, Tibco Scribe should be on your short-list of products to evaluate — especially if the solution can be written without having to utilize any custom code; code that seems to require more periodic updates than expected when initially designed.
Have a really great day! Let me know your thoughts in the comments section.
Opinions expressed by DZone contributors are their own.
Comments