OIC - SalesForce Adapter - Trigger

Up until recently we would need to generate a Salesforce (SF) Enterprise WSDL in order to create a connection in OIC. That is no longer the case, it's extremely easy to set this up :)

Create a SF Connection


I have a SF developer instance. Interesting to note that the OIC Connection wizard for SF only offers 2 instance types - Production and Sandbox. My developer instance credentials only work with the Production type.

Apart from that you just need your SF credentials and the API version (which you can find inside your SF instance)

And that's it!
And now you may ask...but how does this work for a Trigger? Well, that requires some configuration in the SF side, and on top of that, we may get several WSDL's depending on how many business objects we configure. But the OIC team came up with a smart approach which does not require changes in the SF Connection. Let me show you the process.

Configure SF for Business Events (Trigger)

Create an Outbound message in the SF Setup. This is how we start defining the framework that will deliver real time events from SF to the outer world.


Select the desired business object


Select the desired attributes



The URL takes a dummy value to start with - we will return here later to store the correct endpoint, which will be an OIC Integration URL.

The next step is to define a rule that will trigger the outbound message.



My rule is triggered whenever a new Lead with Country=Portugal is created (or edited)


We need to associate the rule with the outbound message.


Last step is to Activate the rule


Finally you will store the Endpoint WSDL (required for OIC)




OIC - SF Integration


Create an App Driven Integration to receive real time events from SF (for new leads).
When you drag the SF adapter as a Trigger, you are asked to provide the Outbound Message WSDL. In this way there is no need to change the SF Connection - we provide the details during design time.


We can also define a callback or response.  

The summary page alerts you that there are some extra steps (SF side) required in order to enable this Integration.
In this basic example, we receive a Lead from SF and store it in an FTP server.
As mentioned before we need to go back to SF to finalise the configuration of the Outbound Message. All details can be found here.

Grab the Endpoint URL after you activate the Integration.


In SF, replace the earlier dummy URL with the OIC Endpoint URL

TEST

Now we can put this to test. Let's create a new Lead with Country=Portugal (otherwise the rule is not triggered)


Immediately the OIC Integration is triggered

Inspecting the Payload we can see our newly created SF Lead being passed along to the FTP server.


Comments