Custom schedules enable you to access any data from AssetExplorer and schedule periodic customized actions such as sending notifications or updating asset details. You can also synchronize AssetExplorer data with other third-party applications to perform various actions, such as send mailer campaigns to technicians at regular intervals.
Role Required: SDAdmin
How are customized actions scheduled in AssetExplorer?
- 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 scheduled 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.
Go to Admin > Automation > Custom Schedules and click New.
Step 1: Fill out Custom Schedule Details
- Enter the schedule name. This is a mandatory field.
- Add a description for the custom schedule.
- 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 file under [SDP_Home]/integration/custom_scripts/ folder. In the text field, specify the script file name using the command py filename.py to fetch the script.
- Execute Function - Create and save your own scripts using Deluge in scheduled function. Choose the relevant function or create a new function from the drop-down. Click here to learn more.
- Choose the query report to be passed as the argument. 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.
- Specify how frequently you want to run the custom schedule. Custom schedules will be executed irrespective of operational hours.
- Select a date range and time.
- In the Repeats drop-down, choose the frequency for the custom schedule: once, hourly, daily, weekly, monthly, or yearly.
- Enable Advanced Options to set the frequency dynamically as follows:
- Daily - Runs according to the specified number of days.
- Weekly - Specify the number of weeks and days to run the schedule.
- Monthly - Specify the days of the month to run the schedule.
- Yearly - Specify the months and days in a year dynamically to run the schedule.
- Configure the end time for the schedule.
- Never - Set the schedule to run always.
- After - Specify the number of occurrences after which the repeat ends.
- On - Specify the date to end the repeat frequency.
- Click Save.
How are query reports converted as arguments?
Let's assume the query report Loan Expired assets by Asset Type gives the following result:
Loan ID
| Asset Expired
| Technician
|
47
| Dell Workstation 12
| Heather Graham
|
48
| Network Server B
| 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:
- [
- {
- "Loan ID":"47",
- "Asset Expired":"Dell Workstation 12",
- "Technician":"Heather Graham"
- },
- {
- "Loan ID":"48",
- "Asset Expired":"Network Server B",
- "Technician":"Shawn Adams"
- }
- ]
The JSON file paths of the reports are passed as arguments to custom schedule executor. After the action is executed, the JSON file will be deleted.
While executing scheduled functions
When the schedule starts, the associated query reports are generated.
The report can be fetched into a
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 updating an asset state. When a custom schedule is executed, the scheduled function fetches the report and executes the API function on the report data in the data object.
View Custom Schedule Results
In the custom schedules list view,
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:
- Reopen purchase orders in bulk after a specific time interval or when a specific criterion is met.
- Send custom email or SMS notifications for software that match specific criteria.
- Schedule mailer campaigns with technicians 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 external knowledge base tools.
Support
Related Articles
Custom Truststore
AssetExplorer adopts custom truststore to support untrusted SSL certificates and self-signed certificates. Earlier, whenever AssetExplorer remote server tries to connect with AssetExplorer central server, the authenticity of the server will be ...
Custom Reports
AssetExplorer enables you to create customized reports to meet the unique needs of your organization. Role Required: SDAdmin; Technicians with Complete Access to reports. To create custom reports, Go to the Reports Tab. Click the New Custom Report ...
Custom Settings - Report Settings
Custom settings allow you to modify the structure of the report. Role Required: SDAdmin, Technicians with Complete Access to reports. To access custom settings, Go to the Reports tab. Click Custom Settings. Customize your report using the following ...
Scheduled Function
AssetExplorer allows administrators to execute custom schedules using a built-in script execution tool called scheduled functions. The scheduled function scripts can be built from scratch using deluge, Zoho's propriety scripting language. Scheduled ...
Global Functions
Custom functions allow users to manipulate data in AssetExplorer and other external applications. Custom functions are built on Deluge, Zoho's propriety scripting language. Global functions are custom functions that can be called from custom actions ...