ScheduleFulfilmentExpiryNow
RuleRules are designed to be building blocks for workflow logic.
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 |
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
`expiryTime` for the fulfilment from the current moment (immediate proceeding)ii. Update the fulfilment with
`expiryTime`iii. Send the event
`FulfilmentExpiry`.