Wednesday, May 16, 2018

#629 OIC integration with Eloqua via REST adapter

The OIC Eloqua adapter is currently rather limited in its functionality

Essentially you can create -
Fusion Leads
Purchase History as well custom objects

From an OIC perspective, this is only outbound to Eloqua.

So how do I get Contact data from Eloqua?
I have covered this in a post from 2016, but some things have changed.

Using the Eloqua REST API

The Eloqua API docs are here

BTW - I usually try the calls out in Postman, before configuring the REST requests in OIC.

The first step is to determine the base URL - 


That is, the base URL of the REST request, in other words, to which Eloqua server will I be sending this request.

Line 15 contains the base url - in my case,

Now I want to get a particular contact from Eloqua - key is the Eloqua Contact ID.

Here is my contact in Eloqua -

As you can see, the ID value is CMK11000000000016

I only need the 16, for the get contact REST request.

To get all contacts -


Now I want to search for a contact based on the email address, which is essentially unique in Eloqua.
Note: In the screenshot above, you see that the property - name - contains the email address.

My REST call is as follows -''&depth=complete&count=100

So what do these parameters mean?

search - my search criteria. I can search on any Contact field/property.
depth - possible values - minimal (only a small nr of properties returned)
partial - all properties of the contact returned, as well as the minimal properties of related objects
complete - everything
count- max nr of records to be returned

The full description of the search option is here

Now to my REST request -

For curl, use:
curl --user "yourCompany\yourUser:yourPwd" --request GET -k

I added the -k to avoid SSL certificate verification

Ok, that works fine, on to the OIC integration.
A simple scenario here- the integration will create a contact in Eloqua via the OIC Eloqua adapter.
Hoowever, there will be a pre-req check where I leverage the Eloqua to check whether the Contact
already exists within Eloqua.

I create the REST connection in OIC -

My Eloqua connection is already there -

I create an orchestration -

The Trigger is REST.

I then add the call to Eloqua to check if the Contact already exists -

Note: I will use "minimal" depth.

Here is the first draft of the integration - only testing the REST request -

The Mapping is as follows -

Here is the SWITCH condition -

I now test the OIC integration, using Postman -

I now execute the same request with a new email address -

I now add the logic to create the new account.
I could use the Eloqua adapter, but, as this post is concerning direct use of the Eloqua REST API,
I will use it.

The mapping is as follows -

Below is the return mapping from the OIC integration.
As you can see, I am returning the current status of the contact from Eloqua -

I test as follows -

No comments: