Search Results get_metric_value




Overview

PV_MATCH_V3_PUB is a public PL/SQL package owned by the APPS schema in Oracle E-Business Suite. It belongs to the Oracle Partner Management and TeleSales foundation, which supports partner selection, lead assignment, and opportunity routing for channel and direct sales organizations. The package implements the business rules engine that determines how leads, opportunities, and other sales entities are matched to the most appropriate partners or resources based on defined selection criteria.

The package is classified as a public (PUB) API, meaning its procedures are intended for external invocation from forms, concurrent programs, and custom extensions rather than being restricted to internal package use. Its central role is to evaluate process rules, compare entity attributes against configured routing and selection criteria, and persist the resulting match assignments. In EBS 12.1.1 and 12.2.2, this package remains a foundational dependency for partner management workflows and the sales team assignment model.

Key Procedures and Functions

The documented interface exposes thirteen procedures and functions that together support the matching lifecycle:

  • MANUAL_MATCH — Performs a user-initiated match, allowing an operator to explicitly assign an entity to a partner or resource outside the automated rules path.
  • PARTNER_SELECTION — Executes the partner selection algorithm, evaluating candidate partners against configured criteria and returning qualified matches.
  • OPPORTUNITY_SELECTION — Performs the analogous selection process for opportunities, identifying the appropriate partner or resource for an opportunity record.
  • CLEAR_RULES_CACHE — Purges cached process rule and selection criteria data so that subsequent matching calls pick up configuration changes.
  • GET_MATCHED_PARTNER_DETAILS — Retrieves the details of partners that have been matched, supporting downstream display and processing.
  • GET_PARTNER_TYPES — Returns the partner type classifications used during selection and filtering.
  • GET_ATTRIBUTE_VALUE — Resolves the value of a specific entity attribute used in matching logic.
  • GET_METRIC_VALUE — Retrieves a numeric metric associated with an entity for use in scoring or ranking.
  • GET_CURRENCY_METRIC_VALUE — Returns a currency-denominated metric value, applying the appropriate currency context.
  • PREF_PARTNER_FLAG — Determines or returns the preferred-partner indicator for a match candidate.
  • LOCK_FLAG — Manages the lock indicator that prevents concurrent modification of match records.
  • GET_ASSIGN_STATUS_MEANING — Translates assignment status codes into their user-facing meanings.

Tables Accessed

The package works across a set of partner management and routing tables referenced through APPS synonyms. PV_PROCESS_RULES_B and PV_ENTITY_ROUTINGS store the rule definitions and routing configuration that drive selection. PV_ENTY_SELECT_CRITERIA holds the selection criteria evaluated against entities, while PV_ENTITY_ATTR_MAPPINGS, PV_ENTY_ATTR_VALUES, and PV_SELECTED_ATTR_VALUES provide the attribute mapping and value stores used to score and compare candidates. PV_LEAD_ASSIGNMENTS, PV_LEAD_WORKFLOWS, and PV_PARTY_NOTIFICATIONS capture the assignment results, workflow state, and notification records produced by matching. Source entities such as AS_LEADS_ALL supply lead data, while HZ_LOCATIONS, HZ_PARTY_SITES, and JTF_RS_RESOURCE_EXTNS supply party site, location, and resource information for partner and resource candidates. FND_USER supports user context, and DBMS_SQL is used for dynamic SQL construction where criteria must be evaluated flexibly.

Usage Notes

PV_MATCH_V3_PUB is typically invoked from the Partner Management and TeleSales forms when users run lead or opportunity assignment, and from concurrent programs that batch-process routing and partner selection. Custom extensions and integrations may call the public procedures directly to embed matching logic into bespoke workflows. Because the package caches rule data, callers should invoke CLEAR_RULES_CACHE after modifying process rules or selection criteria to ensure subsequent matches reflect the updated configuration. The package depends on FND_API for the standard API framework and on JTF table types for bulk parameter passing. It is referenced by AST_SALES_TEAM_PTR_V, confirming its role in the sales team assignment view layer.