Fluent Commerce Logo
Docs
Sign In

SetFulfilmentItemRejections

Rule

Changed on:

2 Oct 2024

Overview

This rule is executed to update item quantities and record rejection reasons when items are rejected.

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

Confirm fulfilment items quantity and rejections

Accepts

  • Fulfilment

Actions

  • This Rule conditionally produces a updateFulfilment 
    `MutateAction`

Event attributes

Parameter

Description

Data Type

Required?

packedItems

The list of packed and rejected fulfilment items

Object

Required

Exceptions

This rule may result in following exception:

  • throw
    `IllegalArgumentException`
    if incoming event has no
    `packedItems`
    attribute.

Configuration example

1{
2   "name": "[[account.id]].order.SetFulfilmentItemRejections",
3   "props": null
4}

Language: json

Detailed Technical Description

This rule gets the

`packedItems`
attribute from the event. 

If a fulfilment item was rejected at the PICK step, then this rule will create a

`fulfilmentItemRejection`
for this item with a default
`"Rejected outside of packing"`
reason. If a fulfilment item was rejected at the PACK step (
`packedItems.rejections`
attribute is not empty), then that rule will create a
`fulfilmentItemRejection`
for this item with the reason and quantity provided in
`packedItems.rejections`
attributes. 

If the

`packedItems.rejections`
attribute is empty, and there were no rejected parcels at the PICK step, then the rule will not produce anything.


1{"packedItems": {
2      "rejections": [
3        {
4          "fulfilmentItemId": "139",
5          "rejectedQty": 2,
6          "rejectReason": {
7            "label": "fc.sf.rejectionReason.damagedItem",
8            "value": "damagedItem"
9          }
10        }
11      ]
12    }
13  }

Language: json

Name: Example of packedItems attribute

Description:

[Warning: empty required content area]
Workflow Builder (Modeller) Screenshot
No alt provided

Version History

2024-10-08

v1.0.0

Initial release

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo