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:
.png)
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.

Great post Trey! Thanks for highlighting a key component of Informatica Cloud Summer 2011. I also think there's some cool possibilities with Chatter integration and the REST API. Here's a link to more information about the latest Informatica Cloud release that your readers might find useful:
http://www.informaticacloud.com/products/323-summer-11-whats-new.html
There is also a very active Informatica Cloud community site here:
https://community.informatica.com/community/products/informatica_cloud
Darren Cunningham
Hi,
I am now trying to perform a data integration job using salesforce and informaticaondemand. I have a functionality in salesforce which uses webservice integration and sends data to an external application which has oracle database. The external application takes the infomation by a webservice call from salesforce and creates an account in the external system and stores the data in the oracle database. A different team in our company used this external application and keeps making changes to it.I have a realtime integration with InfomaticaonDemand which updates these changes to the salesforce system using RestAPI. We want to create a button in salesforce on the account page so that when the button is clicked the account number is sent to informaticaOndemand and it gets applied to the datafilter dynamically and then the update job runs in informatica and it updates only that single account in salesforce. Can we send parameters to data filters dynamically through Rest API?
I have used this article to create the data integration. the article uses a trigger but I have used the code in a button .
Bharath
Hi Bharath,
You can’t pass parameters directly yet via the Informatica Cloud REST API, but there might be a couple of workarounds to this. You could build a filter on the Informatica Cloud job to only pick up new records since the last time the job was run (in this case the last time the button was clicked) or alternatively, you could build a controller behind your button which also flags the current record which can then be used as part of a combined filter in your Informatica cloud job.
Trey Roldan
Hi,
Thanks for that reply. I want to know if we can call Task Flows by using this callout. Is there any change I need to write in this part code.
OrderIntegration.runJob('username@email.com','Password123','OrderFulfillment','DSS')
I think I need to change DSS to something. I need this part of the code to start Task Flows for me
I appreciate your help.
I just like the valuable info you provide on your articles. I’ll bookmark your weblog and check again right here frequently. I’m somewhat certain I’ll be told lots of new stuff proper right here! Best of luck for the next!
Trey, Its very much straight forward. Thanks. I have one doubt, whether is it possible, if we update any record in external system that update should be triggered and those change made in salesforce in real time.