Trey Roldan's Blog

Real Time Integration with the Informatica Cloud REST API - May 10, 2011 at 1:05 am

You can follow Trey Roldan on Twitter.

Informatica has added long awaited real time integration capabilities in their latest summer release. Their cloud integrations are no longer bound by scheduled jobs, they can now be called in real time as needed. The latest release incorporates a full-featured REST API that seemingly performs as a cloud integration bus for outside SaaS platforms.

Here are a few examples of how real time integration might be used:

Obtain a customer number from an outside system when a prospect is converted to an account

Send sales information to a data warehouse enabling real time analytics

Send an order to a warehouse for real time order fulfillment

The benefits of this new capability are endless. Real time means there is no time lapse or waiting, critical integrations can occur instantaneously without a reliance on batch schedules.

In this post I will be demonstrate a real time integration originating in Salesforce.com which will call an Informatica job to send closed opportunities (orders) to a warehouse for fulfillment. We have an existing Informatica integration called OrderFulfillment that we want to call in real time via a Salesforce trigger:

The first step is to create an Apex class to call the Informatica REST webservice. For this we have created an Apex Class called OrderIntegration. We have defined the class to run asynchronously to help prevent callout timeouts. Note that the query below is based on a pre-release version of the Informatica REST API, some of the parameters may change in the final release. We are using the standard HttpRequest class to call out to the Informatica REST service. As we are attempting to submit a job for processing, we will be doing a POST calling runjob which allows us to run any IoD integration job remotely.

public with sharing class OrderIntegration {

    @future (callout=true) 

    public static void runjob(String username, String password, String jobName, String jobType) {

        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http(); 

        req.setEndpoint('https://app.informaticaondemand.com/saas/api/1/runjob');
        req.setMethod('POST');
        req.setBody('username='+EncodingUtil.urlEncode(username, 'UTF-8')+
                           '&password='+EncodingUtil.urlEncode(password, 'UTF-8')+
                           '&jobName='+EncodingUtil.urlEncode(jobName, 'UTF-8')+
                           '&jobType='+EncodingUtil.urlEncode(jobType, 'UTF-8')); 

        try {
            res = http.send(req);
           }
           catch(System.CalloutException e) {
            System.debug('Job Error: '+ e);
            System.debug(res.toString());
        } 

    } 

}

Next, we will need to add the Informatica remote endpoint to our remote sites from within Salesforce. This will enable our callout to access the third party site:

Setup -> Security Controls -> Remote Site Settings

Finally, let's create a trigger on the opportunity object to call the integration each time a new opportunity record is created. Note that we have left out any business logic or integration transformations in our Apex code — all of the heavy lifting is done by the existing Informatica job. There are four parameters passed to our method, our IoD username & password, the job Name (the name of the Task), and the job type (DSS is equivalent to Data Synchronization Service).

trigger realTimeIntegration on Opportunity (after insert) { 

    for (Opportunity o : Trigger.new) {
        OrderIntegration.runJob('username@email.com','Password123','OrderFulfillment','DSS');;
    } 

}

That's it! We've used Informatica's new REST API to quickly create a real time seamless integration between Salesforce.com and our order fulfillment system. I'm looking forward to this and many other great features of Informatica's summer release which will be available at the end of May '11 http://www.informaticacloud.com/products/323-summer-11-whats-new.html.

Integration 2.0 – One Is The Loneliest Number - February 8, 2011 at 8:50 pm

Integration has always been the unseen yet critical driver for any platform implementation. One truly is the loneliest number, especially when it comes to standalone SaaS platforms. Integrate 2, 3, 4 platforms to the mix and then you have something – a consolidated 360 degree view of your business.

As business units continue to expand their SaaS infrastructure without restraint; there is an increased risk of losing a consolidated view of the business. Greater visibility across systems leads to better decision-making. Age-old traditional integration challenges emerge – how can datasets of disparate systems be combined into a single view without a substantial investment?

Integration is no longer just the act of taking data from Oracle (or a 20-year-old AS/400) and lifting it into the cloud. It now involves a much broader landscape – the cloud ecosystem as a whole. From platforms like Salesforce, Twitter, Facebook, GoodData, Zuora, Quora the extensions of SaaS data silos have become overwhelming!

Integration 2.0 frees customers from the limits of traditional RDBMS platforms such as Oracle, SQL Server and MySQL. These platforms are ubiquitous in the enterprise integration landscape. Integration 2.0 focuses on something much broader and open: a vehicle for true Cloud-to-Cloud data disbursement through open cloud APIs.

Today’s innovative Integration 2.0 providers are focusing on open marketplaces to offer countless platform endpoints that integrate with existing platforms. Informatica’s Marketplace has 100’s of pre-built cloud solutions allowing customers to integrate anything from Salesforce to Twitter without requiring developers to become experts on either APIs.

SnapLogic has introduced “Snaps” – connectors enabling countless cloud integration options from Salesforce.com, Box.net, Twitter, Kiva.org. Yes – you could theoretically read a file from Box.Net containing micro-donations and drive these submissions to Kiva.org (a grant website) as needed via their point and click integration tool. The possibilities are nearly endless when it comes to bridging multiple cloud platforms.

Open marketplaces are driving community efforts to fully map the cloud ecosystem by way of abstracted integration – think LEGO building blocks. Pick and chose the blocks you need to build your integration solution. The emergence of these marketplaces defines Integration 2.0. Open community built connectors with a rapidly expanding list of cloud platforms. Developers would be hard pressed to keep up with the emerging number of new cloud platforms – Integration 2.0 solves these challenges ensuring that no cloud platform is left standing alone.

Hopefully this reveals some of the possibilities when it comes to cloud-to-cloud integrations. Costly custom development is no longer the only answer for bridging clouds. In future blog posts I will be exploring some of the exciting Integration 2.0 apps showing the speed at which an integrated view of the business can be achieved.