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 -

No comments: