Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

Lab: Create Service Request

Summary
Create an integration to create an incident in Service Cloud.
 Integration
o Type: Basic Map Data
o Name: Create Service Request
o Package: hol
 Trigger
o Connection: ServiceRequestSOAP
o Name: CreateServiceRequest
o Operation: create
 Target Invoke
o Connection: ServiceCloud
o Name: CreateIncident
o Operation Mode: Single Operation
o Operation Type: CRUD : Create
o Selected Business Object: Incident
 Map Request
o ServiceRequest.Subject -> Incident.Subject
o ServiceRequest.Customer -> Incident.IncidentCustomFields.ICSPCS.ContactEMail
o ServiceRequest.Product -> Incident.IncidentCustomFields.ICSPCS.Product
o ServiceRequest.Status -> Incident.StatusWithType.Status.Name
o ServiceRequest.ClosedPCS -> Incident.IncidentCustomFields.ICSPCS.SynchedPCS
o “Tom Riddle” -> Incident.PrimaryContact.Name
 Enrich Response
o Connection: ServiceCloud
o Name: Create Incident
o Operation Mode: Single Operation
o Operation Type: CRUD : Get
o Selected Business Object: Incident
o Processing Option: Get All Names
 Map Enrichment Request
o Incident.ID.id -> Incident.ID.id
 Map Enrichment Response
o Incident.ID.id -> ServiceRequest.ID
o Incident.IncidentCustomFields.ICSPCS.ContactEMail -> ServiceRequest.Customer
o Incident.IncidentCustomFields.ICSPCS.SynchedPCS -> ServiceRequest.ClosedPCS
o Incident.IncidentCustomFields.ICSPCS.Product -> ServiceRequest.Product
o Incident.ReferenceNumber -> ServiceRequest.ReferenceID
o Incident.StatusWithType.Status.Name -> ServiceRequest.Status
o Incident.Subject -> ServiceRequest.Subject
 Create Tracking
o ServiceRequest.Subject (Primary)
o ServiceRequest.Customer
o ServiceRequest.Product
 Sample Payload
<typ:CreateRequest>
<typ:ServiceRequest>
<typ:Subject>Mikey Mouse ears have fallen off</typ:Subject>
<typ:Summary>The ears of my Mickey Mouse mug have fallen
off</typ:Summary>
<typ:Customer>my.email@company.com</typ:Customer>
<typ:Product>Mickey Mouse Mug</typ:Product>
<typ:Status>Unresolved</typ:Status>
<typ:ClosedPCS>false</typ:ClosedPCS>
</typ:ServiceRequest>
</typ:CreateRequest>

Create New Integration


From the Integrations screen.

Click New Integration.

Choose Basic Map Data.


Enter the integration name as Create Service Request and put it into a package hol.

Add Trigger
In the connections panel choose ServiceRequestSOAP connection.
If it is not visible then type SOAP into the search bar and click magnifying glass .

Drag the ServiceRequestSOAP connection onto the trigger point

Call the trigger CreateServiceRequest and proceed to the next screen.

Choose the create operation.


Leave all settings at defaults.

Verify the result and complete the wizard.


Add Target invoke
In the connections panel choose ServiceCloud connection.

If it is not visible then type Service into the search bar and click magnifying glass .

Drag the ServiceCloud connection onto the invoke point .

Call the invoke CreateIncident and proceed to the next screen.

Use the filter to quickly find the Incident object.


Choose the create operation and shuttle the Incident object across to the selected objects.

Verify the result and complete the wizard.


Map Request Data
In the integration canvas. Bring up the menu.

Choose the to create a new map.

Map the following fields :


 ServiceRequest.Subject -> Incident.Subject
 ServiceRequest.Customer -> Incident.IncidentCustomFields.ICSPCS.ContactEMail
 ServiceRequest.Product -> Incident.IncidentCustomFields.ICSPCS.Product
 ServiceRequest.Status -> Incident.StatusWithType.Status.Name
 ServiceRequest.ClosedPCS -> Incident.IncidentCustomFields.ICSPCS.SynchedPCS
Create a fixed value for PrimaryContact by selecting the Name.

Type Tom Riddle in the name field and then save and close the field mapping.

Click to test the mapping


Click to generate sample data, then click to try it out.
Verify that you get the expected result then save your mapping and close the mapper.

Enrich the Response


The response only includes the object ID of the newly created Incident. We need to enrich the
response to get additional data.

In the connections panel choose ServiceCloud connection.


If it is not visible then type Service into the search bar and click magnifying glass .

Drag the ServiceCloud connection onto the enrichment point

Call the trigger GetNewIncident and proceed to the next screen.

Use the filter to quickly find the Incident object.


Choose the Get operation and shuttle the Incident object across to the selected objects. Then
Expand the Processing Options.

Choose the Fetch All Names option to cause RightNow to expand references to include actual
values. Then close the processing options window and move on in the wizard.

Verify the result and complete the wizard.


Map Request Data
In the integration canvas. Bring up the menu.

Choose the to create a new map.

Map the following fields :


 Incident.ID.id -> Incident.ID.id
Save your mapping and close the mapper.

Map Enrichment Response


In the integration canvas. Bring up the menu.
Choose the to create a new map.

Make sure you map from the $ResponseEnrichmentApplication Object.


Map the following fields :
 Incident.ID.id -> ServiceRequest.ID
 Incident.IncidentCustomFields.ICSPCS.ContactEMail -> ServiceRequest.Customer
 Incident.IncidentCustomFields.ICSPCS.SynchedPCS -> ServiceRequest.ClosedPCS
 Incident.IncidentCustomFields.ICSPCS.Product -> ServiceRequest.Product
 Incident.ReferenceNumber -> ServiceRequest.ReferenceID
 Incident.StatusWithType.Status.Name -> ServiceRequest.Status
 Incident.Subject -> ServiceRequest.Subject
Save your mapping and close the mapper.
Creating Tracking

From the Integration Canvas select the Tracking icon.

Track the following fields


 ServiceRequest.Subject (Primary)
 ServiceRequest.Customer
 ServiceRequest.Product
Save the tracking. The integration should now show 100%

Save and exit the Integration

Activate the Integration

Activate the integration by selecting the slider .


Enable tracing and Activate the integration.

Testing
From the integration screen.

Click the information icon .


Click on the Endpoint URL value.
Copy the URL for use in a testing tool such as SoapUI.

Testing the Integration


We will use SoapUI to test our integration. Launch SOAP UI and choose File menu.

Create a New SOAP Project.


Provide the Initial WSDL from the ICS Integration and select Create Requests.

If not already open expand the new project and open the generated request.

Use the following sample test message or provide your own data. Do not provide the ID and
ReferenceID fields as these will be generated by Service Cloud.
<typ:CreateRequest>
<typ:ServiceRequest>
<typ:Subject>Mikey Mouse ears have fallen off</typ:Subject>
<typ:Summary>The ears of my Mickey Mouse mug have fallen off</typ:Summary>
<typ:Customer>my.email@company.com</typ:Customer>
<typ:Product>Mickey Mouse Mug</typ:Product>
<typ:Status>Unresolved</typ:Status>
<typ:ClosedPCS>false</typ:ClosedPCS>
</typ:ServiceRequest>
</typ:CreateRequest>

Select the Auth at the bottom of the screen.

Choose Add New Authorization.

Choose Basic authorization.


Provide user credentials. Then set authorization back to none.

Right click on the message to bring up the context menu.

Choose Add WSS Username Token.


Accept the default PasswordText.

Bring up the context menu again.

Choose Add WS-Timestamp.

Set the time to live to 10 minutes.


Note that the timestamp will need to be deleted and regenerated after 10 minutes.

Send the request by pressing the .

Check the result

You might also like