Fluent Commerce Logo
Docs

CreatePartialFulfilmentWithSourcingProfile

Rule

Changed on:

27 Aug 2026

Overview

Create Partial Fulfillment(s) using the specified Sourcing Profile.The Rule evaluates Fallback Sourcing Strategies in priority order and executes only the highest-priority Strategy whose Conditions are fully satisfied.Location ratings are recalculated after each allocation to reflect remaining unfulfilled demand.
Plugin NameOrder Reference Module
Namespace[[account.id]].order
The Order Reference Module is the foundation for order-related implementations. It provides reference workflows for click & collect, home delivery and mixed baskets and those needed to build your own. Extensible by design, use this Module as a base to build a solution to your customers' needs.

UI Description

Apply the Sourcing Profile identified by {sourcingProfileRef} to a Sourcing Request (Order, Fulfillment Option, etc.) and produce Partial Fulfillment(s).

Accepts

  • ORDER
  • FULFILMENT_CHOICE

Actions

Rule parameters

NameTypeDescription
`sourcingProfileRef``String`Reference to the Sourcing Profile to apply.

Event attributes

This Rule does not expect any Event attributes.

Exceptions

  • This Rule throws a `PropertyNotFoundException` when the Rule parameter(s) is not provided.
  • This Rule throws an `IllegalArgumentException` if Sourcing Conditions or Criteria are improperly configured

Configuration example

1{
2  "name": "[[account.id]].order.CreatePartialFulfilmentWithSourcingProfile",
3  "props": {
4    "sourcingProfileRef": "GLOBAL_DEFAULT"
5  }
6}

Detailed Technical Description

This Rule executes the following steps:1. Validate the `sourcingProfileRef` parameter.2. Load the Sourcing Profile using the provided reference (`SourcingUtils.loadSourcingProfile`).3. Verify that the Sourcing Profile contains at least one Fallback Sourcing Strategy.4. Load the Sourcing Context and identify Unfulfilled Items (`SourcingContextUtils.loadSourcingContext`).5. Execute the first applicable Fallback Sourcing Strategy in `priority` order:  (`SourcingUtils.getPlanFinder().nextFallbackPlan()`):6. Set the fulfillment type for each Fulfillment based on Fulfillment Choice and Location (`OrderUtils.fillFulfilmentType`).7. Create the Fulfillment(s) (`OrderUtils.createFulfilments`).8. Capture the Sourcing Audit for the completed Sourcing Request and submit it (`SourcingUtils.captureAudit``createSourcingAudit` mutation).

Version History

2026-09-07

v26.9.7

Key Changes:
  • This rule now captures a Sourcing Audit of the completed Sourcing Request and submits it through the `createSourcingAudit` mutation
  • A failure to create the audit is logged and does not affect or reverse the sourcing outcome
2026-08-13

v26.8.13

Key Changes:
  • Location ratings are now recalculated after each allocation iteration to reflect remaining unfulfilled demand
  • Virtual Positions with status `AT_RISK` and `OUT_OF_STOCK` are now included when loading Locations during sourcing
  • Fulfillments are now assigned deterministic references to prevent duplication during concurrent re-sourcing
2025-09-29

v25.9.29

Initial release