passing field value as payload dynamically once P1 incident got created through rest message

nivethika
Tera Contributor

Hi All,

Through rest message i am sending the payload like the below mentioned pic to the endpoint. Instead i need like once when the P1 incident got created the field value of ci, short description,,, should be sent to the endpoint dynamically. Can you please help me out for this.

find_real_file.png

1 ACCEPTED SOLUTION

For that only I mentioned you need to create variable substitution

Did you check that?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Gayathri5
Tera Guru

Hi nivethik,

 

In your BR, you can put the condition like below

if (priority == 1) { 
payload["u_short_description"] = current.short_description.toString();

}

 

Mark my answer Correct and Helpful if it helped you in any way.

 

Regards,

Gayathri

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can have after insert BR on incident table and use variable substitution to set the CI and short description

Variable substitution in outbound REST messages

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

nivethika
Tera Contributor

Thanks for your response.

i will try once

 

nivethika
Tera Contributor

what i actually mean is from the below mention pic the content which i am sending is manually and hardcode, For example the value of ci:Host Unix and short description is hardcode instead it should take the value of ci from the incident directly. please help me for that. 

 

find_real_file.png