Custom Triggers for 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 resource field information, or setting up integration with third-party applications.

     

    Role Required: SDAdmin or HelpDeskConfig

     

    To configure request custom triggers, go to Admin > Automation > Custom Triggers > Requests.

     

    Triggering the Defined Workflow     

    When an incoming request matches certain conditions, you can configure specific actions to be performed automatically. The conditions refer to the values that the request fields must contain when the request is created, edited, deleted permanently, or moved to trash.

     

    In addition to the specified events, custom triggers can also be executed when:

    • A request is duplicated.

    • An incident request is converted to a service request or vice-versa.

    • A request is generated via maintenance.

    Custom triggers are categorized into groups.

     

    Create New Group 

    1. Click Trigger Group.

    2. Provide a Name and Description for the group.

    3. Click Save or Save and Add New.

     

     

    Configuring Custom Triggers   

    • 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 Requester, Technician, 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 Department, 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.

    If there are no conditions configured, the trigger will be executed only the resulting action will modify or change the request field values. If there will be no change to the request field values if the trigger were to be executed, the configured trigger will not be executed.   

    • Execute Rule when the criteria is met: This option is available only if the trigger must be applied on Edited requests. Choose whether the trigger must be applied only for the first time or every time the criteria is met by incoming requests.
    • Actions: Configure the actions to be performed when a request satisfies the specified condition. You can trigger the following actions:
     
     
     
     

    Configuring Custom Actions        

    Custom triggers are configured to execute various actions for requests that fulfill specific incoming criteria. 

    In ServiceDesk Plus MSP, you can choose from 7 custom actions for your custom triggers, as follows:

     

     

    You cannot configure custom functions, scripts, and class within the same trigger.

     

    Notification  

     

    You can use custom actions to send email and SMS notifications to technicians, requesters, and stakeholders. You can also create new templates for these notifications and save them.

    Some examples of the notifications you can send are as follows:

    • Notify technicians about high priority or important requests right when the requests are created.

    • Notify requesters when their tickets are assigned to technicians. 

    To configure a notification, go to Select Custom Action > Notification Action

    The email notification template window opens. Click the Template field and choose the required template.
     
     
     
     

    Choose a template and select users you want to notify by using variables, placeholders, or organization roles. 

    Supported placeholders are as follows: 

    • $Requester

    • $Ticket_Owner

    • $Group_Members

    • $On_Behalf_Of_Users

    • $Editor

    • $CC_Users

    • $Shared_Requesters

    • $Shared_Technicians

    • $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

    • $Preceding_Levels_All_Approvers

    • $Preceding_Levels_Approvers_of_Pending_Approvals

    • $Preceding_Levels_Approvers_of_Approved_Approvals

    • $Preceding_Levels_Approvers_of_Denied_Approvals

    • $Succeeding_Levels_All_Approvers

    • $Email ids to be Notified 

    You can also use additional fields as variables.

     

     

      

    Click New to create a new template. 

    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 

    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

    1. Under Actions, select Custom Action > Custom Function.

    2. Select the custom function to be executed or click New to create a function instantly.

    3. Click Save.

    To learn how to write custom functions, visit this page.

     

     

    Custom Scripts     

    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: 

    Follow the steps described in the document given below to program the required actions effectively. 

     

    Execute Class    

    In a class file, you can program the actions to be performed.

    1. Place the class file under [SDP MSP_Home]/integration/lib/ directory.

    2. Under Actions, select Custom Action > Execute Class.

    1. Copy the class file name and paste it in the text box.

    2. Click Save.

     

     

     

     Webhook    

    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. 

    1. Under Actions, select Custom Actions > Webhooks.

    2. Select the webhook to be executed.

    3. Click Save.

     

     

      

    If-If Actions     

    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.

     

    Scenario: 

    If the category of an incoming request is Server, notify the site 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.

     

     

      

    If -Else Actions    

    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: When a request is created with Employee Onboarding template, send an email to the HR department to initiate onboarding process.

     

    • If the job title of the employee is Member Technical Staff, use custom script to create an account in AD and add them to Zylker group.

    • Else, use a custom script to create an account in AD and add the employee to Zylker Trainee group.

     

    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*

    • Executes actions based on criteria match.

    • One If block is available by default.

    Else-If block

    • Validates the Else-If block only when the If block is not executed.

    • Executes actions based on criteria match.

    • You can add up to 8 Else-If blocks in between If and Else blocks.

    Else block*

    • Executes Else block only when both If block and Else-If block are not executed.

    • One Else block is available by default.

    * Mandatory blocks

     

    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

     

     

     

     

     

    Zoho Corp. All rights reserved.