Dynamic checklist based on field values

Dynamic checklist based on field values

Requirement:
Based on the answers provided for resource questions / request additional fields, dynamically a checklist has to be associated to the request

UseCase:
When an alarm is received indicating an issue with a server’s performance, with the details of it we can determine if the issue is related to CPU, RAM or HDD
Now when technicians manually creates an incident for the alarm, they can use ‘System Incidents’ template and choose ‘Server Performance’ as the category.
In the resource section, they can choose CPU, RAM, or HDD depending on the issue. Now if the technician chooses HDD, then HDD related checklist will be associated to the incident.  Similarly, it will happen for the other choices as well.
  
This can either be handled with resource questions or additional fields.  Attached are both versions, and can be used depending on your requirement.
  1. Request - Additional Field:
    1. associateChecklist_checkbox_requestUDF.txt
    2. associateChecklist_dropdown_requestUDF.txt
  2. Request - Resource Question:
    1. associateChecklist_checkbox_resourceQues.txt
    2. associateChecklist_dropdown_resourceQues.txt

Steps to configure:
1.  Download the attached scripts.  Copy the contents into Request custom functions.

2.  Goto Admin > Request Custom Function > Global Function > New > Paste the global function contents and save it with a name.
Update the URL and integration/technician key in the script. 
  1. For builds over 11300, you can get the integration key under Admin > Integrations > Integration Key > New
  2. Please use an integration key with admin privilege, as there wont be any role based permission issues. 

  3. For builds prior to 11300, refer https://help.servicedeskplus.com/api/rest-api.html$key and update the technician key.
3.  Goto Admin > Request Custom Function > Custom Function > New > Paste the associateChecklist.txt content and save it with a name
Update the global function count according to your instance

4.  Update the value and checklist id as per your requirement.
Where Laptops, Iphones, Ipads refers to the values and 1,2,3 are the checklist ids.
  1. checkList_Mapping = {
  2. "Laptops":"1",
  3. "iPhones":"2",
  4. "iPads":"3"
  5. };

5.  Configure this in a custom trigger to get invoked every time the request is created. (Invoking Condition can be modified as per your requirement.)


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • Additional field values

                        This report helps to find the picklist values in the additional fields. First you need to find the name of the table and the column holding the data, by executing the following SDP query report:  SELECT Tablename, Columnname FROM ColumnAliases WHERE ...
                      • How to implement dynamic request approval through custom triggers with configurable CSV file.

                        This is a sample script written in Python to handle Conditional Approvals for Incident \ Service Requests, through Custom Triggers.More information about Conditional Approvals can be  found in the link here One of the advantages of using this script ...
                      • Dynamically set SLA based on field values

                        Requirement: SLA for service requests needs to be set depending on the category, subcategory and priority of the request. Usecase: The possibility to modify/set SLA depending on a request Field is not available in Service Request. Also, since SLA is ...
                      • Associate Checklist for a Request depending on Resource/UDF Values

                        Requirement: Script to associate checklists depending on UDF Additional field values/Resource Question values. Usecase: In few organizations. they have a separate template for "New Asset Request".  Each new asset needs a different set of checklists ...
                      • How to update a request based on certain field values.

                        This post describes the use of a python script to update requests based on values in other fields ,in the same request.This action can be performed using  Custom Triggers. UseCase: There are three Levels setup in the application and there are 2 ...