Task Custom Trigger 

    Use Task Trigger to automatically trigger any 'Action' on a task using a script file or a custom function. You can define rules and apply predefined actions on tasks 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 tasks,

    • 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 tasks. You can add multiple criteria by clicking on the + icon. Switch between AND and OR operators between the criteria as per your requirement.

     

     

     

    • Select the Action Type (Custom Functions/Scripts) and point to the corresponding text file which contains the script 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 file name containing the script. 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_TASK , ADD_COMMENTS & ADD_WORKLOG

    Make sure that you enter a unique name for the 'New Action', so that the name doesn't clash with existing 'Action' names. Ensure that the text file containing the script is stored only in the specified locations. Store them in the directory as follows: [SDP MSP_Home]/integration/custom_scripts/executor_files. By default, 'Stop processing subsequent actions' is always enabled and the actions will be executed as per the 'Action rule order'. 'Organize Actions' in the list view allows you to rearrange the order in which the actions are executed. In a script, you can pass API parameters as arguments, such as py addComments.py $TITLE $TYPE. taskObj and context are the arguments supported in custom functions.

     

    Arguments for Scripts  

    We can also pass arguments for the custom scripts. The following table shows the possible arguments for scripts in Task Custom Trigger.

     

    Possible arguments for scripts in Task Custom Trigger

    PARAMETER

    DESCRIPTION

    $TITLE

    Denotes the title of the task

    $ID

    Provides the unique id generated for the task

    $PRIORITY

    Denotes the level of priority of the task

    $STATUS

    Denotes the status of the task

    $TYPE

    Denotes the type of the task

    $ASSOCIATED_ENTITY

    Denotes the parent of the task

    $PERCENTAGE_COMPLETION

    Provides task completion in percentage

    $ESTIMATED_EFFORT

    Provides estimated effort in Days, Hours and Minutes

    $ADDITIONAL_COST

    Provides the additional cost of the task

    $CREATED_BY

    Provides the details on user/technician who created this task.

    $CREATED_TIME

    Provides the time at which the task is created

    $SCHEDULED_START_TIME

    Provides the scheduled start time of the task

    $SCHEDULED_END_TIME

    Provides the scheduled end time of the task

    $ACTUAL_START_TIME

    Provides the actual start time of the task

    $ACTUAL_END_TIME

    Provides the actual end time of the task

    $ISOVERDUE

    Denotes if the task is overdue

    $OWNER

    Denotes the owner assigned for the task

    $GROUP

    Denotes the group under which the task is assigned ( Not Applicable for General, Project, and Milestone tasks)

    $ACCOUNT

    Denotes the account under which the task falls

    $MARKED_OWNER

    Denotes the owner marked for the task

    $MARKED_GROUP

    Denotes the group under which the task is marked( Not Applicable for General, Project, and Milestone tasks)

    $TEMPLATE

    Denotes of the template used for the task

     

    Zoho Corp. All rights reserved.