Sourcing Criteria Overview
Essential knowledge
Intended Audience:
Technical User
Author:
Kirill Gaiduk
Changed on:
2 Oct 2025
Overview
Sourcing Criteria determine which eligible Locations are best once a Strategy applies. You’ll learn how to configure, sequence, and extend Criteria so your prioritization is predictable and explainable across business scenarios.Key points
- Define prioritization with configurable Sourcing Criteria that score and order candidate Locations
- Reference Sourcing Criteria schema is global and can be extended or overridden with customer-specific definitions for tailored Strategies
- Criterion Utilities provide reference functions, normalization, and a registry/annotations model for custom extensions
- Configure all Criteria with clear names, parameters, and evaluation order to ensure accurate and predictable ranking
What is a Sourcing Criterion?
A Sourcing Criterion is a function that returns a numeric rating for a Location (or excludes it by returning -1). Criteria are evaluated only after a Strategy passes its Conditions. Typical examples:- Proximity:
`locationDistance`,`locationDistanceBanded`,`locationDistanceExclusion` - Availability-driven:
`inventoryAvailability`,`inventoryAvailabilityBanded`,`inventoryAvailabilityExclusion` - Business preference:
`networkPriority`,`locationTypeExclusion`,`locationNetworkExclusion` - Operational:
`locationDailyCapacity`
Architectural Context
Sourcing Criteria are part of the Responsive Sourcing Framework within the Fluent platform. They sit in several places within the platform, each serving a distinct role:1. Sourcing Criterion Entity
Sourcing Criterion Entity is represented by the`SourcingCriterion` GraphQL type.It refers to an individual, concrete instance of a Sourcing Criterion that is configured as part of a Sourcing Strategy.Structure
| Field | Type | Description | Notes |
`name` | `String` | Name of the Sourcing Criterion | The `name` serves as a unique identifier for Sourcing CriteriaReference Sourcing Criteria schema (specified in the `fc.rubix.order.sourcing.criteria` Setting) can be overridden by using the same `name` and alternative configuration in the `fc.rubix.order.sourcing.criteria.custom` Setting |
`type` | `String` | Type of the Sourcing Criterion | The `type` is mapped to a specific function in the `util-sourcing` library (Criterion Utilities) |
`params` | `Json` | Parameters of the Sourcing Criterion | The Parameters configure Sourcing Criteria to support specific customer sourcing logicAvailable configuration options are defined with the `fc.rubix.order.sourcing.criteria` and `fc.rubix.order.sourcing.criteria.custom` Settings |
2. Sourcing Criteria Schema
The Sourcing Criteria schema is located in the dedicated Setting(s):`fc.rubix.order.sourcing.criteria`stores reference (`GLOBAL`) Sourcing Criteria schema`fc.rubix.order.sourcing.criteria.custom`can be created for customer-specific (`ACCOUNT`/`RETAILER`) Sourcing Criteria schema
3. Criterion Utilities
Criterion Utilities are an integral part of the Sourcing Utilities bundle.They include:
- Reference Criterion Functions
- Implemented as classes extending
`BaseSourcingCriterion` - Each class encapsulates the logic for scoring (or excluding) Locations, for example:
`LocationDistanceCriterion`– calculates distance between destination and Location`InventoryAvailabilityCriterion`– evaluates available stock coverage`NetworkPriorityCriterion`– prioritizes Locations based on Network membership
- Criterion classes can override
`normalize()`to adjust rating scales (e.g., smaller distance = higher score)
- Implemented as classes extending
- Annotations and Auto-Generation
`@SourcingCriterionInfo`- defines metadata such as`name`,`type`,`tags`, and`label``@SourcingCriterionParam`- specifies configurable parameters, UI component type, and options- These annotations are processed to automatically generate the Sourcing Criteria Schema JSON, which feeds the configuration UI
- Helper Methods (
`SourcingCriteriaUtils`)`CriteriaArray`- stacks multiple Criteria for sequential evaluation and tie-breaking`normalize()`- scales ratings across all candidate Locations into a [0..1] range- Utility methods (
`getFloats`,`getStrings`,`getDistanceUnits`) - parse parameter values from JSON configs `getCriteria(...)`- merges default and Strategy-specific Criteria into a single evaluation stack
- Criterion Registry (
`SourcingCriteriaTypeRegistry`)- Registers and retrieves Criterion classes by their type identifier
- Dynamically instantiates Criterion implementations during Strategy evaluation
- Supports extension with custom Criterion classes through explicit registration
Features
Within the Responsive Sourcing Framework, Sourcing Criteria provide the ability to:- Prioritize fulfillment Locations by configuring Criteria that score, rank, or exclude candidates
- Leverage the reference library of predefined Sourcing Criteria, with flexible parameters and configuration options
- Develop new Sourcing Criteria using recommended patterns and best practices to extend ranking logic as needed
