Author:
Kirill Gaiduk
Changed on:
25 Sept 2025
Author:
Kirill Gaiduk
Changed on:
2 Oct 2025
`locationDistance`, `locationDistanceBanded`, `locationDistanceExclusion``inventoryAvailability`, `inventoryAvailabilityBanded`, `inventoryAvailabilityExclusion``networkPriority`, `locationTypeExclusion`, `locationNetworkExclusion``locationDailyCapacity``SourcingCriterion` GraphQL type.It refers to an individual, concrete instance of a Sourcing Criterion that is configured as part of a Sourcing Strategy.| 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 |
`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`BaseSourcingCriterion``LocationDistanceCriterion` – calculates distance between destination and Location`InventoryAvailabilityCriterion` – evaluates available stock coverage`NetworkPriorityCriterion` – prioritizes Locations based on Network membership`normalize()` to adjust rating scales (e.g., smaller distance = higher score)`@SourcingCriterionInfo` - defines metadata such as `name`, `type`, `tags`, and `label``@SourcingCriterionParam` - specifies configurable parameters, UI component type, and options`SourcingCriteriaUtils`)`CriteriaArray` - stacks multiple Criteria for sequential evaluation and tie-breaking`normalize()` - scales ratings across all candidate Locations into a [0..1] range`getFloats`, `getStrings`, `getDistanceUnits`) - parse parameter values from JSON configs`getCriteria(...)` - merges default and Strategy-specific Criteria into a single evaluation stack`SourcingCriteriaTypeRegistry`)Author:
Kirill Gaiduk
Changed on:
26 Sept 2025

Author:
Kirill Gaiduk
Changed on:
26 Sept 2025
`type` (for example, `fc.sourcing.criterion.locationDistance`) and applies its `apply()` method to every candidate Location.`BaseSourcingCriterion` and Criterion Utilities:`apply()` calls pre-logic, executes business rules, and post-logic`normalize()` adjusts raw scores to a [0–1] range where applicable`parseParams()` reads JSON params defined in the `fc.rubix.order.sourcing.criteria` Setting`getFloats`, `getStrings`, `getDistanceUnits`) ensure correct types and default handling| Class(Criterion Utilities) | Type(Sourcing Criteria Schema) | Description(UI) | Notes |
`LocationDistanceCriterion` | `fc.sourcing.criterion.locationDistance` | Prioritises locations that are geographically closer to the delivery address |
|
`LocationDistanceBandedCriterion` | `fc.sourcing.criterion.locationDistanceBanded` | Ranks locations by distance bands {{value}}, prioritising bands that are closer |
|
`LocationDistanceExclusionCriterion` | `fc.sourcing.criterion.locationDistanceExclusion` | Excludes locations that are farther than {{value}}{{value}} | Excludes (-1) Locations beyond a specified maximum distance threshold (in km or miles) |
`LocationDailyCapacityCriterion` | `fc.sourcing.criterion.locationDailyCapacity` | Prioritises locations with the highest available daily fulfillment capacity | Rates Locations based on their `DAILY_MAX_ORDER_CAPACITY` attribute value (higher capacity = higher rating) |
`NetworkPriorityCriterion` | `fc.sourcing.criterion.networkPriority` | Prioritises locations by the specified network ranking {{value}} |
|
`InventoryAvailabilityCriterion` | `fc.sourcing.criterion.inventoryAvailability` | Prioritises locations based on total units of inventory requested in the order that can be fulfilled |
|
`InventoryAvailabilityBandedCriterion` | `fc.sourcing.criterion.inventoryAvailabilityBanded` | Ranks locations by fulfillment percentage bands {{value}}, prioritising bands with higher availability |
|
`InventoryAvailabilityExclusionCriterion` | `fc.sourcing.criterion.inventoryAvailabilityExclusion` | Excludes locations where inventory availability for a given order, is less than {{value}}% | Excludes (-1) Locations that do not meet the configured minimum fulfillment threshold (in %) |
`LocationTypeExclusionCriterion` | `fc.sourcing.criterion.locationTypeExclusion` | Excludes locations of type {{value}} | Excludes (-1) Locations whose type matches a configured value(s) (e.g., store vs. warehouse) |
`LocationNetworkExclusionCriterion` | `fc.sourcing.criterion.locationNetworkExclusion` | Excludes locations that are members of one of the following networks {{value}} |
|
`OrderValueCriterion` | `fc.sourcing.criterion.orderValue` | Prioritises locations that fulfill a higher monetary portion of the order |
`InventoryAvailabilityCriterion`, surplus Inventory does not increase the score above 1 because the calculation caps the fulfilled value at the requested quantity of each Item |
| Class | Type | Notes |
`RejectedLocationExclusionCriterion` | `fc.sourcing.criterion.locationExclusion` | Automatically excludes Locations that previously rejected Items in the same Sourcing Request (applied by default, not shown in UI) |
`fc.rubix.order.sourcing.criteria` Setting to ensure valid configuration:`value`: Numeric thresholds or band breakpoints. An input like [10, 25, 50] defines 4 bands:`valueUnit`: Selects unit of measure where applicable (kilometres, miles)`component`: UI input type such as `fc.field.multistring`, `integer`, or `select``mandatory` / `exactSearch`: Validation flags controlling whether the field must be provided and if exact match applies`fc.rubix.order.sourcing.criteria` Setting defines templates for all reference Sourcing Criteria. Each template specifies the required UI components and their validation rules to ensure that Criteria parameters are entered consistently and correctly.For account/retailer-specific adjustments, override Criteria in `fc.rubix.order.sourcing.criteria.custom`. When a Criterion with the same `name` exists in both schemas, the custom schema takes precedence, allowing organizations to tailor global definitions to their own business needs without breaking the baseline.`fc.rubix.order.sourcing.criteria.custom` when tailoring Criteria for specific Accounts / Retailers``pom.xml`` file.`SourcingCriterion` (or extend `BaseSourcingCriterion`)`execute(CriterionContext ctx)` (when extending `BaseSourcingCriterion`)`parseParams(JsonNode params)` if needed`normalize(min, max, rating)` when your metric’s “lower is better” (e.g., distance)1@SourcingCriterionInfo(
2 name = "mySourcingCriterion",
3 type = "company.sourcing.criterion.my",
4 tags = { "ATS-agnostic" } // or "ATS-dependent", "Exclusion"
5)
6public class MySourcingCriterion extends BaseSourcingCriterion {
7
8 @SourcingCriterionParam(name = "value", component = "integer")
9 private Integer threshold;
10
11 @Override
12 public void parseParams(final JsonNode params) {
13 // parse threshold, lists, units, etc.
14 }
15
16 @Override
17 protected float execute(final SourcingCriteriaUtils.CriterionContext ctx) {
18 // Return:
19 // -1f to exclude a location,
20 // 0..1f (or any float) to score/rank a location.
21 return 0.75f;
22 }
23
24 // Override normalize(...) only if the default doesn’t fit your scale
25}`type` with `SourcingCriteriaTypeRegistry`.1static { SourcingCriteriaTypeRegistry.register("company.sourcing.criterion.my", new MySourcingCriterion());}`fc.rubix.order.sourcing.criteria.custom` with your new Criterion schema, similar to Conditions.`SourcingCriteriaTypeRegistry`.`@SourcingCriterionInfo` + `@SourcingCriterionParam` annotations`java -jar <path>util-sourcing-<version>-sources.jar``fc.rubix.order.sourcing.criteria.custom` Setting`params` - regenerate to keep UI configs in sync