Fluent Commerce Logo
Docs

CreateFulfilmentForFulfilmentChoiceForUnfulfillableItems

Rule

Changed on:

8 Aug 2025

Overview

The rule creates a rejected fulfilment for order items that could not be fulfilled (no inventory) based on location. The rule processes only fulfilments that are in accepted statuses and not in rejected statuses. If the `fulfilmentType` parameter is not empty then a fulfilment with this type will be created.
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

Creates a rejected fulfilment for order items that could not be fulfilled (no inventory) based on location from "systemRejectedLocationRef". The rule processes only fulfilments which are in accepted statuses from "acceptedStatuses" and not in rejected statuses from "rejectedStatuses". If the "fulfilmentType" parameter is not empty then a fulfilment with this type will be created.

Accepts

  • FULFILMENT_CHOICE

Actions

  • Creates a rejected fulfilment for order items that could not be fulfilled (no inventory) using location, accepted statuses and rejected statuses

Rule parameters

ParameterDescription
systemRejectedLocationRefThe value of the location to be used in the new rejected fulfilment.
acceptedStatusesThe list of statuses in which fulfilments will be processed by the rules.
rejectedStatusesThe list of statuses in which fulfilments will not be processed by the rules.
fulfilmentTypeThe type of the fulfilment.

Event attributes

ParameterDescriptionData TypeRequired?
fulfilmentChoiceRefReference to the fulfilment choiceStringRequired

Exceptions

This rule will throw an IllegalArgumentException
  • if invalid fulfilment choice type
  • if invalid location type
  • if invalid `acceptedStatuses`, must not be empty
  • if invalid `rejectedStatuses`, must not be empty
  • if found a fulfilment status in both `acceptedStatuses` and `rejectedStatuses` lists
All generated exceptions will be wrapped with RubixException

Configuration example

1{
2  "name": "<ACCOUNTID>.order.CreateFulfilmentForFulfilmentChoiceForUnfulfillableItems",
3    "props": {
4        "fulfilmentType":"HD_PFS",
5        "systemRejectedLocationRef":"{{escalationLocation}}",
6        "acceptedStatuses":"[{{acceptedFulfilmentStatuses}}]",
7        "rejectedStatuses":"[{{rejectedFulfilmentStatuses}}]"
8    }
9}

Detailed Technical Description

Extension

If you are using Click and Collect, Home Delivery or Mixed Baskets reference workflows, the following fulfilment types can be used without additional rule modification.`CC_PFS` for Click & Collect - Pick from Store`CC_PFDC` for Click & Collect - Pick from DC`HD_PFS` for Home Delivery - Pick from Store`HD_PFDC` for Home Delivery - Pick from DCIf you create your own fulfilment type and would like it to be supported in our reference workflow, you need to set the custom type in the `fulfilmentType` field and update the workflow so the new fulfilment type can be processed.Useful information:
  • A guide about uploading and installing plugins with modified rules is available here;
  • The Workflow Engine overview is available here.

Version History

2023-08-04

v1.0.1

refers to plugin