To automate an approval for Incident Request Templates

To automate an approval for Incident Request Templates

Follow the below steps to add approval script.

1. Go to Admin --> Request Custom Functions -->Request --> Paste the content from the attachment 1. approvals.txt and save it with a name.

2. Configure the custom trigger as in the attached screenshot.

>>To set 2 approvers to approve the ticket, like either approved by approver  A or approver B please use the below script.

returnObj = Map();
approvalStages = [{"approver": {"id": 3301}},{"approver": {"id":3302}}];
input_data = {"INPUT_DATA":approvalStages,"OPERATIONNAME":"SET_APPROVAL","send_immediately":"True"};
operations = Collection();
returnObj = {"operation":operations,"message":"Approval(S) added Successfully through Custom Trigger","result":"success"};
return returnObj;

Make sure to give the approver id in the script for whom the approval should be sent when an incident request is created.

                    New to ADSelfService Plus?

                      • Related Articles

                      • How to implement dynamic request approval using FAFR and custom triggers.

                        This is a sample script written in Python to handle Conditional Approvals for Incident \ Service Requests, through Custom Triggers using Field and Form Rules.  One of the advantages of using this script is that there is no modification of the script ...
                      • Convert Incident to Service Request

                        For builds before 10536 The option will be available at: open the respective request > Actions > Convert incident to service request For builds after 10600. Edit the respective request > click on the Template dropdown [top-right corner] > Choose the ...
                      • Update request additional field with Custom Request ID

                        Requirement: Each Organization's request ID format may differ. In the current model, replacing the existing request id with these is not possible; however, the same can be replaced in an additional field. Custom Format : Example: 202305221125001 ...
                      • 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 ...
                      • Python script to automate FCR

                        Please find the attached Python script on this link  to automate FCR via custom trigger when the request is created and resolved by the same technician. The link contains two Python scripts with the name (this script can be used when MSP is ...