Design paper
Legal constraints and risk penalties inside fulfilment planning: a design
Abstract
Planning systems for fulfilment and routing usually optimise cost and delivery time, and leave legal checks such as export controls and restricted destinations to a later manual review. A plan can then be cheap and fast but not allowed. We describe the design of a risk and compliance service for a commerce platform that separates two kinds of input. Legal and policy rules are written as versioned, testable rules and enter planning as hard constraints that remove options before any optimisation. Operational risks, such as the chance that a lane or supplier causes a delay, enter as priced penalties whose weight is an explicit policy choice. Learned risk scores rank items for human review but never override a legal rule. Each blocked option carries a reason a merchant can act on. We argue each part from published work on supply chain risk, optimisation under uncertainty and fair, explainable decisions, and from the legal texts. This is a design proposal, not a measured result.
Method. Design paper: the architecture is argued from the cited literature and legal texts; we report no measurements of our own. Table 2 is a worked model with its inputs shown.
1Context and motivation
A platform that plans fulfilment for many merchants decides, for each order, which stock to ship, from which node, by which carrier and through which corridor. These decisions are usually optimised for cost and delivery time. Whether the shipment is allowed at all (whether the item needs an export licence, whether the destination or recipient is restricted, whether the product may be sold in that market) is often checked afterwards, by a separate tool or a person. The planner can therefore produce a plan that is cheap and fast but not permitted, and the error surfaces as a held shipment, a return or a cancelled order.
Two strands of work frame the problem. The first is supply chain risk. Kleindorfer and Saad separate risks that come from coordinating supply and demand from risks that come from disruptions to normal activities, and give a framework in which risk assessment and risk mitigation are joint activities1. Disruptions matter to the firm: across 827 announcements from 1989 to 2000, the average abnormal stock return of affected firms was nearly minus 40%, and equity risk in the year after was 13.50% higher than in the year before2. The second strand is less comfortable for a compliance paper. In a survey of 760 executives of firms operating in Germany, demand-side and supply-side risks had a negative effect on supply chain performance, while regulatory, legal and bureaucratic risks did not3. We read that as a warning against claiming that compliance work pays for itself in operational terms. The case for the design below is that legal rules are obligations, not that following them improves delivery metrics.
An earlier version of this paper reported simulated comparisons of "naive" and compliance-embedded planning, and regional case outcomes. We cannot show those simulations, and the regional claims had no source; both are removed.
2The legal inputs
Three texts illustrate the kinds of rule the design has to hold. They are examples, not a statement of any merchant's obligations.
Under the EU dual-use regulation, an authorisation is required for the export of dual-use items listed in its Annex I, and in some cases for items not listed4. Under the US Export Administration Regulations, a dual-use item is one with civil applications as well as terrorism, military or weapons of mass destruction related applications; the Bureau of Industry and Security maintains the Commerce Control List of items subject to its licensing authority; and licence requirements can be imposed on listed entities and addresses5. These rules depend on what the item is, where it goes and who receives it, which are all fields a fulfilment plan already contains.
A different kind of rule concerns the chain itself. The EU corporate sustainability due diligence directive lays down obligations for companies regarding actual and potential human rights and environmental adverse impacts in their own operations, their subsidiaries' operations and those of business partners in their chains of activities6. Such rules apply to some companies and not others, and they act on sourcing choices more than on individual shipments.
The design does not interpret law. Legal and trade specialists decide what a rule means for the platform; the service makes that decision explicit, versioned and enforced in the same place every time.
3Design principles
- Separate what is forbidden from what is risky. A legal rule removes options; a risk changes the price of an option. The two are never mixed in one score.
- Rules are code, with owners and tests. Every rule has an owner, a source, a version, an effective date and test cases.
- Constraints enter planning early. Options that a rule forbids are removed before optimisation, not caught after it.
- Risk weights are policy. How much cost the platform will pay to avoid a given risk is set and recorded by people, not learned silently.
- Every block has a reason. A merchant who sees a blocked option sees which rule caused it and what would change the outcome.
4Architecture
4.1Rule base
The rule base holds rules of the form "items with classification X may not be shipped to destination Y without licence L" or "recipient matches a restricted-party entry: hold for review". Each rule records the legal source it implements, the person who approved the interpretation, the jurisdictions where it applies and its validity period. Rules are evaluated against item attributes (classification, materials, origin), the route (origin node, transit points, destination) and the parties. A change to a rule runs its test cases and a replay over recent orders, so that the people approving it see how many orders it would have changed before it takes effect.
Item classification is the weakest input. Many items arrive with incomplete attributes. Where the classification needed by a rule is unknown, the rule fails closed for the affected destinations: the option is held for review rather than allowed.
4.2Risk models
Risk models estimate the probability and size of operational losses: that a lane causes a customs hold or a delay, that a supplier misses a delivery or fails a quality check, that a node is disrupted. A review of artificial intelligence in supply chain risk management maps existing work by method, from mathematical programming to machine learning, and by task: identification, assessment or response7. We use learned models only for assessment and for ranking work for people. A risk score can send an order to review; it cannot make a forbidden option allowed or a permitted one forbidden.
4.3Planning integration
Planning works in two steps. First, the rule base filters the candidate set: every combination of node, carrier, corridor and destination that a rule forbids is removed, so the optimiser never sees it. Second, the optimiser chooses among the remaining options using cost, delivery time and a risk penalty. For a risk with probability p and cost of occurrence c, the expected penalty is p times c. Where the platform cares about bad outcomes more than average ones, the penalty can use conditional value-at-risk, the expected loss in the worst tail of outcomes, which can be optimised with linear programming in scenario form8. Where only ranges of a parameter are known, robust optimisation lets the planner choose how conservative to be9. The same filter and penalty serve the network planner, which decides which nodes and suppliers to use, and the order router, which decides each shipment.
4.4Monitoring and audit
Every evaluation is logged: the rule versions, the inputs, the options removed, the penalty values and the option chosen. Holds and their outcomes are fed back to the risk models and to the owners of the rules that caused them.
| Component | Problem it addresses | Evidence |
|---|---|---|
| Rule base with owners, sources and tests | Legal checks done late, by hand and inconsistently | 4, 5, 6 |
| Hard filter before optimisation | Plans that are cheap and fast but not allowed | 4, 5 |
| Risk as an expected or tail penalty | Disruption losses ignored by cost-only planning | 1, 2, 8 |
| Adjustable conservatism | Risk estimates are uncertain themselves | 9 |
| Learned scores for assessment and review only | Learned models used to decide legal questions | 7 |
| Group-level monitoring of holds | Rules or scores that fall harder on some merchants | 10, 11 |
| Actionable reasons for each block | Merchants cannot tell why or what to change | 12 |
Source: our design, with the works cited in the table.
5A worked model of route choice
Consider one shipment and three candidate routes. Route A costs less than the others but crosses a jurisdiction where the item needs a licence the merchant does not hold. Routes B and C are both allowed; B is cheaper, but its corridor has a higher chance of a customs hold. Let the penalty be the probability of a hold times its cost, so that the score is cost plus that expected penalty.
| Route | Cost (input) | Allowed (input) | Hold probability (input) | Score at hold cost 10 | Score at hold cost 3 |
|---|---|---|---|---|---|
| A | 10.0 | No | 0.10 | removed | removed |
| B | 12.0 | Yes | 0.30 | 12 + 3.0 = 15.0 | 12 + 0.9 = 12.9 |
| C | 13.5 | Yes | 0.05 | 13.5 + 0.5 = 14.0 | 13.5 + 0.15 = 13.65 |
Source: Worked model; inputs in the table.
Route A never enters the comparison, however low its cost or risk. Between B and C, the choice turns on the hold cost: the scores are equal when 12 + 0.3c = 13.5 + 0.05c, that is at c = 6. Above that, C is chosen; below it, B. The point of the table is that the hold cost is a number someone has to set. A design that hides it inside a learned score would make the same trade-off without anyone deciding it.
6Merchants, fairness and explanation
A platform applies the same rules to many merchants, which removes the inconsistency of each merchant checking alone. It also concentrates errors: a wrong rule or a biased score affects every merchant at once.
Risk scores trained on past holds can encode how often a group was inspected rather than how risky it is. Fairness criteria such as equality of opportunity compare error rates across groups and can be used to adjust a predictor after training10; different fairness criteria cannot in general all hold at once, so the platform has to choose and state which one it monitors11. In this design, holds and review outcomes are reported by merchant size, origin region and product category, and a score whose false hold rate differs across groups beyond a set tolerance is reviewed.
Explanations follow the aims proposed by Wachter and colleagues for people affected by automated decisions: to understand why a decision was reached, to contest it, and to know what would need to change for a different result, which counterfactual explanations can provide without exposing the internal logic of a model12. For a block caused by a rule, the merchant sees the rule, its legal source and what would change the result (for example, a licence or a different destination). For a review triggered by a risk score, the merchant sees that the order is under review, the expected time and a route to contest.
Party screening uses personal data about recipients and suppliers. The service stores the minimum needed to evaluate a rule, restricts match details to reviewers, and sets retention per jurisdiction.
7Evaluation protocol
Before any claim about fewer holds or lower cost, a deployment would need to measure: the number of shipments held or returned for legal reasons, before and after rules move into planning; the false hold rate of each rule and score (holds released without change); the cost difference between the chosen plan and the cost-only plan, which prices the constraints; review time; and the fairness reports above. The Wagner and Bode result suggests that an improvement in delivery performance should not be assumed3.
8Limitations
- No measurements. We have not measured holds, cost or review time for this design.
- Not legal advice. The cited texts are examples. Encoding a rule requires a legal interpretation that this paper does not provide, and rules change.
- Classification quality. Rules are only as good as item attributes; failing closed on missing data will block some legitimate orders.
- Regional claims removed. The earlier version described regional regulatory conditions without a source. Those claims are cut.
- Penalty values. Hold costs and risk weights are policy inputs; poor values give poor plans, and Table 2 shows how sensitive the choice can be.
- Worked model only. Table 2 illustrates the decision rule, not a measured result.
9Conclusion
We have described a service that keeps legal rules and operational risk apart: rules, versioned and tested, remove forbidden options before planning, and risk enters as a priced penalty whose weight is a recorded policy choice. Learned scores direct human review but do not decide legal questions, and each block comes with a reason a merchant can act on. Table 1 links each component to its sources, and Table 2 shows the decision rule. The next step is to move a small set of export and restricted-destination rules into planning, run them in shadow mode against current checks, and report holds and false holds with the method stated.
References
- 1
Kleindorfer, P. R., & Saad, G. H. (2005). Managing disruption risks in supply chains. Production and Operations Management, 14(1). doi.org/10.1111/j.1937-5956.2005.tb00009.x
- 2
Hendricks, K. B., & Singhal, V. R. (2005). An empirical analysis of the effect of supply chain disruptions on long-run stock price performance and equity risk of the firm. Production and Operations Management, 14(1). doi.org/10.1111/j.1937-5956.2005.tb00008.x
- 3
Wagner, S. M., & Bode, C. (2008). An empirical examination of supply chain performance along several dimensions of risk. Journal of Business Logistics, 29(1). doi.org/10.1002/j.2158-1592.2008.tb00081.x
- 4
European Parliament and Council of the European Union (2021). Regulation (EU) 2021/821 of 20 May 2021 setting up a Union regime for the control of exports, brokering, technical assistance, transit and transfer of dual-use items (recast). Official Journal of the European Union, L 206. eur-lex.europa.eu/eli/reg/2021/821/oj
- 5
U.S. Department of Commerce, Bureau of Industry and Security (2025). Export Administration Regulations, 15 CFR chapter VII, subchapter C (parts 730 to 774). Electronic Code of Federal Regulations. www.ecfr.gov/current/title-15/subtitle-B/chapter-VII/subchapter-C
- 6
European Parliament and Council of the European Union (2024). Directive (EU) 2024/1760 of 13 June 2024 on corporate sustainability due diligence and amending Directive (EU) 2019/1937 and Regulation (EU) 2023/2859. Official Journal of the European Union, L series. eur-lex.europa.eu/eli/dir/2024/1760/oj
- 7
Baryannis, G., Validi, S., Dani, S., & Antoniou, G. (2018). Supply chain risk management and artificial intelligence: State of the art and future research directions. International Journal of Production Research, 57(7). doi.org/10.1080/00207543.2018.1530476
- 8
Rockafellar, R. T., & Uryasev, S. (2000). Optimization of conditional value-at-risk. Journal of Risk, 2(3). doi.org/10.21314/JOR.2000.038
- 9
Bertsimas, D., & Sim, M. (2004). The price of robustness. Operations Research, 52(1). doi.org/10.1287/opre.1030.0065
- 10
Hardt, M., Price, E., & Srebro, N. (2016). Equality of opportunity in supervised learning. arXiv:1610.02413. arxiv.org/abs/1610.02413
- 11
Barocas, S., Hardt, M., & Narayanan, A. (2023). Fairness and machine learning: Limitations and opportunities. MIT Press. fairmlbook.org/
- 12
Wachter, S., Mittelstadt, B., & Russell, C. (2017). Counterfactual explanations without opening the black box: Automated decisions and the GDPR. arXiv:1711.00399. arxiv.org/abs/1711.00399
Cite this paper
Tanqory Research (2025). Legal constraints and risk penalties inside fulfilment planning: a design. Tanqory. https://tanqory.com/research/20250919-risk-aware-compliance-supply-chains