- 18 Oct 2024
-
DarkLight
-
PDF
Create and Update Change Request (ServiceNow) - Transformation
- Updated on 18 Oct 2024
-
DarkLight
-
PDF
Create a JSON Transformation Video
Before we begin building our Transformation, we first need to
collect some data.
Step 1
- Open the JSON Form you just created, Lab – Create and Update Change Request – ServiceNow – XX” (where XX represents your initials)
- Click the eye icon in the upper right, and populate the fields in the Preview Form with the following:
- Title: Title
- Summary: Summary
- Description: Description
- Configuration Item: select IOS
Step 2
Click the Show Form Data button at the bottom left.
Step 3
Hover your cursor next to the “4 items” text, click on the clipboard icon to copy the data to Clipboard/Text Editor. Then click Close to close the Preview Form.
This is the format in which the data will be submitted when executing our automation from Operations Manager. You will now build a Transformation that takes the data in this format and breaks it out into the individual variables that the Child Job needs in the workflow.
Step 4
Click the + at the top of the left navigation panel.
Step 5
The Create window opens. Click the drop down and select Transformation.
Step 6
Enter “ServiceNow Change Request JST” in the name field and click Create.
Step 7
The canvas loads with a lot of empty space in the center. To remove some of the white space, place your cursor near the top of the canvas, and click the delete (trash can) icon that displays.
Step 8
Click the Add+ button under Incoming Schema. And Select Incoming Schema.
Step 9
Paste the example data from your JSON Form into the field on the right. Then click the Infer Schema From Example JSON button on the left.
Step 10
In line 2 in the “$id” field, enter formData between the double quotes. Click Save at the bottom.
Step 11
Now that you have created an Incoming Schema, you will need to take the data and break it out into the individual variables that the Child Job needs in the workflow. To do that, click the half-circle for the title value in the Incoming Schema and then click the Add + under Outgoing Schemas. Click on the first option Outgoing Schema.
Step 12
Perform the same steps for the remaining variables. We've now transformed our incoming schema into the structure that the automation requires.
Step 13
Click the Save button in the upper left portion of the screen.