Custom Schedules

 

Custom Schedules enable you to access any data from ServiceDesk Plus and schedule periodic customized actions such as sending notifications, reopening requests, or updating asset details. You can also synchronize ServiceDesk Plus 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? 

  1. Access the required data as queries through a Query Report.
  2. Create a script using any scripting language and save it on your device. Alternatively, you can create scripts in Custom Schedules Function using DELUGE.
  3. Pass the data in the query report as arguments to customized script files.
  4. Schedule the time to execute the customized action.
  5. The specified actions in the script file are executed automatically at regular intervals.

 

Configuring Custom Schedules 

Go to Admin > Automation (General Settings in old UI) > 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

 

Step 2: Configure Action

 

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

 

Step 3: Configure Schedule Info

 

 

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 [SDP_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 schedules 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.

Detailed results of the executed action can be viewed in the System Log Viewer under Quick Actions or from the Community tab.

Use Cases for Custom Schedules   

You can use Custom Schedules to periodically:

  1. Reopen on-hold requests in bulk after a specific time interval or when a specific criterion is met.
  2. Send custom email or SMS notifications for requests that match specific criteria.
  3. Schedule mailer campaigns with requesters list as input arguments.
  4. Check and update asset data from other asset management tools.
  5. Send notifications in certain scenarios.
  6. Send slack notifications for tasks.
  7. Integrate with other knowledge base tools.

Related Documents

FAQ | Request Custom Menu | Custom Triggers | Change Custom Triggers 

 

Support

If you have any questions about Custom Schedules, please post them in our community forum.

Did you create something amazing with Custom Schedules? Post your success story on our resources forum.