Project Custom Trigger
Use Project Trigger to automatically trigger any 'Action' on a project using a script file or a custom function. You can define rules and apply predefined actions on projects that match those rules. Triggers come in handy when performing actions in other modules or in third-party applications.
Configuring a New Action
To create a new custom trigger for projects
-
Go to Admin > Automation > Custom Triggers and select Projects.
-
Click New Action.
- Enter a name and description for the action and select when the action must be executed.
- Set Criteria under which the action must be executed on projects. You can add multiple criteria by clicking on the + icon. Switch between AND and OR operators between the criterion as per your requirement.
- Select the Action Type (Custom Functions/Scripts) and point to the corresponding script file which needs to be triggered.
Under Perform Action, choose whether you want to execute a script, or a custom function and configure the same using the following pointers:
-
Script: Specify the name of the script file. For example, addComments.txt.
-
Custom Function: By executing custom functions, you can manipulate data in ServiceDesk Plus MSP and other external applications. Choose the required custom function or add a new one.
-
Supported Return Operations: UPDATE_PROJECT & ADD_COMMENTS
Deselecting 'Stop processing subsequent actions' checkbox will execute successive action even after an action rule is applied on a project.
Arguments for Scripts
We can also pass arguments for the custom scripts. The following table shows the possible arguments for scripts in Project Custom Trigger.
Possible arguments for scripts in Project Custom Trigger
PARAMETER |
DESCRIPTION |
$TITLE |
Denotes the title of the project |
$ID |
Provides the unique id generated for the project |
$CODE |
Provides the unique code given to the project |
$PRIORITY |
Denotes the level of priority of the project |
$STATUS |
Denotes the status of the project |
$TYPE |
Denotes the type of the project |
$ESTIMATED_HOURS |
Provides the hours estimated for the project completion |
$ACTUAL_HOURS |
Provides the actual hours taken for project completion |
$ESTIMATED_COST |
Provides the cost estimated for the project completion |
$ACTUAL_COST |
Provides the actual cost of the project |
$CREATED_BY |
Provides the details on user/technician who created this project. |
$CREATED_TIME |
Provides the time at which the project is created |
$SCHEDULED_START_TIME |
Provides the scheduled start time of the project |
$SCHEDULED_END_TIME |
Provides the scheduled end time of the project |
$ACTUAL_START_TIME |
Provides the actual start time of the project |
$ACTUAL_END_TIME |
Provides the actual end time of the project |
$PROJECTED_END_TIME |
Provides the projected end time of the project |
$OWNER |
Denotes the owner assigned for the project |
$DEPARTMENT |
Denotes the department under which the project falls |
$REQUESTER |
Denotes the user who requested this project |
$SITE |
Denotes the site under which the project falls |
$ACCOUNT |
Denotes the account under which the project falls |
$TEMPLATE |
Denotes the template used for the project |