The distributed order management system is the heart of the fulfillmenttools platform. In this part of our tutorial series we configure the DOMS for our fictional company LU.XY fashion.
As you might have seen in the detailed article, our distributed order management system (or short DOMS) helps you route orders. To find the optimal facility for fulfilling each order, there are fences (must criteria) and ratings (which facility is the best). Whereas in old times there were static rulesets, the fulfillmenttools platform enables them to be dynamic, choosing the best facility at the moment. On this page, you see how to configure the DOMS using the REST API. This can also be configured when logged in as an administrator via the Backoffice.
Fences Fences work a bit like filters as they filter out facilities that don't match the criteria that are defined. A detailed list of the standard options can be found here, you can also create your own criteria using custom fences. LU.XY wants to give their customers a great experience, so they want the service type ordered and the service type offered by the facility to match. They are connected to a marketplace which decides from which facility LU.XYcan fulfil. To have the DOMS handling that we need to enable these fences:
Service Type
Preselected facilities
Ratings After we fenced some facilities out, some facilities will be left. Without any ratings between those, the facility receiving the pick job would be picked randomly by the platform. To distribute the pickjob between the facilities, the DOMS allows us to rate each facility in terms of fulfilling that pickjob.
LU.XY wants to prefer the facility closest to the customer and with the fastest delivery speed. As the employees have KPIs based on the performance, the workload should also be balanced between the facilities. Additionally, they have categorised their stores into A stores and B stores. A stores perform very well with walk-in customers which is why they want to prefer the B stores for online orders. Therefore these ratings come into place:
Geodistance
Workload balancing
Custom fence based on the facility rating
We will get into those ratings into detail in a bit. To make every customer as happy as possible, they want to try out splitting orders, which means we also have to active this feature in the routing ruleset.
The response is a 200 OK containing the current rules:
{"version":13,"created":"2023-07-10T12:55:06.393Z","globalRoutingConfiguration": {"defaultPrice":10 },"lastModified":"2024-01-30T10:05:20.077Z","prioritizationRules": [],"routingRule": {"fences": [ {"implementation":"FACILITY-BUSINESSTYPE","active":false,"id":"07573113-10b1-44d9-b9ea-28c343684a32","name":"Service type","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that do not support the service type required by an order are not taken into consideration when performing an order routing."
}, {"implementation":"STOCK-AVAILABILITY","active":false,"id":"d98effb6-cf9f-4aeb-889f-9b1e876463ac","name":"Complete stock","supportedModes": ["static","reactive" ],"activeMode":"static", "description": "Facilities that do not have all ordered items in stock are not taken into consideration when performing an order routing."
}, {"implementation":"FACILITY-CARRIERAVAILABILITY","active":false,"id":"5e0d9990-331f-407c-9b50-d6ba73e2bdc0","name":"Carrier availability","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that do not support a specific carrier which has been requested by a customer are not taken into consideration when performing an order routing."
}, {"implementation":"FACILITY-COUNTRY","active":false,"id":"8a23fd25-9023-45bf-8aab-3c56c24ba2e5","name":"Country borders","supportedModes": ["static" ],"activeMode":"static","description":"Cross-country routing is prevented." }, {"implementation":"FACILITY-PICKING-TIME-CAPACITY","active":false,"id":"33c5ff6d-a0a1-4b91-be2c-a49c72d0d196","name":"Facility capacity","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities, for which the maximum amount of orders that can be fulfilled has been exceeded are not taken into consideration when performing an order routing."
}, {"implementation":"PRESELECTED-FACILITY","active":true,"id":"a68c4f4e-dd31-4eb2-917b-d21f18150008","name":"Preselected facilities","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that are not specified in a predefined list are not taken into consideration when performing an order routing."
}, {"implementation":"SAMEDAY-POSSIBLE","active":false,"id":"204899bb-1247-45c2-a26f-aae4761b7ec5","name":"Same Day delivery possible","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that cannot ensure a same day delivery are not taken into consideration when performing an order routing."
} ],"ratings": [ {"implementation":"STOCK-BALANCING","active":false,"id":"de855bab-b318-4815-8a71-a26658ebd4e9","name":"Stock balancing","maxPenalty":0, "description": "Facilities that have high stock levels of the ordered items are favored by this rating."
}, {"implementation":"GEO-DISTANCE","active":false,"id":"07bceadb-95ed-49f0-aa3c-73816ba17fc4","name":"Geodistance","maxPenalty":0,"description":"Facilities that are nearby a consumer are favored by this rating." }, {"implementation":"TURNOVER","active":false,"id":"bd9d5cb8-2d2b-4698-b7f2-7e2b67fe5c8e","name":"Maximizing turnover","maxPenalty":0, "description": "Facilities that generate the highest turnover based on what the customer has ordered are favored by this rating."
}, {"implementation":"STOCK-AVAILABILITY","active":false,"id":"a7eed71c-ee15-4f04-8d99-74cab2c31de8","name":"Stock availability","maxPenalty":0, "description": "Facilities that have the highest amount of items in stock that are ordered by a customer are favored by this rating."
}, {"implementation":"WORKLOAD-BALANCING","active":false,"id":"296b8469-2e54-440a-a793-c38514755394","name":"Workload balancing","maxPenalty":0, "description": "Facilities that have a low workload while performing a routing decision are favored by this rating."
}, {"implementation":"MATCHING-BUSINESSTYPE","active":false,"id":"c2207eb3-5cf5-491c-b4bd-d148d5e9b97b","name":"Matching service type","maxPenalty":0, "description": "Facilities that have the same service type as requested in the order are favored by this rating."
}, {"implementation":"PREFER-STORE","active":false,"id":"68f870f0-f379-466f-83d5-6ee565bf6506","name":"Prefer stores","maxPenalty":0,"description":"Facilities that have the facility type store are favored by this rating." }, {"implementation":"PREFER-WAREHOUSE","active":false,"id":"ba888667-b678-4af4-bcad-eee92c92bea7","name":"Prefer warehouses","maxPenalty":0,"description":"Facilities that have the facility type warehouse are favored by this rating." }, {"implementation":"ZONE","active":false,"id":"34975c54-7ee2-41cd-b0ce-e15d0fa2b2dc","name":"Stocks in preferred zone","maxPenalty":0, "description": "Facilities where the ordered inventory is located in a preferred zone are given priority in routing."
}, {"implementation":"EXPIRY-DATE","active":false,"id":"1d908d52-b1ac-42ba-a81b-23e66396f6f4","name":"Expiration/Best-before date","maxPenalty":0, "description": "Facilities where demanded inventory has a shorter expiration date are given priority in routing. Markdowns are reduced as a result."
}, {"implementation":"CAPACITY","active":false,"id":"8fa06ea4-eb88-473b-89bc-84c0382e97d0","name":"Capacity","maxPenalty":0, "description": "Facilities where capacity for fulfillment is available in a timely manner are given priority in routing."
}, {"implementation":"DELIVERY-COSTS","active":false,"id":"b134593a-6e90-4214-ad17-66014186b2ce","name":"Lowest delivery fee","maxPenalty":0,"description":"TODO" }, {"implementation":"DELIVERY-TIME","active":false,"id":"22c92c9c-2766-41e7-a2df-f6299022bb9a","name":"Fastest delivery speed","maxPenalty":0,"description":"TODO" } ],"orderSplit": {"active":false,"orderSplitType":"FIXED_COUNT" } }}
globalRoutingConfiguration.defaultPrice: This is used for the maximizing turnover rating and should be a standard value for the industry, e.g. 500 EUR for tech, 100 EUR for fashion.
prioritizationRules: has no more impact today.
routingRule.fences: Here you can find all fences there are available without using customized ones. To active the ones we talked about earlier, we need the properties id, active and activeMode.
routingRule.ratings: Here you can find all fences support by default. The property maxPenalty describes the weighting that each rating has in the routing decision. For example a maxPenalty of 2 is not as important and has a lower weight than maxPenalty of 8. This could be any number. By default you can set this penalty in the frontend between 1 and 10, in the API higher values are possible.
orderSplit: Here you can either activate or deactive the split of orders.
In our case we want to activate the order split and the fences mentioned above. The weighting of the ratings would look like that:
After successfully applying these rules, we'll get a 200 OK response containing the adjusted routing configuration with a new version:
{"id":"routing","version":14,"created":"2023-07-10T12:55:06.393Z","globalRoutingConfiguration": {"defaultPrice":10 },"lastModified":"2024-01-31T12:48:35.274Z","prioritizationRules": [],"routingRule": {"fences": [ {"implementation":"FACILITY-BUSINESSTYPE","active":true,"id":"07573113-10b1-44d9-b9ea-28c343684a32","name":"Service type","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that do not support the service type required by an order are not taken into consideration when performing an order routing."
}, {"implementation":"STOCK-AVAILABILITY","active":false,"id":"d98effb6-cf9f-4aeb-889f-9b1e876463ac","name":"Complete stock","supportedModes": ["static","reactive" ],"activeMode":"static", "description": "Facilities that do not have all ordered items in stock are not taken into consideration when performing an order routing."
}, {"implementation":"FACILITY-CARRIERAVAILABILITY","active":false,"id":"5e0d9990-331f-407c-9b50-d6ba73e2bdc0","name":"Carrier availability","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that do not support a specific carrier which has been requested by a customer are not taken into consideration when performing an order routing."
}, {"implementation":"FACILITY-COUNTRY","active":false,"id":"8a23fd25-9023-45bf-8aab-3c56c24ba2e5","name":"Country borders","supportedModes": ["static" ],"activeMode":"static","description":"Cross-country routing is prevented." }, {"implementation":"FACILITY-PICKING-TIME-CAPACITY","active":false,"id":"33c5ff6d-a0a1-4b91-be2c-a49c72d0d196","name":"Facility capacity","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities, for which the maximum amount of orders that can be fulfilled has been exceeded are not taken into consideration when performing an order routing."
}, {"implementation":"PRESELECTED-FACILITY","active":true,"id":"a68c4f4e-dd31-4eb2-917b-d21f18150008","name":"Preselected facilities","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that are not specified in a predefined list are not taken into consideration when performing an order routing."
}, {"implementation":"SAMEDAY-POSSIBLE","active":false,"id":"204899bb-1247-45c2-a26f-aae4761b7ec5","name":"Same Day delivery possible","supportedModes": ["static" ],"activeMode":"static", "description": "Facilities that cannot ensure a same day delivery are not taken into consideration when performing an order routing."
} ],"ratings": [ {"implementation":"STOCK-BALANCING","active":false,"id":"de855bab-b318-4815-8a71-a26658ebd4e9","name":"Stock balancing","maxPenalty":0, "description": "Facilities that have high stock levels of the ordered items are favored by this rating."
}, {"implementation":"GEO-DISTANCE","active":false,"id":"07bceadb-95ed-49f0-aa3c-73816ba17fc4","name":"Geodistance","maxPenalty":1,"description":"Facilities that are nearby a consumer are favored by this rating." }, {"implementation":"TURNOVER","active":false,"id":"bd9d5cb8-2d2b-4698-b7f2-7e2b67fe5c8e","name":"Maximizing turnover","maxPenalty":0, "description": "Facilities that generate the highest turnover based on what the customer has ordered are favored by this rating."
}, {"implementation":"STOCK-AVAILABILITY","active":false,"id":"a7eed71c-ee15-4f04-8d99-74cab2c31de8","name":"Stock availability","maxPenalty":0, "description": "Facilities that have the highest amount of items in stock that are ordered by a customer are favored by this rating."
}, {"implementation":"WORKLOAD-BALANCING","active":false,"id":"296b8469-2e54-440a-a793-c38514755394","name":"Workload balancing","maxPenalty":4, "description": "Facilities that have a low workload while performing a routing decision are favored by this rating."
}, {"implementation":"MATCHING-BUSINESSTYPE","active":false,"id":"c2207eb3-5cf5-491c-b4bd-d148d5e9b97b","name":"Matching service type","maxPenalty":0, "description": "Facilities that have the same service type as requested in the order are favored by this rating."
}, {"implementation":"PREFER-STORE","active":false,"id":"68f870f0-f379-466f-83d5-6ee565bf6506","name":"Prefer stores","maxPenalty":0,"description":"Facilities that have the facility type store are favored by this rating." }, {"implementation":"PREFER-WAREHOUSE","active":false,"id":"ba888667-b678-4af4-bcad-eee92c92bea7","name":"Prefer warehouses","maxPenalty":0,"description":"Facilities that have the facility type warehouse are favored by this rating." }, {"implementation":"ZONE","active":false,"id":"34975c54-7ee2-41cd-b0ce-e15d0fa2b2dc","name":"Stocks in preferred zone","maxPenalty":0, "description": "Facilities where the ordered inventory is located in a preferred zone are given priority in routing."
}, {"implementation":"EXPIRY-DATE","active":false,"id":"1d908d52-b1ac-42ba-a81b-23e66396f6f4","name":"Expiration/Best-before date","maxPenalty":0, "description": "Facilities where demanded inventory has a shorter expiration date are given priority in routing. Markdowns are reduced as a result."
}, {"implementation":"CAPACITY","active":false,"id":"8fa06ea4-eb88-473b-89bc-84c0382e97d0","name":"Capacity","maxPenalty":0, "description": "Facilities where capacity for fulfillment is available in a timely manner are given priority in routing."
}, {"implementation":"DELIVERY-COSTS","active":false,"id":"b134593a-6e90-4214-ad17-66014186b2ce","name":"Lowest delivery fee","maxPenalty":0,"description":"TODO" }, {"implementation":"DELIVERY-TIME","active":false,"id":"22c92c9c-2766-41e7-a2df-f6299022bb9a","name":"Fastest delivery speed","maxPenalty":0,"description":"TODO" } ],"orderSplit": {"active":true,"orderSplitType":"FIXED_COUNT","activeForSameDay":false,"fixedCountConfiguration": {"maxSplitCount":1 } } }}
Set facility rating
The facility rating is done using a tag for the rating which is patched to the facility. Therefore, we first need to create a tag prior to link that rating tag to a facility. For achieving that, we can POST the tag to the API's endpoint:
For some cases, the routing configuration the fulfillmenttools platform offers by default does not match exactly the customer's needs. To give you the best routing experience possible and offer even more routing rulesets, we introduced the DOMS toolkit. In the case of LU.XY fashion, we need a rating for certain facilities. This can be done using the mentioned toolkit.
DOMS Toolkit The DOMS toolkit compares two entities of this list:
order
facility
carrierconnection
The left side is usually an order, the right side might be something else. The toolkit then looks for certain values in the left entity and then rates the existance of certain properties in the other entity.
In LU.XY's case we want all orders to be compared, therefore we need a property which is always present. As every order contains an ID, we expect that value not to be an empty string. For the facility, we need the facilityRating tag set above to match the value B in order to give all facilities rated as B-stores a rating. fulfillmenttools recommends 40 in that case to give this the highest priority.
The response should be a 201 CREATED containing the object with ID, version and timestamp added:
{"entity1":"ORDER","entity2":"FACILITY","active":true,"name":"Prefer B Stores","nameLocalized": {"de_DE":"Bevorzuge B-Filialen","en_UK":"Prefer B-Stores" },"description":"Prefer B Stores for all orders","rule": {"operator":"EQUALS","leftPart": {"predicates": [ {"entityOperator":"VALUE_NOT_EQUALS","expectedValue":" ","propertyPath":"$.id" } ],"predicateConnector":"AND" },"rightPart": {"predicates": [ {"entityOperator":"EVERY_VALUE_EQUALS","expectedValue":"B","propertyPath":"$.tags[?(@.id === \"FACILITYRATING\")].value" } ],"predicateConnector":"AND" } },"maxPenalty":10,"created":"2024-01-31T14:18:52.255Z","lastModified":"2024-01-31T14:18:52.255Z","version":1,"id":"c1104460-4bd2-4082-b4b1-53d1b2787171"}
The store ratings and routing weights are:
A stores: 20
B stores: 40
C stores: 60
Every custom rule needs it's own API call.
We have now successfull configured the routing rules for LU.XY fashion. Please keep in mind that DOMS can be a complex topic, especially when you're at the start of your integration. If you need any help, your professional services representative is always happy assisting you with the routing configuration.