Submit Order(POST) - Service Catalog API - Scripted REST API

Vaishnavi35
Tera Guru

Hi

I have doubt regarding Submit Order(POST) in Service Catalog API. I am able to create an REQ/RITM using REST API.

I want to get Short Description to be reflected in the list.

find_real_file.png

I hope you all have understood my question.

 

Thanks & Regards,

Vaishnavi

1 ACCEPTED SOLUTION

Personally, I would add this as one of the first steps in your workflow, so before any approvals/tasks.

find_real_file.png

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn
Community article list

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

21 REPLIES 21

Hi Mark,

A small help. When i am submitting the form(Add to Cart item(POST))

find_real_file.png

I am getting 500 internal Error. Could you help me with this?? Orelse i will open a new question.

 

Thanks & Regards 

Vaishnavi

Looking at the variables you are passing, I see some strange single quotes, with formatting. At the branch variable. Have a look at that.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Thank you 🙂 🙂

Harsh Vardhan
Giga Patron

your api will use to create a request by getting some variable value. rest of the part will  be done on workflow. 

 

you can define it inside your workflow to update request short description. 

use glide record to update the short description. 

 

var gr = new GlideRecord('sc_request');

gr.get(current.request);

gr.short_description = current.variables.<variablename>

gr.update();

 

 

Workflow you mean?? i actual service request WF??

The process which i followed please have a look,

From Navigation,

Going to-> Scripted Rest API's->Name: Service Catalog API -> On Opening that,

find_real_file.png

I have selected Add Item to Cart to open. Then clicking on Explore REST API

find_real_file.png

Then I have given sys_id of catalog item for which i want to raise a request.

find_real_file.png

Then the values of variables i want o display,

find_real_file.png

Then click on submit.

Then  go to Submit Order(POST).

find_real_file.png

After i click on Submit Order and send the form without any modifications Request is created with the variables and values given.

find_real_file.png

I search for the request its created. But i want to give REQ short description also. Can anyone help me with that...??

find_real_file.png

Thanks in advance,

Vaishnavi