Thursday, October 29, 2015

#452 - Useful post on JWT (JSON Web Tokens)

What with all this REST enablement, JWT knowledge is essential.

check out this blog post  here

Tuesday, October 20, 2015

#449 ICS - Using the REST adapter

Here is a simple scenario, I will use the ICS REST adapter to connect to a service on Sales Cloud.

Introduction


Here is the URL from Sales Cloud -

https://mySalesCloud:port/crmCommonApi/resources/latest/accounts?onlyData=true&fields=OrganizationName&orderBy=OrganizationName&limit=200&q=OrganizationName%20LIKE%20Ni*

Essentially, I want to select all sales accounts whose names begin with "Ni".

I test this request in Postman -

























As you can see, I get 11 hits.
I save the output to a file, for further use.

Create the REST adapter Connection in ICS














The REST URL is set https://mySalesCloud:port/crmCommonApi/resources/latest

I test the Connection -














Create the Integration

Here is the final result -









Configure Target (using above connection)






























Note: I add /accounts as the relative URI



I specify GET
I add parameters
I configure the response (I will use the file I saved, as the basis)

Here are the parameters - 
These are taken directly from the Sales Cloud REST URL.



I base the response on the output file I saved earlier.
In the creation wizard I selected response is JSON, based on a sample file.
I uploaded the output file and a schema is generated.


That's it.

Configure Source



Request Mapping


















Response Mapping




















Testing with SOAP-UI


I add my credentials and test -
























Now I amend the request as follows -

I add the request parameters -










I change the resource to /accounts and test -





















voilĂ 

Monday, October 19, 2015

#447 ICS Pre-Builts for Sales Cloud / Service Cloud Integration

To quote the ORCL docs -

In the integration, accounts and contacts from Oracle Sales Cloud can be synchronized with organizations and contacts in Oracle Service Cloud. This synchronization is executed using Oracle’s Integration Cloud Service as the backbone for mapping and information exchange.

Got it?

This release of pre-builts covers the syncing of following objects
in Sales and Service Cloud.

Sales Cloud                            2          Service Cloud
----------------------------------------------------------------
Event: AccountCreated         --> CreateOrganization
Event: AccountUpdated        --> UpdateOrganization
Event: ContactCreated          --> CreateContact
Event: ContactUpdated         --> UpdateContact

Service Cloud                          2          Sales Cloud
---------------------------------------------------------------
Event: OrganizationCreated   --> CreateAccount
Event: OrganizationUpdated  --> UpdateAccount
Event: ContactCreated            --> CreateContact
Event: ContactUpdated           --> UpdateContact

How is it Packaged?


These integrations are packaged into, yes, a package.
This package also includes default Sales Cloud and Service Cloud
connections.

So the modus operandi is -
1. import the package
2. configure the 2 connections (Sales & Service) to point to your instances.
3. examine the integration data mappings (the fields synced).
3.1. change the mappings as required.


Eventing


Sales and Service Cloud can now support eventing on the aforementioned 
business objects. The ORCL doc details what configuration needs to be done
on both SaaS apps. 

As an example, lets look at Service Cloud -
You just need to set the following variables -




































EVENT_NOTIFICATION_ENABLED needs to be set to Yes
This activates event publication.

EVENT_NOTIFICATION_MAPI_SEC_IP_RANGE can be set to limit
the ip addresses that can send messages to Service Cloud.

The Credentials for incoming requests are set via the following -

EVENT_NOTIFICATION_MAPI_USERNAME
EVENT_NOTIFICATION_MAPI_PASWD

This must be a bona fide Service Cloud user.

EVENT_NOTIFICATION_SUBSCRIBER_USERNAME
EVENT_NOTIFICATION_SUBSCRIBER_PASWD

This must be a bona fide ICS user.

That's it! Very simple.

Now lets look at the ICS Package -

ICS Pre-built Package





























The above screenshot shows 5 of the 8 pre-packaged integrations.
The naming convention -

OSC - Oracle Sales Cloud
SVC - Service Cloud

Lets look at the Contact sync integration between Service Cloud and Sales Cloud -
SVC_OSC_Contact_Created

Firstly, the connections -

The Connections

Sales Cloud -
















Yes, I have obfuscated the urls somewhat.
Main takeaway here is that we specify an Event Catalog URL for sales cloud.
You can imagine that this catalog contains events such as ContactCreated etc.

The events catalog url format is as follows  -
YourSalesCloud.crm.yourdataCenter.oraclecloud.com/soa-infra

Service Cloud -

Here you do not need to specify an Event Catalog URL -
















The Integration






























Lets look at the Source -




















































The event chosen is Contact Created
The event is published
Finally, the Contact on Service Cloud is updated with key of the Contact
that has just been created on Sales Cloud.


Enrichment -









Here we have the opportunity to enrich the data before creating the contact in Sales Cloud.

Note the Sales Cloud icon above.

So what are we doing here?
An example could be to do a lookup of a sales account, using the organization ID of the
Service cloud contact.















Note, the service has not been set.
i.e. This is a placeholder, included for your specific use.

Here is the default data mapping for this enrichment step -


The Data Mapping outbound






































So lets test this -

Test the pre-built

Create a new contact in Service Cloud -



Validate in Sales Cloud -




 


















There he is!

and here is his address in Sales Cloud -








ICS Monitoring












#448 ICS - REST API















Note, the 4 sections -

  • integrations
  • lookups
  • monitoring
  • packages

Integrations

Here we can manage integrations, this includes -
  • activation
  • deactivation
  • export an integration
  • import an integration (add/replace)
  • retrieve integration(s)
















Example -









Here I retrieve all Integrations -

https://myICSInstance/icsapis/v1/integrations


























Here is the REST request to retrieve a specific integration -

https://myICSInstance/icsapis/v1/integrations/SVC_OSC_CONTACT_CREATED/01.00.0000

Note: The instance is shown in ICS as -








But for this request, we use the "code" value.


Export an Integration

https://myICSInstance/icsapis/v1/integrations/SVC_OSC_CONTACT_CREATED/01.00.0000/export

If you want to test this in Postman and see the results, then do so as follows -



Then check out the downloaded file -



Monitoring











REST Request: 
https://myICSInstance/icsapis/v1/monitoring/integrations

Here is the data for my simple StockQuote integration -






































As you can see, I have a 100% success rate.

Packages










Retrieve Packages example -

https://myICSInstance/icsapis/v1/packages







Yes, I have obfuscated the urls.

Here the REST api call returns the contents of my package -


The last line of the response includes the package name.


Lookups





ORCL doc here