...
Milestones are calculated based on delivery configuration operations.
Operations taken into account are always_at_start
, before_shipping
and from_destination
. Operations of type after_shipping
are not taken into account, as when received, the current delivery promise eta end is the milestone of interest.
Milestones are precalculated and stored in Endpoint Delivery Promises under the object cutoffs.
Milestone names are auto-generated and match delivery configuration’s operation names.
Info |
---|
Delivery configuration’s operations duration depends on operations set in the points of stock. If an operation is not set in the point of stock, a duration of 0 seconds will be considered for it. |
Endpoint Delivery Promise (EDP) Cutoff Example
|
Using milestones
To exploit milestones during orders order's treatment, milestones must configured be used in the worklflowworkflow. This allows to set milestones - considered that it has been reached - and set alerts if not reached in time.
Workflow
Info |
---|
All information regarding workflow actions can be found at Orders & workflows |
set_milestone : Initiate milestones for line item groups
To make use of milestones, they must be stored for the order at each of its line_item_groups claimed transition. To do so, the action set_milestone has to be set in the claim transition of the line_item_groups.
set_milestone_alert : Schedule alerts to be triggered at milestones cutoffs (plus a delay)
Notifications can be scheduled to be triggerd at the time of milestones cutoffs (plus a certain delay). When triggered, a validity check will be performed to ensure the specified milestone has not yet been reached/acheived. If already reached, notifications won't be triggered.
A special notification named "
recompute_cutoffs_sets
" can be called to recompute the cutoffs for each milestonesmilestone.
Configuration example
Code Block | ||
---|---|---|
|
...
placed: |
...
transitions: |
...
|
...
claimed: # De placed à claimed (VI) |
...
|
...
conditions: |
...
|
...
actions_after:
|
...
- type: set_milestone |
...
- type: set_milestone_alert |
...
|
...
parameters:
|
...
milestone: packed
|
...
notifications: |
...
|
...
- name: send_mail |
...
delay: -300 |
...
params: |
...
|
...
to: "tbaudon@onestock-retail.com" |
...
|
...
claimed:
|
...
transitions: |
...
packed: # De claimed à packed (VI)
|
...
conditions:
|
...
actions_after:
|
...
- type: set_milestone |
...
|
...
parameters: |
...
|
...
milestone : preparation #name depends on DP config |
...
packed: |
...
transitions: |
...
|
...
dispatched: # De packed à dispatched (VI)
|
...
conditions: |
...
|
...
actions_after:
|
...
- type: set_milestone
|
...
parameters: |
...
milestone : carrier_pickup |
Recovering milestones' information (not sure where to place it)
...