- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
โ10-05-2025 10:11 AM - edited โ10-05-2025 11:14 AM
Task Plan Templates are one of the most impactful features for streamlining case management in ServiceNow. As discussed in the below video, these templates allow process owners to predefine sets of tasks that can be applied to cases based on specific conditionsโsaving time, improving consistency, and enhancing visibility across workflows.
โ Benefits of Task Plan Templates:
- Accelerated case handling: Automatically apply relevant tasks based on case type or attributes.
- Improved visibility: Hierarchical task structures make it easier to track progress and dependencies.
- Scalability: Easily adapt to changing business rules without manual reconfiguration.
- Empowered process owners: Configure and manage task plans directly from the native workspace UIโwithout relying on admin-level intervention or backend changes.
๐ก Automating Task Plan Invocation with Business Rules
While Task Plan Templates can be triggered manually, many organizations prefer a systematic approach to ensure consistency and reduce manual effort. One effective method is to use a Business Rule to invoke the template automatically when certain conditions are met.
Example Scenario:
Youโve created a Task Plan Template for a specific FSO case type (e.g., Personal Auto Claim).
This task plan will be invoked when the Stage on a Personal Auto Claim case is โFNOLโ.
Once the condition has been met, four new tasks will get created for the given case.
To automate the creation of tasks when the case stage changes, you can create a Business Rule with the following configuration:
- Table: Personal Auto Claim (or your relevant case type)
- When to Run
- When: after
- Insert: True
- Update: True
- Filter Conditions: Stage (changes)
- Advanced
(function executeRule(current, previous /null when async/ ) {
var array = new sntaskplan.TaskPlanExecutionService().findMatchingTaskPlanTemplate(current);
var latestRecord = null;
var latestDate = null;
for (var i = 0; i < array.length; i++) {
var currentRecord = array[i];
var currentDate = new GlideDateTime(currentRecord.sysupdatedon);
if (latestDate === null || currentDate.getNumericValue() > latestDate.getNumericValue()) {
latestDate = currentDate;
latestRecord = currentRecord;
}
}
new sntaskplan.TaskPlanExecutionService().applyTaskTemplate(latestRecord.sys_id, current);
})(current, previous);
Once this is activated, the set of tasks defined in the Task Plan Template for this case type will now get systematically created as seen below.
๐ง Why This Matters
Automating Task Plan Templates means the system can intelligently generate and apply task plans based on criteria defined at the template levelโwithout requiring agents or admins to manually trigger them. This:
- Reduces manual effort and human error.
- Ensures consistent task execution across similar case types.
- Enables faster response times and better scalability.
๐ฌ Join the Conversation
Have you implemented Task Plan Templates in your organization? What automation strategies have worked best for you? Share your experience or questions below!
- 2,244 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
Thanks for your post!
We noticed a few issues with the Business Rule. Thanks to Lmouity1, hereโs a suggested fix:
(function executeRule(current, previous /*null when async*/) {
var array = new sn_task_plan.TaskPlanExecutionService().findMatchingTaskPlanTemplate(current);
var latestRecord = null;
var latestDate = null;
for (var i = 0; i < array.length; i++) {
var currentRecord = array[i];
var currentDate = new GlideDateTime(currentRecord.sysupdatedon);
if (latestDate === null || currentDate.getNumericValue() > latestDate.getNumericValue()) {
latestDate = currentDate;
latestRecord = currentRecord;
}
}
new sn_task_plan.TaskPlanExecutionService().applyTaskTemplate(latestRecord.sys_id, current);
})(current, previous);Let us know if it works for you or if you need further clarification
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Nick Daigneau Is there any official documentation that covers the requirement for this? Anyone installing the plugin would assume that it should automatically generate tasks on a new record whenever task plan conditions are met.
However, based on this post it seems you need to add a custom business rule just for the plugin to function? If this is accurate, this seems like a delivery flaw.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@MattSN - As of the Q1 2026 Store release, Task Plan Templates are not automatically triggered when conditions are met โ they must be manually invoked from the target record. This post walks through an example of how to trigger them systematically using a Business Rule.
Note that automatic execution is coming in a future release as an enhancement to Task Plan Templates, enabling condition-based triggering through pre-built flow actions โ eliminating the need for the Business Rule approach above. I'll update this post when that functionality is available.
