Context
A context limits where entities, attributes, or specific properties are considered when the fulfillmenttools platform executes business logic.
The following entities support contexts:
Listings (sales prices, out of stock behavior)
These entities contain a context field. The system evaluates the context at runtime to determine if the object applies to the current use case. If no context is defined, the system sets no limitations.
The structure of the context is as follows:
{
...
"context": [
{
"type": "FACILITY",
"operator": "NOT", // optional, not available in every entity
"values": [
"string"
]
},
...
]
}Entries in the
contextarray are joined with a logicalAND.Items in the
valuesarray are joined with a logicalOR.Each entity supports different context types, such as
CATEGORY,FACILITY_ID, andFACILITY_GROUP.The
operatorfield is optional, and the only supported value isNOT. Support for this field varies by entity.
Example
This example shows how to create a discount that applies only to certain facility groups and excludes a specific article category.
Adding a context to the discount defines the conditions under which the system considers it when routing an order.
In this example, the system applies the discount when:
the facility is in facility group
uuid-facility-group1oruuid-facility-group2
and
the article category is not
uuid-category1.
Last updated