---
sourceDocument: Xanadu Customer Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/customer-service-management

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu Customer Service Management

ft:clusterId :

    - csm

bundleId :

    - csm

workflow :

    - Customer and Industry


---

# Reverse matching

# Reverse matching {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Reverse matching uses the same matching rules to match tasks to a resource rather
than resources to a task.

## Before you begin

Role required: sn_customerservice_agent, sn_customerservice_manager, and admin

## About this task

The resource matching engine can match resources and tasks in two ways:

* Forward: matches resources for a task
* Reverse: matches tasks for a resource
{#t_ReverseMatching__ul_zgg_krv_tt}

The same matching rule can be used for both forward and reverse matching.

## Procedure

* In the Customer Service Management application, you can use reverse matching to determine which call the next available agent should take.
* Reverse matching returns a list of case sys_ids instead of user sys_ids.  
  When using reverse matching, you can also limit the cases returned to a specific set. The following example shows how to use reverse matching.  

      MatchingRuleProcessor.processAndGetCandidates(resource, taskLimit, "sn_customerservice_case", "reverse", false, [<array of cases to consider>])

{#t_ReverseMatching__steps-unordered_hzz_24t_nsb}
* **[Limit the number of task sys_ids returned for reverse matching rules](https://www.servicenow.com/docs/3FduRjz_pUYj4ze_hz4S1w)**   
  Reverse matching rules return a list of case sys_ids. Limit the number of cases returned by configuring the number in the reverse.matchingrule.entity.limit system property.

