Fluent Commerce Logo
Docs
Sign In

CreateWaveByExpiry

Rule

Changed on:

13 Nov 2023

Overview

Create a wave from fulfilments in statuses 

`{status}`
, prioritizing those with the earliest expiry.

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

Create a wave from fulfilments in statuses {status}, prioritizing those with the earliest expiry.

Accepts

  • Location

Actions

  • Type: CreateWave mutation
  • Condition: Always
  • Description: Sends a GraphQL mutation that creates a Wave with the Fulfilments found.

Rule parameters

Properties

Type

Description

statuses

`Array of Strings`

The Fulfilment statuses to be included in the wave

Event attributes

Name

Type

Required?

Default

Description

maxCount

`integer`

Yes

N/A

The maximum number of Fulfilments that can be allocated to the Wave. Must be a positive integer.

userName

`string`

No

N/A

The login name of the store-associate that will process the Wave.

Detailed Technical Description

No alt provided
  • Does a GraphQL query to look for all Fulfilments
  • Filters for Fulfilments with the specified statuses
  • Any Fulfilments that are in an existing Wave are filtered out from this list
  • Then sort these Fulfilments by expiry time, prioritizing oldest to newest first
  • If more than one Fulfilment has the exact same expiry time then use the Fulfilment ID to dictate the priority (its highly unlikely this logic will be used as expiry times are down to the ms)
  • Then performs a mutation to create a Wave for the first 
    `maxCount`
     Fulfilments in the sorted list
  • Optionally sets the assignee of the Wave to the 
    `userID`
     associated with the 
    `username`
     event attribute

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