Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. set_milestone : set the achieved milestone. If empty, without_always_at_start milestone is set (generally de case when initiating milestones in the graph).
    For the set_milestone action to work, the line item group must have stock location ID assigned. As a result, when placing a set_milestone in the workflow it must be placed after assign origin actions.

    1. 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, if any..

    2. When recomputing, solutions with non-achieved milestones dates in the future (greater than now) will be considered as valid options. Those with dates in the past, will not be considered.

  2. set_milestone_alert : Schedule alerts to be triggered at milestones cutoffs (plus a delay)

    1. 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.

      1. (info) The time at which the notification will be triggered is the milestone cutoff of the first milestone stored in order_delivery_promises. Cutoffs are sorted based on the sort criteria configured for the site.

    2. A special notification named recompute_cutoffs_sets can be called to recompute the cutoffs for each milestone.

...

Note

For the set_milestone action to work, the line item group must have stock location ID assigned. As a result, when placing a set_milestone in the workflow it must be placed after assign origin actions, if any.

Code Block
languageyaml
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