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

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Field Service Management

ft:clusterId :

    - fsm

bundleId :

    - fsm

workflow :

    - Customer and Industry


---

# Custom recommendation criteria

# Create custom recommendation criteria {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Define recommendation criteria that policies can use to rank or evaluate tasks for
agents.

## Before you begin

Role required: admin, sn_task_recommend.task_rec_admin

## About this task

Some predefined recommendation criteria are provided for you. For more information,
see [Predefined recommendation criteria](https://www.servicenow.com/docs/2LX0LsGiIHD7m7xOvZJMoQ#type-of-recommendation-criteria "There are two types of recommendation criteria, filter constraints and ranking criteria. The system provides a set of predefined criteria.").

## Procedure

1. Navigate to AllField ServiceTask Recommendation AdministrationRecommendation Criteria.
2. Click New.
3. On the form, fill in the fields.  
   {#create-recommendation-criteria__table_sjk_zx1_bqb__entry__2}

   | Field | Description |
   |-|-|
   | Display Name | Display name of the recommendation criterion. |
   | Name | Name of the recommendation criterion. |
   | Prefetched table | The prefetched table selected for the recommendation criterion. |
   | Prefetched fields | Supporting prefetched fields from the prefetched table. |
   | Type | Type of the criterion, either filter or rank. |
   | Application | The application containing this record. |
   | Application module | The default value is Field Service Management. |
   [Table 1. Recommendation Criteria]

   {#create-recommendation-criteria__table_sjk_zx1_bqb}
4. In the Script field, enter the script that you want to run when recommending tasks to the agent.  
   For example, the following script calculates the distance between the agent's current location and the task location.

       var distanceRule = new TaskRecommendationDistanceRuleProcessor(args); 
       var ruleProcessResult = distanceRule.processRule(user, tasks, timeStart, timeEnd, 'ranking'); 
       ruleResult = TaskRecommendationFSMUtil.parseRuleResult(ruleProcessResult, "Distance from task");

   For information about custom script requirements, see [Providing a script for custom task recommendation criteria](https://www.servicenow.com/docs/Wq_Enxwls1~TGtfQAFnv4A "Guidelines for creating scripts in recommendation criteria for an Intelligent Task Recommendation policy.").
5. Click Submit.

## Result

The recommendation criterion is created successfully, and sorted into either the
Filtering Constraints or Ranking Criteria group based on the selected type.

*[\>]: and then


