Deluge Script to show request attributes in Task Subject / Description from builds: 10600

Deluge Script to show request attributes in Task Subject / Description from builds: 10600

Requirement:
To show the request field values such as Request Type, Status etc., or the additional field values in the Task subject/description.

Use case:
When a task is triggered from a request, it should contain the request details (configured) in the Subject/Description of the task. This will enable to task technician to quickly view the request information in the task.

Please follow the below steps. 
Download the attached ZIP folder and unzip it.

STEP 1:
  1. Go to Admin > Task Custom Functions > Global function > New > Paste the content from the attachment  1. Global function_5.txt  and save it with a name.
  2. Update the URL and integration key in the script. 
    1. You can get the integration key under Admin > Integrations > Integration Key > New
    2. Please use the Technician API key with admin privilege, as there wont be any role related permission issues. 
    3. Update the Technician API key and Application URL in the global function.
    4. Make a note of the Global function number as highlighted below.


STEP 2: 
  1. Go to Admin > Task Custom Functions > Global function > New > Paste the content from the attachment  (3. global_function14.txt) and save it with a name. Modify the return type and the parameter as in the attached screenshot. (4. global_function14 configuration) and note down the Global function number as well.


STEP 3:
  1. Go to Admin > Task Custom Functions > Global function > New > Paste the content from the attachment  global_function15.txt
  2.  Replace the global function number with the Number which was noted in Step 2 in the first line and save it with a name.
  3. Modify the return type, parameter, and the global function name in the attached screenshot.(6. global_function15 configuration) and note down the Global function number from here as well.


STEP 4: 
  1. Go to Admin --> Task Custom Functions-->Custom Actions. Create a new function.
    1. Copy paste the script from the attachment (7. taskupdate_deluge.txt.)
    2. Modify the global functions in the script(Replace the global function in first like with global function noted in Step 1 and Global function noted in Step 3 in Line 26 and 28 Respectively)
    3. Refer to the attached screenshot. (8. taskupdate_deluge configuration)


STEP 5:
  1. Update the task template as shown below. There should be a space before and after the variable.
  2. If you need to add any additional field value in the task description make a note of the API field name of the value from Admin>>incident additional field.

  1. Configure Task custom trigger as in the attached screenshot. (10. Task Custom trigger configuration)


Note: Space should be there before and after the variables
The Following script will only work when the request is created so please make sure the following tasks are added with the variables in the template workflow so when the request is raised and tasks are triggered with the values entered.


      New to ADManager Plus?

        New to ADSelfService Plus?

          • Related Articles

          • Query to show Request and associated task details

            PGSQL & MSSQL: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", wo.TITLE AS "Subject", pd.PRIORITYNAME AS "Priority", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", icd.NAME AS "Item", ti.FIRST_NAME AS "Technician", ...
          • Notify task owner when a task is deleted using Deluge

            Requirement: Send Email notification to task owner when a task is deleted from a request. Steps to follow: Go to Admin > Developer Space > Task Custom Functions. Create a new function. Refer to the attached script. (NotifyTaskOwner.txt.) Update the ...
          • Query to show both task comments and worklog comments

            MSSQL: SELECT "taskdet"."TASKID" AS "Task ID", "taskdet"."TASKID" AS "Task ID", "wotask"."WORKORDERID" AS "RequestID", cd.CATEGORYNAME AS "Request Category",  "taskgroup"."QUEUENAME" AS "Group", "taskowner"."FIRST_NAME" AS "Owner", "taskdet"."TITLE" ...
          • Script to Auto close Preventive Maintenance Requests

            This post describes the use of a python script to close  Preventive maintenance Requests using Custom Schedules. What is 'Custom Schedules'? The Custom Schedules feature enables you to access any data in ServiceDesk Plus to perform customized actions ...
          • Deluge script to add task automatically under Change

            Steps to configure: 1. Download the attached scripts. 2. Go to Admin >> Global Functions >> Copy & Paste the attached Global_function_4.txt save it with a name along with the parameters mentioned in the below screenshot. 3.Go to Admin >>Change Custom ...