Distributed Order Management System (Routing)

The fulfillmenttools distributed order management system (DOMS) routes orders to the optimal facility for fulfillment. The system uses a combination of fences (mandatory criteria) and ratings (preference criteria) to determine the best facility.

Historically, routing was based on static rulesets. The fulfillmenttools platform enables these rules to be dynamic, allowing the system to select the most suitable facility at the moment of routing. This tutorial demonstrates how to configure the DOMS using the REST API. An administrator can also configure these settings in the Backoffice.

Fences

Fences function as filters, removing facilities that do not match defined criteria. For example, a tenant, LU.XY, wants to ensure that the service type requested in an order matches the service type offered by the facility. Additionally, they are connected to a marketplace that preselects which facilities LU.XY can use for fulfillment.

To handle this, the following fences must be enabled:

  • Service Type

  • Preselected facilities

Ratings

After the system applies fences, a subset of facilities remains. Without ratings, the system would randomly assign a pick job to one of the eligible facilities. Ratings allow the system to score each remaining facility to determine the best option for a given pick job.

In the LU.XY example, the business prefers the facility that is closest to the customer and offers the fastest delivery. Since employee performance is measured by Key Performance Indicators (KPIs), the workload should also be balanced across facilities. Furthermore, stores are categorized as "A stores" and "B stores." A stores have high foot traffic from walk-in customers, so online orders should be preferentially routed to B stores.

To achieve this, the following ratings are applied:

  • Geodistance

  • Workload balancing

  • A custom rating based on facility tags

The details of these ratings are explained below. To maximize fulfillment potential, order splitting is also activated in the routing ruleset.

Apply the standard routing rules

For more details, see the Routing Configurations API documentation.

To begin configuring routing options, first retrieve the current ruleset with a GET request.

200 OK response
  • globalRoutingConfiguration.defaultPrice: This value is used for the Maximizing turnover rating. It should be a standard value for the industry (e.g., 100 EUR for fashion, 500 EUR for electronics).

  • prioritizationRules: This is a legacy field that is no longer used.

  • routingRule.fences: This array lists all available standard fences. To activate a fence, use the properties id, active and activeMode.

  • routingRule.ratings: This array lists all standard ratings. The maxPenalty property defines the weight of each rating in the routing decision. A higher maxPenalty gives the rating more importance. While the Backoffice UI limits this value to a range of 1 to 10, the API allows higher values.

  • orderSplit: This object controls whether order splitting is active.

For this use case, activate orderSplit and the required fences. The ratings will be weighted as follows:

  • GEO-DISTANCE: 1

  • WORKLOAD-BALANCING: 4

Apply the desired rules by sending a PATCH request to the routing configuration endpoint.

PATCH https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/configurations/routing
200 OK response

Set facility rating

The facility rating is implemented using a tag. First, a tag definition must be created before it can be assigned to a facility.

For more details, see the Tags API documentation.

POST https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/tags
201 CREATED response

Next, assign this tag to a facility using a PATCH request to the facility endpoint.

PATCH https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/facilities/{FACILITY-ID}

The API responds with 200 OK and the complete facility object.

200 OK response

Configuring the DOMS toolkit (custom rules)

If the standard routing configurations do not meet specific business needs, the DOMS toolkit can be used to create custom rules. For the LU.XY use case, a custom rating is needed to prefer certain facilities.

DOMS toolkit

The DOMS toolkit creates rules that compare attributes between two entities, such as an order, a facility, or a carrierconnection. A typical rule compares an attribute on the order with an attribute on the facility.

In this example, the goal is to create a rating that applies to all orders and prefers facilities tagged as "B-stores".

  • The order side of the rule will check for a property that is always present, such as the order.id, to ensure it applies universally.

  • The facility side of the rule will check if the facilityRating tag has a value of B.

A maxPenalty of 40 is recommended to give this rating a high weight.

For more details, see the Toolkit Rating API documentation.

POST https://{YOUR-TENANT-NAME}.api.fulfillmenttools.com/api/configurations/routing/toolkit/ratings
201 CREATED response

Additional rules can be created for other store ratings (e.g., A stores, B stores, C stores). A separate API call is required for each custom rule.

This completes the configuration of the routing rules for the specified use case. DOMS is a powerful and complex feature. For further assistance with advanced routing configurations, contact the professional services team.

Last updated