scripted rest api integartion

Supriya Mane
Tera Contributor

  1. 1. Create Incident and Task through API
    API call 1- Create an Incident through API-
    API call 2- Create a task through API call and associating to Incident 
    Assumption - can we get multiple task to be created as part of one API call?

 

  1. Create an Incident and task though one api call 
    If NOC TT ID=New, then create VOC Incident, create task and associate task to Incident
    API call for task creation [Incident mandatory field is Incident]

 

 

  1. Create Incident and Task through API
    API call 1- Create an Incident through API
    User creates task manually on Servicenow for the created Incident

 

 

On SNOW Screesn -reactive/
4. User creates incident and task on Servicenow screen
if incident doesn't exist then SNOW creates both incident and task

 

 

  1. User creates incident and task on Servicenow screen
    if incident doesn't exist then SNOW creates both incident and task
    API call to create a new task under the same Incident

 

Can i get how i can achive this in scripted rest api script

1 REPLY 1

Supriya Mane
Tera Contributor

Hi All,

How we can write script include function mandatory fields are empty then incident and task not get crated and show the error message's below condition also required.

Create Task, Update Task
Function (Script includes)
1. If Incident is not found
2. If Incident=Blank
3. If Incident ="New"
4. If Incident is !=Open (task cannot be created for closed incidents)
Else Create Task