Mark Worklog Billable as NO by default with scripts using Custom Triggers

Mark Worklog Billable as NO by default with scripts using Custom Triggers

There are situations, where you want the Worklog to be marked as NON-BILLABLE by default. This can achieved using our Business Rules, where you can have the Action set as "Mark Request" as Non-Billable. However, this option is applicable provided only if you have the Billing enabled for the Account.

1. Download and extract the file 'MarkAsNonBillable.py'  from here and place it under <Drive>:\ManageEngine9301\ServiceDeskPlus-MSP\integration\custom_scripts.   
2. Edit the file 'MarkAsNonBillable.py' and add your application URL and the Technician Key of an "Admin User" :   



Note : You can get the Technician Key by editing a Technician and check for the Key word API Key and Save the same after generating :   

   


3. Make sure that you have Python installed on your application server.   
4. Also We need a dependency called requests.   

5.  To install dependency run the file 'easy_install.exe' which is under <Drive>:\Python34\Scripts, Example :   
C:\Python34\Scripts>easy_install.exe requests   

6. Go to Admin > Custom Triggers > Set the Action Type as "Execute Script" and use the below format   
C:\Python34\python.exe C:\ManageEngine\ServiceDeskPlus-MSP\integration\custom_scripts\MarkAsNonBillable.py $COMPLETE_JSON_FILE   

Now, upon meeting the criterias that you had configured under Custom Trigger's. Adding a worklog will be marked as Non-Billable.   

NOTE : Had attached the script "MarkAsNonBillalble"

Thanks for your understanding.     

Kind Regards,
Ajay Kumar

                  New to ADSelfService Plus?

                    • Related Articles

                    • Mark Worklogs as Non-Billable by default for 10500 and above

                      Please follow the below mentioned to mark the Worklogs as non-billable by default. This is applicable for both Requests and Changes Module 1. Stop the application. 2. Please take a trimmed backup of the application <OR> take a Snapshot of both the ...
                    • 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 ...
                    • Clickatell SMS Integration - Automate SMS notifications to users using Custom Triggers

                      This Sample script is used to send a sms notification from ServiceDesk Plus using the Clickatell SMS messaging Gateway.The sms is sent using the Clickatell SMS API and a Authorization Token is used to authenticate with the Gateway, against a Existing ...
                    • How to auto-create worklog based on values specified in the request

                      This post will to help you create a worklog automatically when a request is created. This script can be configured under Request custom triggers and you will find more information about this here. This is achieved using an API call to create a ...
                    • 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 ...