ScheduleFulfilmentExpiryNow
Changed on:
29 Nov 2023
Overview
The sets an expiry time for the incoming fulfilment based on the ’s `Pick&PackTimeLimit`
and schedules a "FulfilmentExpiry" .
Plugin Name | Order Reference Module |
---|---|
Namespace | [[account.id]].order |
The is the foundation for order-related implementations. It provides reference workflows for , 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 does not identify any input parameters.
Event attributes
This does not directly identify any attributes.
Exceptions
This 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 `FulfilmentExpiry`
.
Version History
v1.0.0
refers to