Skip to content

AI uses for records

Inventory allocation constraint dataset: two orders, not enough stock

By SourceX Editorial · Reviewed by Noah Loul ·

9 sections

Short answer

An agent should allocate scarce stock in a fixed order: drop any option that breaks a hard constraint such as a ring-fenced allocation, an approved specification or a no-partial-shipment term, then apply the company's written priority rule, and escalate when no rule decides. An inventory allocation constraint dataset stores each contested episode as a packet linking stock, demands, rule, approval, decision and delivered outcome.

Checklist

Inventory allocation

This page covers inventory allocation constraint dataset: two orders, not enough stock.Illustrative

Key takeaways

  • Allocate scarce stock by removing infeasible and forbidden options first, then applying the written priority rule, then escalating when the rule is silent.
  • Ring fences, approved specifications, no-partial-shipment terms and slipped supply dates are the constraints that most often defeat the obvious choice.
  • Each contested episode becomes one packet: starting supply, competing demand, constraints, rule, decision, notices and delivered outcome.
  • Grade the decision on end state, meaning shipments and closed backorders, never on an order status or an agent's final message.
  • Episodes without a written rule or outcome records should be narrowed or dropped, and customer contracts reviewed before any external use.

How should an agent split scarce stock between two customers?

An agent should treat a shortage as a ranked set of tests, not a search for the fastest or largest order to fill. First remove every allocation that is infeasible or forbidden, then rank what is left by the company's own written priority rule, and hand the choice to a person when the rule is silent or two commitments conflict.

The order matters because the obvious choices are usually the wrong ones under pressure. First come, first served ignores stock that was promised to a channel in advance. Filling the biggest order ignores a customer who cannot accept a substituted lot. Splitting evenly ignores a customer whose terms forbid partial shipments, so a half delivery is worth nothing to them.

For a dataset, this means an allocation episode is only useful when it records the constraints that ruled options out, not just the order that shipped. A model trained or graded on shipped lines alone learns what happened, never why the other customer waited.

There is also a legal backdrop that a written rule should respect. Under the Uniform Commercial Code, section 2-615, a seller whose capacity is only partly affected must allocate production and deliveries among customers and may do so in any manner that is fair and reasonable. That is general background, not advice; counsel decides how it applies to a given contract, and the packet simply records which rule the company actually used.

What a contested allocation leaves behind in the ERP

A shortage leaves traces in several places, and no single screen shows the whole decision. The reservation itself, any manual override, the incoming supply the decision relied on and the backorder created for the losing order usually sit in different tables.

Odoo documents three reservation methods for delivery operations: At Confirmation, which reserves products only when a sales order is confirmed and stock is already available; Manually, where availability is checked and reserved by hand; and Before scheduled date, which reserves within a set number of days of the delivery date. Its documentation also tells users to click Unreserve on an order line when one order should be prioritized over another, which is exactly the moment a packet needs to capture.

Odoo's allocation report lets a user assign incoming units from a purchase or manufacturing order to specific outgoing demands before the goods arrive, and the documentation notes that this assignment does not move any inventory. Whether a short delivery creates a backorder is itself a setting on the operation type: Ask, Always or Never, where Never cancels the remaining products.

Microsoft's Dynamics 365 Inventory Visibility documentation describes allocation as a soft, virtual pool set aside before sales orders exist, for ring fencing stock to prioritized channels, regions or customer groups and for oversell control. Allocation groups can be nested in a hierarchy of up to eight levels, and the allocated measure falls as the consumed measure rises. The same documentation describes soft reservations as a way to prevent double booking when several order systems could overbook the last piece of stock.

  • Reservation lines and their history: who reserved, unreserved or re-reserved which quantity, and when.
  • Allocation pools or ring-fenced quantities by channel, region or customer group, with consumption against them.
  • Incoming supply the decision counted on: open purchase or manufacturing orders and their promised dates.
  • Backorders, cancellations and partial shipments created for the order that lost.
  • The written rule, approvals and customer messages, which often live in email or chat rather than the ERP.

The priority and allocation constraint evaluation packet

The packet is one record per contested episode, built so a reviewer or an automated grader can reconstruct the starting state, see every candidate allocation, and check the chosen one against the rule and the eventual delivery. Every field points back to a source record, and every example value below is illustrative.

Build it at the level of one item, one location and one decision window. A shortage that spans many items becomes several packets that share an episode identifier, so each decision can be graded on its own.

The priority and allocation constraint evaluation packet
Field groupFieldsIllustrative valueSource recordWhy the grader needs it
Episodeepisode_id, item, location, decision window start and endEP-0412, item A-17, main warehouse, one business dayPacket indexScopes the decision so two shortages are never graded as one
Starting supplyon hand, quality hold, already reserved, incoming with promised date40 on hand, 0 on hold, 0 reserved, 60 incoming in 9 daysStock ledger, receipts, open purchase ordersDefines what was feasible at decision time, not after
Competing demandorder lines, requested and promised dates, quantity, partial-shipment flagCustomer 1 wants 30 by day 2; customer 2 wants 25 by day 3, no partialsSales order lines, customer termsLists every candidate the agent had to weigh
Ring fences and commitmentsallocation group, allocated and consumed quantities, contract minimumsCustomer 2's group holds 25 allocated, 0 consumedAllocation pool, framework agreementHard constraints that remove options before ranking
Specification and approval stateapproved revision, approved source or lot, substitution allowedCustomer 1 accepts revision C only; stock is revision CItem master, customer specification, supplier approval listCatches an allocation of stock the customer cannot use
Priority rulerule text, version, effective date, ownerCommitments first, then earliest promised date, then account tierWritten policy or allocation memoThe rule the decision is graded against
Decisionquantities per order, actor, timestamp, override reasonCustomer 2 gets 25, customer 1 gets 15 now and 15 from receiptReservation history, approval logWhat was actually chosen and by whom
Exceptions and noticeschange notices, customer acknowledgement, escalationCustomer 1 told of split delivery on day 1Email, CRM activity, order notesShows the losing party was handled, not ignored
Outcomeshipped quantities and dates, backorder closed, returns or claimsBoth orders complete by day 11, no claimsShipments, invoices, backorder linesSeparates a good decision from a status that only looks closed
Provenancereal or illustrative, extraction query, reviewerReal, extracted from ERP history, reviewed by plannerPacket metadataLets a reviewer reproduce and audit the packet

Which constraint makes the obvious allocation wrong?

The constraint that invalidates the obvious choice is almost always one that lives outside the order line: a prior allocation, a specification, a customer term or a supply promise. The table pairs the tempting answer with the record that defeats it, which is the core of a useful counterexample set.

Which constraint makes the obvious allocation wrong?
Tempting allocationConstraint that invalidates itRecord that proves itCorrect handling
Fill the earliest order firstStock was ring-fenced to another channel or customer groupAllocation pool showing allocated but unconsumed quantityServe the earlier order only from unallocated stock
Fill the largest order firstThat customer only accepts an approved revision or lot the stock does not matchCustomer specification and lot or revision on the stockExclude the incompatible stock before ranking
Split the stock evenlyOne customer's terms forbid partial shipmentsPartial-shipment flag on the order or termsShip that order whole or not at all, and say so
Ship from stock on handPart of on-hand stock is on quality holdQuality hold or inspection recordCount only released stock as available
Promise the gap from incoming supplyThe purchase order date slipped or the supplier issued a change noticeSupplier acknowledgement or change noticeRe-date the promise and notify the customer
Let the agent decide by account sizeThe written rule ranks contractual commitments above account tierPolicy text with effective dateApply the rule; escalate if the rule is missing
Keep the original reservationA planner unreserved it to prioritize another orderReservation history with unreserve eventGrade against the final approved reservation, with the reason

