Sourcing Conditions Overview
Intended Audience:
Technical User
Author:
Kirill Gaiduk
Changed on:
2 Oct 2025
Overview
Sourcing Conditions let you control how Sourcing Strategies are applied within the Responsive Sourcing Framework. After reading, you will understand how to configure and extend them to adapt sourcing logic for specific Sourcing Requests.
Key points
- Define your sourcing logic with configurable Sourcing Conditions that evaluate Sourcing Requests and return true/false outcomes
- Reference Sourcing Conditions schema is global but can be extended or overridden with customer-specific definitions for tailored Strategies
- Condition Utilities provide reference function, default operators (equality, comparison, membership, existence), and support custom extensions
- All Conditions should be configured with clear naming and parameters to ensure accurate and predictable evaluation
What is a Sourcing Condition?
A Sourcing Condition is a function that returns a boolean value (`true`
or `false`
) based on the evaluation of the Sourcing Context. It determines whether a Primary or Fallback Sourcing Strategy applies to a specific Sourcing Request, such as:
- Order
- Fulfillment Choice
- Fulfillment Option
Architectural Context
Sourcing Conditions 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 Condition Entity
Sourcing Condition Entity is represented by the `SourcingCondition`
GraphQL type.
It refers to an individual, concrete instance of a Sourcing Condition that is configured as part of a Sourcing Strategy.
Structure
Field | Type | Description | Notes |
|
| Name of the Sourcing Condition | The Reference Sourcing Conditions schema (specified in the |
|
| Type of the Sourcing Condition | The |
|
| Parameters of the Sourcing Condition | The Parameters configure Sourcing Conditions to support specific customer sourcing logic Available configuration options are defined with the |
2. Sourcing Conditions Schema
The Sourcing Conditions schema is located in the dedicated Setting(s):
`fc.rubix.order.sourcing.conditions`
stores reference (`GLOBAL`
) Sourcing Conditions schema`fc.rubix.order.sourcing.conditions.custom`
can be created for customer-specific (`ACCOUNT`
/`RETAILER`
) Sourcing Conditions schema
It defines the structure of a Condition and specifies which parameters it can include. In practice, it acts as the template for a Sourcing Condition that is added to the Conditions library, making it available for configuration and use by end users.
3. Condition Utilities
Condition Utilities are an integral part of the Sourcing Utilities bundle.
They include:
- Reference Condition Function (
`DefaultSourcingCondition`
)- This class evaluates a Sourcing Condition using three key parameters:
`path`
– identifies the value(s) within the Sourcing Context (for example, Order creation date, Delivery country, Customer tier, or Product category)`operator`
– defines how the values are compared`value`
– the target value or array of values specified in the Condition`params`
- The function checks whether the values retrieved from the Sourcing Context (via the JSON path) meet the criteria defined by the operator and
`params`
values - The outcome of this check determines whether the Condition is satisfied
- This class evaluates a Sourcing Condition using three key parameters:
- Operator Utilities
- Include reference operators (equality, comparison, set membership, existence checks)
- Support custom operators registration (via
`SourcingConditionOperatorRegistry`
) - Provide common validation and value-conversion logic (
`AbstractSourcingConditionOperator`
)
- Helper Methods (
`SourcingConditionUtils`
)- Evaluate a list of Conditions against a Sourcing Context
- Return:
`true`
if all Conditions pass or list is empty /`null`
`false`
if at least one Condition fails
- Custom Condition Registry (
`SourcingConditionTypeRegistry`
)- Registers and retrieves Condition types by identifiers
- Dynamically instantiates Condition implementations during Strategy evaluation
Features
Within the Responsive Sourcing Framework, Sourcing Conditions provide the ability to:
- Adapt sourcing logic to specific business needs by configuring different Sourcing Strategies and controlling their application based on the characteristics of a Sourcing Request
- Leverage the reference library of predefined Sourcing Conditions, along with extensive configuration and customization options
- Develop new Sourcing Conditions using recommended patterns and best practices to extend sourcing logic as needed