Versions Compared

Key

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

...

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

Recovering milestones' information (not sure where to place it)

Milestone information can be retrieved by calling the OMSv2 route GET v2/orders/:order_id/delivery_promise/details

Code Block
type DPDetails []DPDetailsForIndexes // List of DPDetails by index ranges

type IndexRanges struct {
  from int
  to int
}
type DPDetailsForIndexes struct {
  index_ranges     IndexRanges              
  endpoint_id      string                           
  milestones       map[string]IndexRanges 
  notification_key string                           
  cutoffs_sets     CutoffsSets // cutoffs sets from best to worst (depending of the context)
}

type CutoffsSets []CutoffsSet
type Carrier struct {
  name string
  option name
}
type CutoffsSet struct { // each index of milestones_cutoffs and eta_ends correspond to one possible scenario
  carrier             *Carrier
  milestones_cutoffs  map[string][]*int64 // for each milestone, the list of cutoffs
  eta_ends            []*int64            // the list of eta ends
}