Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Creating service request using Workato integration

Yair Israel
Tera Contributor

Hi all,

I'm trying to create a ritm using intgration with Workato.

Was able to create the ritm with the require item and workflow, but the variables are missing.
Is anyone knows how can I call the variables or any experience using Workato?

find_real_file.png

1 ACCEPTED SOLUTION

ServiceNow Tec2
Mega Sage
This has been resolved by ServiceNow Technical Support. Please refer to KB0993358 for more information.

View solution in original post

6 REPLIES 6

ServiceNow Tec2
Mega Sage
This has been resolved by ServiceNow Technical Support. Please refer to KB0993358 for more information.

Community Alums
Not applicable

Can I ask how this was resolved? I attempt to view the KB but don't seem to have access. Thank you

eyal abu hamad
Mega Sage

hello, may I ask how did you do this.
I need Workato to create request item with the variables same as you but I don't know how to start

Community Alums
Not applicable

Hi Eyal,

Within the workato recipie, we selected to use custom actions:

 

You first have to add the RITM to the Cart:

Define Vars in the function call to map to variables

Method: POST

Path/api/sn_sc/servicecatalog/items/<CATALOGUE ITEM SYS ID HERE>/add_to_cart

Request Type: JSON Request body

Response Type: JSON Response
You then define the variables within the input section, we defined as follows:
(Note Name must match Name as defined on the var in SN, and Label must match "Question")

 

 

[
  {
    "name": "variables",
    "type": "object",
    "optional": false,
    "properties": [
      {
        "name": "var1",
        "type": "string",
        "optional": false,
        "control_type": "text",
        "label": "Var 1"
      },
      {
        "name": "var2",
        "type": "string",
        "optional": false,
        "control_type": "text",
        "label": "Var 2"
      },
      {
        "name": "var3",
        "type": "string",
        "optional": false,
        "control_type": "text",
        "label": "Var 3"
      }
    ],
    "label": "Variables"
  },
  {
    "name": "sysparm_quantity",
    "type": "string",
    "optional": false,
    "control_type": "text",
    "label": "Sysparm quantity"
  }
]

 

 

 

Under Output this is where you map your SN vars to Workato Vars

 

From here you then need to Check out the cart with another custom action:

Method: POST

Path: /api/sn_sc/servicecatalog/cart/checkout

Request Type: JSON Request body

Response Type: JSON Response

Define the Response Body:

 

 

[
  {
    "properties": [
      {
        "control_type": "text",
        "label": "Request number",
        "type": "string",
        "name": "request_number"
      },
      {
        "control_type": "text",
        "label": "Request ID",
        "type": "string",
        "name": "request_id"
      }
    ],
    "label": "Result",
    "type": "object",
    "name": "result"
  }
]