Create Custom Sourcing Condition
Authors:
Kirill Gaiduk, Alexey Kaminskiy
Changed on:
24 Sept 2025
Key Points
- Outcome: After completing this guide, you will know how to extend the Responsive Sourcing Framework with a Custom Condition and apply it in real Strategies
- Minimal essentials: The process has four parts - implement the Condition, register it, expose it in the Setting, and verify behavior
- Application: You will be able to influence sourcing decisions with your own logic, tailored to specific business contexts
Prerequisites
Steps
Preliminary Setup
``pom.xml`` file.
Implement a Custom Sourcing Condition Function
- Create your class, e.g.,
`MySourcingCondition`, implementing the`SourcingCondition`interface. - Add your evaluation logic in
`evaluateWithContext`method.
Register the Condition in the Type Registry
`type` key in the static block of `SourcingConditionTypeRegistry`.
Expose the Condition Schema via Setting
`fc.rubix.order.sourcing.conditions.custom` with your new Condition schema.
Verify the Condition Behavior
- Use the Sourcing Profile GraphQL API to add the new Condition to a Sourcing Strategy.
- Test against different Sourcing Requests and confirm the expected outcomes.
