Thursday, June 7, 2018

632 - VB CS --> Integration Connectivity with Autonomous Integration Cloud

again a very simple example to illustrate how easy this all is.
Firstly, I create a very simple integration to create a new org in Service cloud.
The logic will be very simple - check first if the org already exists, if it does - call a fraud service:
otherwise create the org.


























Note the new templates/styles.

I have a REST Trigger with the following payload -

















The response is as follows -














BTW. one nice new feature - the ability to create a new connection, from within an orchestration.











































Also note the new style action palette -


























Back to the orchestration, very simple logic -




I test the integration in Postman -


















Visual Builder Cloud Service


Now to VB CS -

First step is to create an application.




















I can create the following high level objects within an application -


Mobile UI

Web UI


Service Connections - to external services such as my integration


Business Objects - I will creating one of these for my Organization

Processes - OOTB integration with OIC Processes


Source Code View - for the js afficiandos among you



Service Connections -

I create a Service Connection to the Integration






























































I can click Test, after specifying Request, Response and Authentication (if required)




















Great, so now I have access to the Integration. I will leverage this later.

Business Objects - 


Now I create a Business Object for the new organization I want to create -


















I add fields -


















Note the pre-defined fields -


























Web Application -

Now to the app itself - I will create a web application














































Note the hierarchy above -
on main-start, I will display the existing organizations I have created.
From there I will navigate to a new page - Create Org. I will call the integration from this page.

I select main-start and now drop a list view on to the page, which is open in the designer

















Note the properties on the right - I open the Properties tabs













I click the QuickStart icon.
QuickStart does what it says - allowing me to quickly add data to the page.

As already stated, the Main page will simply list existing organizations.














As you can see from the screenshot above, I select the fields I want displayed.

Now I will add a page to create a new org - all I need to do is click Add Create Page









































I can click on the Live tab to test the page -

















looks good - so now I run the App - all I need to do is click the Run icon

































All that's left is to add the call to my integration -

Again, we will be leveraging the Service Connection previously created.
In this simple example, I will call it explicitly via a Button clicked event -















As you can see, I have added the Call Integration button, now to the event definition -














































I select the Call REST Endpoint option from the Actions list.

Configure as follows -


















So what I am doing here?
I need to set the body of the REST request.

The request expects the following fields -
orgName
contactFirstName
contactLastName
contactEmail

These are, of course, the fields I just entered on the Create page.

I can see these on the variables tab -





















The notation for accessing them is as follows -






That's it, let's run the app again -


























I check in Integration - Monitoring -

















What about the result from the integration flow?
It is designed to call my dummy Fraud service hosted on Apiary.
This is the response I have hard coded in the integration -















I create a new text box in my VB CS Create Org page -
As you can see, I have set the label to
Response from Integration -





















Now to processing the response - I need to do the following -
1. Define a page variable to hold the response
2. Define the response type at Action Chain Level
3. Set the page variable to the response (in this case, I just take the status field)
4. Set the text box value to the page variable

Define Page Variable -

I called mine responseStatus (String)




























Define Response Type -




















So where does this postCreateOrgServiceResponse come from?

Let's revisit the Service Connection definition -












 Set the page variable to the response -

I use the Assign Variables action here




































Set the text box value -

I address the variable as follows -
$page.variables.responseStatus
















I run the app -
























Great stuff!

Thursday, May 24, 2018

#631 OIC - VB CS calling Process Part 1

Very simple scenario here -

I create a new organization in a VB CS generated UI.
From this UI, I can kick off a PCS Process to approve the new organization.

It is very easy to create Business Object definitions in VB CS -















































the first 4 fields above are created by default (creationDate etc).


VB CS knows about the processes deployed in my AIC instance, in my case, only the one.





















Check out the configuration -






















Ensure you select the Runtime radio button.

VB CS provides for rich interaction with processes -
more about them later -


























I have created a form to create a new Organization -
















I have added a button to the generated form - Call Process - when clicked it should start a process instance -

Now to the action (button clicked) configuration -

























Now I simply drag and drop the Start Process Action -



























Now all I need to do is map the parameters -










































So succinct -




















Now to a simple test -




















Check in the task list -


























We can also display these tasks in VB CS - I have created a new page and now
drop in a List control

















Add Data to the list -





















Live Preview shows me the result -
















Check out the VB CS docs here

Chapter 7 covers Processes.


















Tuesday, May 22, 2018

#630 Autonomous Integration Cloud - the Value Add










The next iteration of our cloud based integration platform has been released recently.
Are we going to get another acronym - AIC? Let's wait and see.

But firstly, what are the deltas between the customer managed OIC and AIC?

OIC customer managed, means what it says - you are responsible for the environment, provisioning pre-requisites etc. You are responsible for patching, DB backup/recovery etc.

AIC is more like a SaaS experience, you just log in and use the stuff.


The screenshot above shows the context menu for my AIC instance.
As you can see, all I can do is use it; no weblogic console login, no enterprise manager login, no ssh.
I just use it, sure isn't that why I bought it?
I don't want to manage underlying infrastructure, I just need to integration my SaaS and on-prem apps.

From a functionality perspective there is 1:1 parity with customer managed OIC -



















The only component we have to wait for is Integration Analytics, which should be available soon.


Next great value add is pricing - check it out here


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 -
Accounts
Contacts
Fusion Leads
Opportunity
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 - 

GET https://login.eloqua.com/id 


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, https://secure.p03.eloqua.com

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 -

https://yourBaseURL/api/REST/2.0/data/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 -

https://secure.p03.eloqua.com/api/REST/2.0/data/contacts?search='name=abba@zabba.com'&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 https://secure.p03.eloqua.com/api/REST/2.0/data/contacts?count=2 -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 -