Lab: Sync Closed To PCS
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.
Choose Orchestration.
Enter the integration name as Sync Closed to PCS and put it into a package hol.
Add Invoke
Open the INVOKES tab.
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.
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.
Choose No Response.
Verify settings.