Versions Compared

Key

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

...

Code Block
languageyaml
delivery_promise:
  cutoffs_sets: # from v 10.1
    use_sort_orders: true # if true: sorts cutoff sets using the delivery config's sort criteria. Cutoffs are sorted based on the below configuration default_sort_criteria>..>cutoffs.
    sort_critera: # sort criteria to use (overrides use_sort_orders:true, but does not override criteria when specified in GET /cutoffs request)
      eta_fulfilled: #in case there is no tolerance defined or tolerance is finite
        cutoffs_sets: [ +cost_by_parcel, -carrier_pickup, +eta_end ] #cheapest, latest carrier pickup, fastest eta_end
        cutoffs: [ -carrier_pickup, +eta_end ] #latest carrier pickup, fastest eta_end
      eta_exceeded: #in case there is an infinite tolerance defined
        cutoffs_sets: [ +cost_by_parcel, +eta_end ]
        cutoffs: [ +eta_end, +carrier_pickup ]
    default_sort_criteria: # default criteria to use when no sort orders
      eta_fulfilled:
        cutoffs_sets: [ +cost_by_parcel, -carrier_pickup, +eta_end ] #not used if use_sort_orders is true
        cutoffs: [ -carrier_pickup, +eta_end ] #1st by latests carrier pickup, 2nd by fastests eta_end
      eta_exceeded: #juste pour tolérance infinie
        cutoffs_sets: [ +eta_end, +cost_by_parcel ] #not used if use_sort_orders is true
        cutoffs: [ +eta_end, +carrier_pickup ] #1st by fastest eta_end, 2nd by latests carrier pickup.

+ means ascending sorting (0, 1, 2, 3) — the smallest number or the earliest date will be selected

- means descending sorting (3, 2, 1, 0) — the biggest number or the latest date will be selected

use_sort_orders set to true

...