Which linked record proves the decision and the delivery outcome?

The decision is proved by the reservation or allocation history plus the approval that authorized it; the outcome is proved by shipments and closed backorders, not by an order status or the agent's final message. An order marked fulfilled can still hide a short shipment, and a confident reply to a customer proves nothing about the warehouse.

Agent benchmarks make the same separation. In the tau-bench code, the reward is computed by replaying the annotated ground-truth actions on a fresh copy of the database and comparing the resulting data hash with the agent's; if they differ, the reward is zero, and any required outputs are checked separately against the agent's responses. An allocation packet supports that style of grading when its outcome fields describe end state, not narrative.

In practice, link four records for every episode: the reservation or allocation event, the approval or rule reference, the shipment or cancellation, and the closure of the backorder. If any of the four is missing, mark the packet incomplete rather than inferring the gap.

Worked case: 40 units left, two open orders (illustrative)

This case is illustrative; the items, counts and days are invented to show the method, not drawn from a real company. A distributor has 40 units of item A-17 released and on hand, 60 more due on a purchase order in nine days, and two open orders.

Customer 1 ordered 30 units for delivery on day 2 and accepts partial shipments. Customer 2 ordered 25 units for day 3, does not accept partial shipments, and belongs to a customer group with 25 units ring-fenced under a framework agreement. The written rule says commitments come first, then the earliest promised date, then account tier.

The tempting answer is to ship customer 1's 30 units first because the order is earlier. That leaves 10 units, which cannot satisfy customer 2's no-partials term and also breaks the ring fence. Applying the rule in order, customer 2 receives its 25 committed units, customer 1 receives the remaining 15 now, and the other 15 are reserved against the incoming purchase order with a revised date sent to customer 1.

The outcome check looks at shipments, not statuses: customer 2's 25 shipped on day 3, customer 1's first 15 on day 2, and the backorder for 15 closed when the receipt landed. The counterexample variant changes one fact: the purchase order slips by a week and the supplier sends a change notice. The same allocation still stands, but the packet must show the second customer notice, or the episode is graded as mishandled.

  • Starting state: 40 released on hand, 60 incoming, two orders, one ring fence.
  • Evidence references: allocation pool entry, both order lines with terms, purchase order, policy text.
  • Applicable rule: commitments, then promised date, then tier.
  • Decision: 25 to customer 2, 15 to customer 1 now, 15 from receipt.
  • Outcome check: shipments and backorder closure, plus the customer notice.

Grading an agent's allocation against the packet

Grade an agent's allocation by the same checks a planner's decision would face, each tied to a packet field, and report pass or fail per check rather than one blended score. A single score hides whether the agent failed on feasibility, on policy or on communication.

Grading an agent's allocation against the packet
CheckPass conditionCommon failurePacket fields used
FeasibilityNo unit allocated beyond released supply at decision timeCounting held or incoming stock as on handStarting supply
Hard constraintsNo ring fence, specification or partial-shipment term brokenShipping a substituted revisionRing fences, specification state, demand
Rule fidelityRanking matches the written rule in force on that dateUsing a newer rule version on an old episodePriority rule, decision
EscalationAgent hands off when the rule does not decideInventing a tie-breakPriority rule, exceptions
Customer handlingEvery shorted customer receives a dated noticeSilent backorderExceptions and notices
End stateFinal reservations and shipments match the reference decisionStatus says fulfilled, shipments say shortDecision, outcome

Gaps that make an allocation episode unusable

Most allocation history fails as data for three reasons: the rule was never written down, the reservation was overwritten without history, or the customer messages that explain the decision sit outside the system. Each can be fixed only by going back to source, not by guessing.

When the rule lived in a planner's head, record the episode as unruled and keep it out of rule-fidelity grading; it can still serve feasibility and outcome checks. When the ERP keeps only the current reservation, rebuild the sequence from stock moves and order history, and flag the packet as reconstructed with lower confidence.

