Passing values from SCSM to SCORCH can be a rewarding yet challenging endeavor. One of the challenges is to parse the XML data. In the method below I will show two “types” of XML that is escaped from the Service Request. One a manual input and the other a query.

Manual input data can be passed from SCSM to SCORCH by querying XML text or files using XPath activity. Simply select the published data of the “User Input” from the SCSM Object (Service Request in this example) and make sure the XPath Query contains the question asked on the Request Offering.

/UserInputs/UserInput[@Question=’Server Name’]/@Answer

Request offering (the question must be exactly the same).

Now we run the runbook and we see the query results are the value I inputted when submitting the ticket which in this case was server name drceozap16.

Now lets do this exact same process but utlizing a query slection in the request offering.

The query results are users selecting a related ticket.

Now the user submits the offering and let’s see what returns on the SCORCH side using the above method.

Well we get the data but it still contains the XML. Now you can copy it to a file and manipulate the data with find and replace, etc, or you can add another Query XML activity which will grab the display name value which is what you initially selected (Service Request Ticket in this example).

The result.

Now that the XML has been removed, the value you selected is available. This method can be used in any query scenario in SCSM. Instead of adding the second XML activity you could utilize PowerShell and script it, but I have found this method to work every time.

-End of Line-