DOMS toolkit
Last updated
Last updated
The DOMS toolkit helps users define factors which should be considered when making the decision for the best fulfillment location.
The system allows to define fences and ratings:
: Exclude facilities from order routing according to the fences selected
: Weigh facilities against each other according to the ratings selected
There are two rule types which can be defined:
Use "rule" to set up a conditional rule. Can be used for comparing each side against a fixed value (e.g., order line item quantity > 3). Incompatible with using the comparisonRule field. Conditional rules test a certain property of an entity (Order
, Facility
, Listing
) against a pre-defined static value.
Use "comparisonRule" to set up a comparison rule. Comparison rules compare a certain property of the left-hand side (Order
) to a certain property of the right-hand side (Order
, Facility
, Listing
). Incompatible with using the rule field.
An example of this could be an order with products of a certain brand demanding a facility tagged with the same brand.
order
: since all ratings get evaluated either way the order field does not exist for ratings
maxPenalty
: the penalty which determines the weight of the rating in comparison to other ratings
It always begins with $
referring to the entity, followed by a path to the nested property. (e.g. $.orderLineItems[*].quantity
) Used in:
Transformers allow to modify the input of a ToolkitPredicate
before it gets evaluated. This can serve multiple purposes, maybe you only want to look at the number of elements, get the total price of all OrderLineItem
s or just want to consider the beginning of the tenantOrderId
.
These are the transformations currently available in the platform.
SUM
: sums the number values of each element - requires an array of elements
COUNT
: counts the number of elements - requires an array of elements
SUBSTRING
: gets a substring of a value, requires start
and end
parameters
LAST
: gets the last n
chars of a string - required length
parameter
Applies to orders with 10 OrderLineItems
or more.
Applies to orders where all OrderLineItems
in sum have a total quantity of 100.
Applies to orders where any OrderLineItem
has a tenantArticleId
that begins with "Coca".
Applies to orders where any OrderLineItem
has a tenantArticleId
that ends with "Christmas Special"
An array of one or more . A predicate consists of the following fields:
A defining the property to look at.
A
An array of one or more .
A string containing a for the right side entity.
A string containing a for the right side entity.
The for the left hand side.
The transformation arguments for the left , if required.
The for the right hand side.
The transformation arguments for the right , if required.
Toolkit ratings follow nearly exact same syntax as with a few key differences:
The JSONPath documentation can be found
A helpful tool for testing JSONPath expressions can be found