How to add Resolution and Close Requests using Custom Trigger (Python)

How to add Resolution and Close Requests using Custom Trigger (Python)

We can achieve it by using the custom trigger feature along with a python script. We can set a trigger based on which the script will execute, the script will add the resolution and set the status to 'Closed'

You can modify the condition for the custom trigger and the script according to your configuration and requirements. Please test this solution in a UAT before production. While implementing in production, test the solution with 5-10 tickets. Once your requirements are met, you can perform in bulk. 

Prerequisite:

Python should be configured in the server. If it's not already installed, click here for instructions. 

Instructions: 

1. Download the script attached and paste it under ManageEngine\ServiceDeskPlus-MSP\integration\custom_scripts. 

2. Edit the script and configure the required details. We have marked the section as #-------------Input----------- and have specified inline instructions. 



3. After saving the script, go to Admin>Custom Triggers>As an example, I've set to trigger the script upon selecting the technician to "John "



You can set the trigger as per your configurations. 

4. Once the condition is triggered, you can view the trace in the history 



Any errors in the process will also reflect in history. 





                  New to ADSelfService Plus?

                    • Related Articles

                    • Script to add worklog using custom schedule

                      What is a Custom Schedule? Custom Schedules are actions scheduled on a specific date and time with or without repeat frequency. The actions are specified in a customized script file. Any data from ServiceDesk Plus can be sent to the script through ...
                    • Create New request using Python Script

                      Script to raise a new request using Python Script. Pre-requisite - Python should be installed in the server and configured. You can review the instructions here - Requests module should be installed with the python Steps 1. Download the zip file from ...
                    • Notification script using Custom function in custom trigger

                      This is applicable from 10600 builds. From 10600 , Business rules dont have Email notification feature. The same use case be achieved through Custom triggers feature as mentioned below. Script to enable notification of request creation using custom ...
                    • How to close associated incident requests of change request automatically

                      This post describes the use of a python script to close change that are in a specific stage using Custom Schedules. Use Case: There may be a scenario where number of Change Requests that have got closed and the associated incident is still in open ...
                    • How to update Request Additional fields during request create/update using Custom Triggers (V3)

                      This is a sample python script to update the Request Additional Field Values during request create/update based on certain criteria using Custom Trigger Execution Steps:  1. Download the attached zip 2. Move the files to ...