Customer names, contract terms and pricing inside these records raise separate questions. Being able to export them is a matter of system access. Whether people's details may be shared is a privacy question. Who owns the records, and whether customer contracts allow their terms to be disclosed, are ownership and contractual questions. De-identifying the customer does not by itself create a right to license the episode, and a reviewer should check confidentiality clauses in framework agreements before any packet leaves the company.

  • Stop and narrow scope when the policy text for the period cannot be found.
  • Stop and ask counsel when contracts mark allocation terms or volumes as confidential.
  • Replace customer identities with stable pseudonyms so repeat behavior stays visible.
  • Drop episodes where outcome records are missing rather than filling them from statuses.

Offering allocation episodes for AI work

Allocation episodes with their rules, overrides and delivery outcomes are the kind of decision history that AI developers ask for when they build or test agents for operations work. The packet above is also the review unit for that conversation, because it shows what is in each record before any data moves.

When a distributor licenses chosen records for AI work, SourceX runs the deal end to end: finding the buyer fit, reviewing rights, drafting the contract, preparing the data, delivering it and paying the company. Buyers tend to favor a couple of years or more of steady history and tens of thousands of records in a single system, yet rare work can qualify with less, and SourceX judges each case separately.

Allocation packets stay inside the company until it has approved the scope and terms and signed an agreement, and finding out whether its records fit starts with a brief assessment, with no files uploaded.

Frequently asked questions

What is an inventory allocation constraint dataset?

It is a set of contested allocation episodes, each stored with the starting supply, competing orders, hard constraints, the written priority rule, the decision and the delivered outcome. Its purpose is to teach or grade how a person or agent should split scarce stock, so the constraints that ruled options out matter as much as the order that shipped.

Is first come, first served a valid allocation rule?

It can be, if it is the company's written rule and no prior commitment overrides it. It fails when stock was ring-fenced for a channel or customer, when a customer cannot accept partial shipments, or when the earlier order requires a specification the stock does not meet.

Why grade on shipments instead of order status?

Statuses can say fulfilled while a line shipped short, and an agent's message can sound right while the warehouse did something else. Shipments, cancellations and closed backorders describe the end state, which is what a decision should be judged by.

Can allocation history be rebuilt if the ERP overwrote reservations?

Often partly. Stock moves, order line history and backorder records can reconstruct the sequence, but the packet should be flagged as reconstructed and graded with lower confidence, and episodes with missing outcomes should be dropped.

Do customer contracts limit sharing allocation records?

They can. Framework agreements sometimes treat volumes, allocations or terms as confidential, so a contract review comes before any external use. De-identifying the customer does not settle that question on its own; counsel should review the specific agreements.

Sources

  • Odoo documents three reservation methods for delivery orders: At Confirmation, Manually and Before scheduled date. Source
  • Odoo's documentation tells users to click Unreserve on an order line when one order should be prioritized over another. Source
  • Odoo's allocation report assigns incoming units from purchase or manufacturing orders to outgoing demands without moving inventory. Source
  • Odoo's Create Backorder setting on an operation type can be Ask, Always or Never, where Never cancels the remaining products. Source
  • Dynamics 365 Inventory Visibility allocation is a soft, virtual pool for ring fencing and oversell control, with allocation hierarchies of up to eight levels and allocated quantities reduced as consumption is recorded. Source
  • Dynamics 365 Inventory Visibility soft reservations are described as preventing double booking when several systems could overbook the last piece of stock. Source
  • UCC section 2-615(b) requires a seller whose capacity is partly affected to allocate production and deliveries among customers in any manner that is fair and reasonable. Source
  • The tau-bench environment computes reward by comparing the database hash after the agent's actions with the hash after replaying ground-truth actions, and checks required outputs separately. Source

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies