0% found this document useful (0 votes)
37 views

Lab: Sync Closed To PCS

The integration synchronizes closed incidents from Service Cloud to PCS. It uses an orchestration with a schedule trigger to query for unsynced closed incidents using a ROQL query. For each closed incident, it updates the incident in Service Cloud to mark it as synced and invokes a service in PCS to update the corresponding record, without waiting for a response. Tracking is created to monitor start time.

Uploaded by

ngr333
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Lab: Sync Closed To PCS

The integration synchronizes closed incidents from Service Cloud to PCS. It uses an orchestration with a schedule trigger to query for unsynced closed incidents using a ROQL query. For each closed incident, it updates the incident in Service Cloud to mark it as synced and invokes a service in PCS to update the corresponding record, without waiting for a response. Tracking is created to monitor start time.

Uploaded by

ngr333
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Lab: Sync Closed to PCS

Summary
Create an integration to synchronize Service Cloud with PCS.
 Integration
o Type: Orchestration
o Name: Sync Closed to PCS
o Package: hol
o Trigger: Schedule
 Invoke
o Connection: ServiceCloud
o Name: QueryUnsyncedIncidents
o Operation: ROQL Object Query
o Query
select incident from incident
where incident.StatusWithType.Status.Name = 'Solved'
and not incident.CustomFields.ICSPCS.SynchedPCS
 For Each
o Name: LoopOverClosedIncidents
o Repeating Element QueryObjectsResponse->Incident
o Current Element Name: CurrentIncident
 Inside For Each
o Invoke
 Connection: ServiceCloud
 Name: MarkSynced
 Operation Mode: Single Operation
 Operation Type: CRUD : Update
 Selected Business Object: Incident
o Map MarkSynced
 CurrentIncident.Incident.ID.id -> Update.Incident.ID.id
 CurrentIncident.Incident.IncidentCustomFields.ICSPCS.SynchedPCS = true
o Invoke
 Connection: SOAP PCS Warranty Claim
 Name: UpdatePCS
 Operation: serviceRequestCompleted
 No Response
o Map UpdatePCS
 CurrentIncident.Incident.ID.id -> serviceRequestId
 Create Tracking
o startTime
Create New Integration
From the Integrations screen.

Click New Integration.

Choose Orchestration.
Enter the integration name as Sync Closed to PCS and put it into a package hol.

Add Invoke
Open the INVOKES tab.

Expand the Oracle RightNow link and select ServiceCloud.

Drag the ServiceCloud onto the line between the schedule icon and the terminator.
Call the invoke QueryUnsyncedIncidents and proceed to the next screen.

Choose the ROQL operation type. Choose QueryObjects. Enter the following ROQL statement.
select incident from incident
where incident.StatusWithType.Status.Name = 'Solved'
and not incident.CustomFields.ICSPCS.SynchedPCS
Test My Query to verify the query works.

Verify the settings.


Verify the result and complete the wizard.
Remove Initial Map
Click the map to bring up the context menu.

Select the icon to delete the map.


Confirm the delete.

Add For Loop


Expand the ACTIONS tab.
Drag the For Each after the Invoke.

Call the For Each LoopOverClosedIncidents and drag the Incident onto the Repeating Element
and name the current element name CurrentIncident.
Add Invoke to Mark Incident Synched
From the INVOKES menu drag Oracle RightNow ServiceCloud inside the For Loop.
Call the invoke MarkSynced.

Select Business Object Incident and set the Operation Type to CRUD Update.
Review the settings.

Rearrange the View


You can drag the elements of the orchestration to make it easier to view.
Map Request Data
In the integration canvas. Bring up the map menu.

Choose the to edit the map.


Perform the following mappings
 Incident.ID.id -> Incident.ID.id
 Incident.IncidentCustomFields.ICSPCS.SynchedPCS = true

Add Invoke to Notify PCS


Drag Invokes SOAP PCS Warranty Claim inside the For Loop and after the previous Invoke.
Call the invoke UpdatePCS.

Choose operation serviceRequestCompleted and leave other settings at default.

Choose No Response.
Verify settings.

Map the Request


In the integration canvas. Bring up the map menu.
Choose the to edit the map.

Perform the following mappings


 Incident.ID.id -> serviceRequestId
Creating Tracking

From the Integration Canvas select the Tracking icon.

Track the startTime.


Save the tracking. The integration should now show 100%

Save and exit the Integration

Activate the Integration


Activate the integration by selecting the slider .

Test the Integration


Select the menu item Submit Now.

Check that it has been submitted.

Schedule the Orchestration


Click on the menu item for the integration.
Choose Add Schedule.
Select Frequency Only Once.

Choose the Hours and Minutes.


Select a 1 hour schedule.
To avoid over committing the resources do not save the schedule.

You might also like