Create child requests in different portals

Create child requests in different portals

Requirement: There are scenarios where two or more ServiceDesk plus portals are used in an organisation for different departments and requests created in one portal must be duplicated in another. This script will help fulfill this requirement.

Use Case:
Consider a new employee onboarding process.  This involves HR department, facilities department and also IT department.  So when a parent request is created in HR portal subsequent requests in other portals have to be created and the respective information has to be updated in the parent ticket.

Steps involved:
1.  We are using 3 scripts to suffice this requirement.
2.  Firstly, FAFR script this has to be configured on Form Submit to capture all the resource information into Description so as to make it easier for us to forward the information to other portals.  
3. Secondly, Request Custom Function Scripts.  This is used to create request in other portals.  Update the integration key for each portal within the script.  

Also, update the portal id, additional field names to hold the parent ticket id in the child tickets being created.


4. Thirdly, We need to add these child request informations onto the parent request.  This is handled as two parts.
  1.  Once the child request is created in the other portals, the same will be updated in the parent ticket via request custom functions.  This includes the Ticket ID and Ticket URL.
  1. Dynamic information of the child request can be viewed from the parent ticket.  This is done by adding a new tab in the request details page.  This is achieved using pagescripts which internally invokes a call back function to load the dynamic informations.  For now we have fetched only the basic request informations: Request ID, Subject, Status, Technician, 

Steps to configure:
  1. Goto Admin > Service Catalog > Template > Field and Form Rules > On Form Submit:  Copy paste the FAFR_OnFormSubmit.txt after updating the resource question informations as per your instance.
    1. description = description +"<br><br><br>"+ "<b>New Employee Clasiffication:</b><br>Category of New Hire: "+$CS.getText("RES_100000001_QUS_100000001") +"<br>Work Model of the employee: " + $CS.getText("RES_100000001_QUS_100000302") + "<br><br><b>Vaccination details</b><br>Immunisation Details: "+$CS.getValue("RES_100000304_QUS_100000309")+"<br>Number of shots: "+$CS.getValue("RES_100000304_QUS_100000308") + "<br><br><b>New Hire Services:</b><br>Name of the New Hire: "+$CS.getValue("RES_100000303_QUS_100000002")+"<br>Date of Joining: "+$CS.getValue("RES_100000303_QUS_100000303") + "<br>Workstation model: "+$CS.getText("RES_100000303_QUS_100000304") +"<br>Network access: "+$CS.getValue("RES_100000303_QUS_100000307") + "<br>Additional Hardware Components: "+$CS.getValue("RES_100000303_QUS_100000306") +"<br>Software Required: "+$CS.getValue("RES_100000303_QUS_100000305")+"<br><br><b>Security and Access Clearance:</b><br>Access Destination: "+$CS.getValue("RES_100000305_QUS_100000310")+"<br><br><b>Office Scheduling:</b><br>Office Timings: "+$CS.getValue("RES_100000306_QUS_100000311");
  2. Goto Admin > Developers Space > Request Custom function > Paste the contents from CustomFunction.txt and Update the technicianKey & additional field information as per the instances.

  3. Goto Admin > Developer Space > Call Back Functions > Paste the contents from CallBackFunction.txt and Update the URL & Techniciankey in the script.


  4. Goto Admin > PageScripts > Apply to All Users > Event: Request Details Page:
    1.  

                    New to ADSelfService Plus?