Create Custom Sourcing Condition
Authors:
Kirill Gaiduk, Alexey Kaminskiy
Changed on:
16 Apr 2026
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
`util-sourcing` at runtime so it can initialize its own local sourcing registries.You can include it in your project by:- Adding it as a dependency in your
`pom.xml`
- Using a provided JAR, depending on your build setup
Implement a Custom Sourcing Condition Function
`SourcingCondition` interface:1. Create your class, for example: `CustomSourcingCondition`.2. Implement the `SourcingCondition` interface.3. Add your business logic inside `evaluateWithContext` method.
Introduce Custom Sourcing Rules
`CreateFulfilmentWithSourcingProfile``CreatePartialFulfilmentWithSourcingProfile``CreateRejectedFulfilment`(if applicable)
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.
