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 resource field information, or setting up integration with third-party applications.
Role Required: SDAdmin
To configure request custom triggers, go to Admin > Automation > Custom Triggers > Requests.
In addition to the specified events, custom triggers can also be executed when:
A request is duplicated.
A request is generated via maintenance.
Custom triggers are categorized into groups.
Create New Group
Click Trigger Group.
Provide a Name and Description for the group.
Click Save or Save and Add New.
Hover over the required group and click Add Trigger.
Fill out the displayed form using the following pointers:
Trigger Name: Provide a name for the trigger.
Description: Add a short note on the need for the trigger.
Execute on actions: Choose when or at which events the trigger must be executed during the request life cycle: created, edited, deleted permanently, or moved to trash.
Execute during: Choose the execution time window for the trigger - any time, within operational hours, or outside operational hours.
Cascade Execution: Choose the sequence in which the triggers must be executed:
Apply the next trigger configured in the list view.
Skip the remaining triggers in the current trigger group and execute the next trigger group, if any.
Skip all remaining triggers across all trigger groups.
When Request arrives: Define conditions of the incoming request. You can choose to apply any conditions based on criteria, apply conditions based on custom functions, and apply no conditions.
Apply conditions based on criteria - Choose the criteria by using the drop-down lists. You can configure up to 100 criteria using the AND/OR operations.
For a given criteria, you can configure multiple sub-criteria.
For fields such as Contact, Support Rep, Groups, you can configure criteria for dynamic input using placeholders, such as $All my groups and $Logged in user.
For multi-select fields such as Status, Created by, and you can configure criteria based on their sub-field values by clicking >
Apply conditions using custom functions - Define criteria using request custom functions.
Apply no condition - The custom trigger will be applied to all incoming requests.
Apply If-If action or If-Else actions
Initiate Webhooks
Custom triggers are configured to execute various actions for requests that fulfill specific incoming criteria.
Some examples of the notifications you can send are as follows:
Notify support reps about high priority or important requests right when the requests are created.
Notify contacts when their tickets are assigned to support reps.
To configure a notification, go to Select Custom Action > Notification Action.
Supported placeholders are as follows:
$Contact
$Ticket_Owner
$Group_Members
$Editor
$CC_Users
$Shared_Contacts
$Shared_Support Reps
$Task_Owners
$Linked_To_Request_Owner
$Linked_Requests_Owners
$Dependent_Requests_Owners
$Current_Level_All_Approvers
$Current_Level_Approvers_of_Approved_Approvals
$Current_Level_Approvers_of_Pending_Approvals
$Current_Level_Approvers_of_Denied_Approvals
$Email ids to be Notified
Provide a template name and select the Mode: SMS/Email.
Provide a relevant subject.
Note that attachments are not allowed for the SMS mode. For emails, the attachment size is 10MB by default. This can be modified by your system admin.
Custom functions allow you to manipulate data in ServiceDesk Plus MSP and other external applications. requestObj and context are the arguments supported in custom functions.
To configure custom functions as a custom action
Under Actions, select Custom Action > Custom Function.
Select the custom function to be executed or click New to create a function instantly.
Click Save.
To learn how to write custom functions, visit this page.
Custom scripts allow users to modify the application's behavior and UI. In a script file, you can program the actions to be performed.
By default, the following request operations are supported:
Adding notes to a request
Updating a request
Conditional approvals for requests
Follow the steps described in the document given below to program the required actions effectively.
Writing Custom Script files (A sample Python file)
In a class file, you can program the actions to be performed.
Place the class file under [SDP MSP_Home]/integration/lib/ directory.
Under Actions, select Custom Action > Execute Class.
Copy the class file name and paste it in the text box.
Click Save.
A webhook allows the user to call an external URL or API to facilitate communication between ServiceDesk Plus MSP and any third-party applications.
You can configure webhooks under Admin > Developer Space > Webhooks.
After creating webhooks, you can select a webhook as the action for an automation.
Under Actions, select Custom Actions > Webhooks.
Select the webhook to be executed.
Click Save.
The If-If action allows you to bundle multiple custom actions and execute them when the specified criteria is met.
You can configure only one If-If action for a custom trigger.
If the category of an incoming request is Server, notify the admin in-charge about the issue via email. If the category is Quality Issue, you can configure a webhook to send notification to a channel in Slack.
How Does If-If Action Work?
The blocks in the If-If action are evaluated sequentially and executed based on criteria match.
You can add up to 10 If blocks and configure up to 5 actions in each If block.
You can configure notifications, custom functions, custom scripts, or webhooks as custom actions.
You cannot configure custom functions and custom scripts within the same block.
Configure If-If Action
Under Actions, click Select Custom Action > If-If.
Configure the criteria using the drop-down lists. You can create up to 10 criteria using AND/OR combinations.
Configure actions using the available options: Notification Action, Custom Function, Execute Script, or Webhook.
Click Add If block to add another block or click Update.
You can use the If-Else action to configure actions when the criteria is met and when it is not met.
You can configure only one If-Else action for a custom trigger.
Scenario: If the customer has mentioned an existing model of the product, send an email to fill the details of that model in the request form. Else, auto-reply to the customer asking for the right model details.
How Does If-Else Action Work?
The blocks in If-Else action are validated sequentially.
If-Else action has three types of blocks: If, Else-If, and Else.
If block* |
|
Else-If block |
|
Else block* |
|
Configure If-Else Actions
Under Actions, click Select Custom Action > If-Else.
In the If block, configure the criteria using the drop-down list. You can add up to 10 criteria using AND/OR combinations.
Configure actions using the available options: Notification Action, Custom Function, Execute Script, or Webhook. You can configure up to 5 actions in each block.
To add an Else-If block, click Add Condition and configure criteria and actions.
After defining If and Else-If blocks, configure an action in the Else block and click Update.