Custom Triggers - Tasks

Custom Triggers - Tasks

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.

  

  1. 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 SupportCenter Plus and other external applications. Choose the required custom function or add a new one.

  • Supported Return Operations: UPDATE_TASK , ADD_COMMENTS & ADD_Time Entry


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:
[SCP_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/support rep 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


    • Related Articles

    • Custom Triggers

      Custom Triggers enable you to customize automatic workflows for requests, projects, changes, tasks, notes, notifications, approval level, and approval. This feature helps automate several processes, such as setting up multiple approval stages, ...
    • Custom Triggers for Notifications

      Use custom triggers to automatically set off predefined actions on a notification that matches the criteria. You can configure email/SMS notifications, custom functions, or even custom scripts as custom actions. Custom triggers are categorized and ...
    • Custom Triggers for Approvals

      Use custom triggers to automatically set off predefined actions when an approval matches a defined criteria. You can configure email/SMS notifications, custom functions, or even custom scripts as custom actions. Custom triggers are categorized and ...
    • Custom Triggers for Notes

      Use custom triggers to automatically set off predefined actions on a note that matches the criteria. You can configure email/SMS notifications, custom functions, or even custom scripts as custom actions. Custom triggers are categorized and executed ...
    • Custom Triggers - Requests

      Custom Triggers are used to configure automated actions for incoming requests or records that fulfill certain preconfigured criteria. You can automate several processes, such as sending customized email notifications, creating a new request based on ...