---
schema_version: "1"
id: 72bc2f5ff9630fc5fb1070e3e3895b1c876d0256ee344cc2c31d894f782b178a
title: Tightest Match
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/comms_tightest_match.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.comms_tightest_match.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fcd1e73f557271c70cf803688ea562bd739ccd10d6c5b4e131c1a254421a4820
description: Products can have multiple price list entries across child price lists or in a single price list. You can use context rules to determine which price list entry to apply when the product is added to the cart.
products:
  - Communications
  - Media
  - Energy and Utilities
release: "264"
---
# Tightest Match

Products can have multiple price list entries across child price lists or in a single price list. You can use context rules to determine which price list entry to apply when the product is added to the cart.

For example, you might want rules like this:

- Orders placed over the web receive certain prices
- New customers receive certain prices
- Geographic regions receive certain prices

In a world of multiple prices, what if the customer is eligible for multiple prices? In the end, a single price must be set. That’s when the TightestMatchInterface comes into play.

## TightestMatchInterface

TightestMatchInterface is an interface that is provided as part of the managed package. It is called by the PricingInterface when using either PricingElementServiceImplementation or PricingPlanService implementations. It is not called when using PricingRulesImplementation.

TightestMatchInterface includes two interface implementations: FirstMatchImplementation and TightestMatchServiceImplementation.

- **FirstMatchImplementation** ignores any condition weights and selects the first price list entry that it finds.
- **TightestMatchServiceImplementation** uses condition weights to determine the “tightest match” price. For more information on condition weights, see [Using Condition Weights](https://help.salesforce.com/s/articleView?id=ind.comms_condition_weights.htm&release=264.0.0&type=5 "Condition weight is a general property of context dimensions. Condition weights are numeric values ranging from 0 to 60. These values are used by the TightestMatchInterface to calculate the relative weight of rules assigned to a price list entry.").

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/images/icon_note.png)

Note

To use condition weights and the tightest match algorithm set the TightestMatchServiceImplementation as the active implementation for the TightestMatchInterface.

Using the TighestMatchInterface and Context Rules to Set the "Tightest Match" Price

![When three rules can apply to the price, the tightest match determines which is selected.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/tightest_match.jpg)

## Tightest Match User Experience

When there is only one “winning” tightest match, the user experience is the same as a standard price list entry.

However, when there are multiple “winning” tightest matches, the most recent price list entry is selected, and the price list entries not selected are displayed in the price Details window.

**Tightest Match User Experience**

![Figure is described in preceding text.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-comms_media_energy_managed-264-0-0-production-enus/ff4079f6-a384-475c-b863-578bbbb0ef9b/resources-product/images/tightest_match_ux.jpg)