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();
operations.insert(input_data);
returnObj = {"operation":operations,"message":"Approval(S) added Successfully through Custom Trigger","result":"success"};
return returnObj;

NOTE:
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 ADManager Plus?

                    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 ...
                      • Custom script to add requrest ID and text (based on cx preference) to subject in a request Template

                        When a request is created cx wants to update the subject automatically with a text "SAGA" followed by request ID and subject, for all requests with any criteria. Subject Format : "SAGA" + ticket number + subject Please follow the below steps: 1. ...
                      • 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 FCR.py (this script can be used when MSP is ...
                      • 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 ...