Fluent Commerce Logo
Docs
Sign In

ScheduleFulfilmentExpiryNow

Rule

Changed on:

29 Nov 2023

Overview

The rule sets an expiry time for the incoming fulfilment based on the location’s 

`Pick&PackTimeLimit`
 and schedules a "FulfilmentExpiry" event.

Plugin NameOrder Reference Module
Namespace{{accountId}}.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

Sets an expiry time for the incoming fulfilment depending on the "PICK_N_PACK_TIME_LIMIT" set at the location and schedules a "FulfilmentExpiry" event. </br> The status of the fulfilment is not considered while setting the expiry.

Accepts

  • FULFILMENT

Actions

  • This rule sets a fulfilment expiry against the fulfilment and creates a scheduled FulfilmentExpiry event.

Rule parameters

This rule does not identify any input parameters.

Event attributes

This rule does not directly identify any event attributes.

Exceptions

This rule will throw an RubixException: 400 in case of an error.

Configuration example

1{
2  "name":"<ACCOUNTID>.order.ScheduleFulfilmentExpiryNow",
3  "props": {}
4}

Language: json

Detailed Technical Description

  • Get 
    `fulfilmentId`
     from the incoming event (
    `entityId`
    ).
  • Get fulfilment by Id via GQL query.
  • If there is address data:
    • Get 
      `locationRef`
       from 
      `PrimaryAddress`
       of fulfilment.
    • Get 
      `locationId`
       for the location.
    • Get 
      `timeZone`
       for the location.
    • Get 
      `pickPackLimitValue`
       for this location.
    • If the location has a 
      `Pick&Pack Time Limit`
       set:

  i.  Compute the 

`expiryTime`
 for the fulfilment from the current moment (immediate proceeding)
  ii. Update the fulfilment with 
`expiryTime`

  iii. Send the event 
`FulfilmentExpiry`
.

Version History

2023-08-03

v1.0.0

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