ServiceDesk Plus

    Custom Schedules 

    Custom Schedules enable you to access any data from ServiceDesk Plus MSP and schedule periodic customized actions such as sending notifications, reopening requests, or updating asset details. You can also synchronize ServiceDesk Plus MSP data with other third-party applications to perform various actions, such as send mailer campaigns to requesters at regular intervals.

     

    Role Required: SDAdmin

     

    How are customized actions scheduled in ServiceDesk Plus MSP? 

    • Access the required data as queries through a Query Report.

    • Create a script using any scripting language and save it on your device. Alternatively, you can create scripts in Custom Schedules Function using DELUGE.

    • Pass the data in the query report as arguments to customized script files.

    • Schedule the time to execute the customized action.

    • The specified actions in the script file are executed automatically at regular intervals.

     

    Configuring Custom Schedules    

    Go to Admin > Automation > Custom Schedules and click New.

    The New Custom Schedule form will be displayed. Use the following pointers to configure a custom schedule:

     

    Step 1: Fill out the Custom Schedule Details

    • Enter the Schedule Name. This is a mandatory field.

    • Add a Description for the Custom Schedule.

     

    Step 2: Configure Action

    • In the Executor drop-down, you can configure the action to be performed in two ways:

      • Execute Script - Create a script using any scripting language. Save the script as a text file under [SDPMSP_Home]/integration/custom_scripts/executor_files folder. In the text field, specify the file name. The application fetches the script and executes it. Example

      • Execute Function- Create and save your own scripts using Deluge in Custom Schedules Function. Choose the relevant script from the drop-down. You can also create a custom scheduled function from the drop-down. Click here to learn more.

    • Choose the query report to be passed as the argument from the Argument drop-down. You can pass up to 3 query reports as arguments.

     

    The query report visibility must be set as Public. Private reports cannot be fetched into Custom Schedules.
      

    Step 3: Configure Schedule Info

    • Specify how frequently you want to run the custom schedule in the From & Repeats field.

    Choose the frequency to repeat the custom schedule from the Repeat drop-down. Custom Schedules will be executed irrespective of the operational hours.

     


    How are query reports converted as arguments?  

    Let's assume the query report SLA Violated Requests by High Priority gives the following result:

    Request ID

    Subject

    Technician

    47

    Unable to fetch mails

    Heather Graham

    128

    Cannot connect to MSSQL server

    Shawn Adams

     

    While executing scripts

    When the schedule starts, the query report results are saved as an individual JSON file under [SDPMSP_Home]/integration/custom_schedule_reports/ directory. The result JSON is an array of JSON objects, one JSON object for each row. Each JSON object has column names as the keys and corresponding data as the values as shown below:

    [
        {
            "Request ID":"47",
            "Subject":"Unable to fetch mails",
            "Technician":"Heather Graham"
        },
        {
            "Request ID":"128",
            "Subject":"Cannot connect to MSSQL server",
            "Technician":"Shawn Adams"
        }
    ]


     

    The JSON file paths of the reports are passed to the as arguments to Custom Schedule Executor. After the action is executed, the JSON file will be deleted.

     

     

    While executing custom schedules functions

     

    When the schedule starts, the associated query reports are generated.

     

    The report can be fetched into a custom scheduled function using reportObj.get("Report_Name"); command. To fetch the report data, use the following command: dataObj = reportObj.get("Report_name");

     

    If the report contains multiple columns, the report columns can be fetched as using a loop:

     

     

     

    for each data in dataObj{
    column_name = data.get("column_name");
    }

     

     

    You can then specify the API call to perform an action, such as closing the request. When a custom schedule is executed, the custom schedules function fetches the report and executes the API function on the report data in the data object.

     

    View Custom Schedule Results    

     

    The Custom Schedules list view displays the configuration details as follows:

     

    The Result column in the Custom Schedules list view has the latest output of the corresponding action.

     

    Use Cases for Custom Schedules      

     

    You can use Custom Schedules to periodically:

     

    • Reopen on-hold requests in bulk after a specific time interval or when a specific criterion is met.

    • Send custom email or SMS notifications for requests that match specific criteria.

    • Schedule mailer campaigns with requesters list as input arguments.

    • Check and update asset data from other asset management tools.

    • Send notifications in certain scenarios.

    • Send slack notifications for tasks.

    • Integrate with other knowledge base tools.


     

    Copyright © 2017, ZOHO Corp. All Rights Reserved.