---
sourceDocument: Zurich Field Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/zurich/field-service-management

 Release :

    - zurich

ft:locale :

    - en-US

ft:publication_title :

    - Zurich Field Service Management

ft:clusterId :

    - fsm

bundleId :

    - fsm

workflow :

    - Customer and Industry


---

# Create a task bundling rule

# Create a task bundling rule {#ariaid-title1}

* Release version: Zurich
* 
* Updated July 31, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Create a task bundling rule to bundle tasks dynamically according to the selected parameters with Field Service Task Bundling.

## Before you begin

To add rules to any policy other than the default policy, create a policy first. For more information, see [Create a task bundling policy](https://www.servicenow.com/docs/f99bumFytYpuU6Rui7LWvQ "Create a task bundling policy to apply various rules for dynamically bundling tasks with Field Service Task Bundling.").

[Enable the Field Service territory model](https://www.servicenow.com/docs/V2jwQHVUlJXBWzAfFh9jKQ "Activate the territory model to display the Territory field in the work order task form so the task can be assigned to an agent or crew associated with the selected territory. The territory model maintains a record of territories mapped to it.") plugin when bundling tasks by territory.

Role required: admin

## About this task

Task Grouping Rules can be applied on tasks only if the following conditions are met:

* Is in Draft State
* Not part of another bundle
* Not a bundle itself
* Not a vendor task
* Shouldn't have access hours
* Doesn't need a crew
* Doesn't have a fixed window
* Doesn't have dependent tasks
{#create-a-task-bundling-rule__ul_xnx_fr2_mxb}

## Procedure

1. Navigate to AllField ServiceDynamic Bundling AdministrationRules.
2. Select New.
3. On the form, fill in the fields.  
   {#create-a-task-bundling-rule__table_ljv_35d_5xb__entry__2}

   | Fields | Description |
   |-|-|
   | Name | Name of the rule. |
   | Policy | Policy that this rule is grouped under. Note: To add rules to any policy other than the default policy, create a policy first. For more information, see [Create a task bundling policy](https://www.servicenow.com/docs/f99bumFytYpuU6Rui7LWvQ "Create a task bundling policy to apply various rules for dynamically bundling tasks with Field Service Task Bundling."). |
   | Order | Order of when this rule is applied relative to other rules within the policy. |
   | Active | Option to make the rule active or inactive. |
   [Table 1. Task bundling rule form]

   {#create-a-task-bundling-rule__table_ljv_35d_5xb}
4. In the Grouping Conditions section, use the condition builder to create task filters that define the tasks that this rule targets.
5. **Optional:** Toggle Advanced to replace the condition builder with a Script field.  
   Toggling Advanced replaces the condition builder with the following template:

       /**
        * This scripted rule should return an array of sys_ids of tasks joined using comma for each group that should be bundled
        * @param {String} taskType table name that contains the taskIds
        * @param {String} taskIds comma-separated task sys_ids representing a group of tasks
        * @returns {String[]} list of comma-separated task sys_ids shown as below:
        * [
        *	'sys_id_1,sys_id_2,sys_id_3',
        *	'sys_id_4',
        *	'sys_id_5,sys_id_6,sys_id_7,sys_id_8'
        * ]
        */
       (function executeRule(taskType, taskIds) {
       	// your code goes here
       })(taskType, taskIds);

6. Select Preview Tasks to preview all tasks that are affected by your rule.
7. Select Submit.

*[\>]: and then


