ScheduleFulfilmentExpiryNow
Changed on:
8 Aug 2025
Overview
The rule sets an expiry time for the incoming fulfilment based on the location’s `Pick&PackTimeLimit`
and schedules a "FulfilmentExpiry" event.
Plugin Name | Order 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
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}
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:
- Get
i. Compute the `expiryTime`
for the fulfilment from the current moment (immediate proceeding)
ii. Update the fulfilment with `expiryTime`
iii. Send the event `FulfilmentExpiry`
.