DOMS Toolkit
Last updated
Last updated
könnten wir hier noch eine generelle Erklärung des DOMS Toolkit hinzufügen?
Introduction lorem ipsum ...
Please go to the for more information on managing the DOMS via API. The API documentation can be found here.
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
) 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 (Facility
). 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.
Toolkit ratings follow nearly exact same syntax as toolkit fences with a few key differences:
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:
The JSONPath documentation can be found here
A helpful tool for testing JSONPath expressions can be found here
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"