Wednesday, March 22, 2017

#554 ICS 17.1.3 --> using FOR loop

A simple example here - we will iterate thru incidents retrieved from service cloud.

Here are the incidents in Service cloud for our customer - Hare of the Dog Pub.

The For Each loop -
allows repeated steps to be performed and multiple invokes to be made within the loop.

Now to the implementation -
Here I use the Orchestration pattern in ICS.

I will use a REST interface to trigger the process.
Parameter is simple the orgName.

Then the following ROQL query to retrieve the unresolved incidents for a particular customer.

Select Incident from Incident Where = '&orgName' and StatusWithType.Status.Name = 'Unresolved'

My orchestration now looks like this -

I map as follows -

I then add the For Loop -

I call the For Each - LoopOverUnresolvedIncidents,  and drag the Incident onto the Repeating Element and name the current element name CurrentIncident.

I have created a process in PCS, that will allow a CSR to process the unresolved incidents -

I will call this from the loop -

First, I create the WSDL based SOAP connection in ICS -

I then leverage it in the orchestration -

I do the mapping, leveraging CurrentIncident -

I map the final process response -

I activate and test -

Thursday, February 23, 2017

#553 ICS 17.1.3 --> Lifecycle management - Test 2 Production

To begin with, how do I create Dev, Test and Production environments in ICS?

Let's take a simple example of a customer who needs to integrate Sales and Service Cloud.
This is currently their only requirement in respect of ICS.

So they need 2 connections * 3 for the different environments.
Therefore all they need to do is purchase 6 connections and then create 3 instances,
each with two connections.

ICS user management can keep the users separated between the environments.

So now to a simple example of Test 2 Production.

Let's begin with the following integrations -

As a best practice, put related integrations into the same package -

This allows me to export/import the integrations as a unit.
The 2 integrations above include a REST and a RightNow adapter.

The export will include the Connections and the complete Integrations.
Once imported the connections need to be updated with the Security & Endpoint information.
Just imagine, you are moving from Test to Production - these values will be different.
However, if the connections already exist in the Production system, then they will be used.

So what are the steps?

1. Export from Test

2. Import into Production

3. Configure the Connections (if necessary)

4. Activate the Integrations

Steps 1 and 2 can also be done via the REST API.


GET /icsapis/v2/packages/{packagename}/archive
In my case,

Test in Postman -

I then unzip the file -


POST /icsapis/v2/packages/{packagename}/archive
In my case,

Tuesday, February 21, 2017

#552 ICS 17.1.3 - Javascript Libraries

Javascript Libraries

Here is my simple JavaScript code -

Now I want to leverage this in a mapping in ICS.

With version 17.1.3 (Early Update Enabled) we can import JavaScript libraries.

Here I import my .js file -

I specify that it will be used in Orchestrations - I also
specify the data types (String) of the input e.g. the ISO code IE and the
output - Ireland.

Now, use this in an Orchestration - for this I use the Callout activity.

Select the js function for use in the Callout -

Configure the input - I set it to the countryCode from my input.

Now, I just re-sequence the Callout, placing it before the Map for the RightNow createContact.

I now do the mapping for the RightNow createContact -

Note the availability of the Callout response in the Source panel.

I also map the country to the Title attribute in the RightNow contact.
I am doing this so that it is visible in the first screen

I map the response from RightNow -

Simple stuff!

I test -


I check in RightNow

Wednesday, February 8, 2017

#551 PCS 17.1.3 leveraging ICS

Now we have even tighter integration between PCS and ICS. Together they provide us with an unbeatable process and integration platform.

Let's start with a simple example -

Here is my ICS process - all it does is create an organization in Service Cloud.

Now to PCS - I can "register" my ICS environment in Workspace (Administration - Services).

Now to my process - this is a simple order process. The order comes from an organization.
A confirmation email is sent to the Org email address, once the order has been approved.

Now I want to call my ICS process to create the organization, once the order has been approved.

Now I can browse for my integration process on ICS -

Here it is -

I do the Data Associations for input and output -

I resequence the "approved" activities - I also configure the email body to include
the Org Id returned by Service Cloud.

Now to the deployment -

Note: Security is Username Token

I test -

Track -

Check in Service Cloud -

I check my email -