Fluent Commerce Logo
Docs
Sign In

AllocateConfirmedItemsByFulfilmentExpiry

Rule

Changed on:

13 Nov 2023

Overview

Allocates picked items to all Fulfilments in the Wave. Priortizing the Fulfilments expiring first and not in specified statuses. Secondly, notifies Fulfilments with the specified event name.

Plugin NameFulfilment Reference Module
Namespace{{accountId}}.fulfilment

The Fulfilment Reference Module is the foundation for in-store operations. It provides a reference Workflow for pickpack, and shipping of orders for in-store staff. Extensible by design, use this Module as a base to build a solution to the needs of your customers.

UI Description

Allocates picked items to all Fulfilments in the Wave. Priortizing the Fulfilments expiring first and not in specified statuses. Secondly, notifies Fulfilments with the specified event name.

Accepts

  • Wave

Actions

  • Type: sendEvent
  • Condition: Always
  • Description: Sends an event containing the items picked by the Store associate, and how the individual items were then allocated to the Fulfilments.

Rule parameters

Properties

Type

Description

eventName

`string`

Name of the outgoing event sent for each Fulfilment

excludedStatuses

`Array of Strings`

The statuses of the Fulfilments that should be excluded from having picked items allocated to them

Event attributes

Name

Type

Required?

Default

Description

pickedItems

`Array of PickedItems`

Yes

N/A

Contains the details of what was picked for each item.

Attribute Types

PickedItems 

Name

Type

Required?

Description

productRef

`string`

Yes

The ref of the item that was picked

availableQty

`integer`

Yes

The quantity of the item that was picked by the store associate

catalogueRef

`string`

Yes

The catalogue of the product that was picked


Detailed Technical Description

Detailed Rule Logic

No alt provided
  • Checks if event attribute 
    `pickedItems`
     is null or empty, if this is true then "Event does not have 
    `pickedItems`
     attributes"
  • Validate each 
    `pickedItem`
     to ensure the items are valid by:
    • Check 
      `availableQty`
       is less than 0 then --> "
      `pickedItem`
       
      `availableQty`
       is negative for 
      `productRefs`
      "
    • Check 
      `productRef`
       is blank or empty then --> "
      `pickedItem`
       
      `productRef`
       is empty or blank"
  • Loop through each 
    `FulfilmentItem`
     and determine if there is an available quantity from the picked items to allocate to that Fulfilment. If so, we then set the 
    `FulfilmentItem.filledQuantity`
     equal to the amount requested and decrement the 
    `availableQty`
     for that item.
  • If, you can't allocate any of the available quantity to a 
    `FulfilmentItem`
    , then set the rejected quantity equal to the outstanding amount. Note, Fulfilments can be partially fulfilled, you still allocate available quantities to a Fulfilment even if one particular line could not be filled.
  • For each Fulfilment, send an event, the details of what is contained in that event can be found in the Actions section below.

Version History

2023-08-02

v23.8.2

refers to plugin

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