ERPNext serial number and batch tracking

A planning and implementation guide to tracking serialized and batch items in ERPNext, covering Serial and Batch Bundles, batch expiry, traceability and why negative stock is blocked.

On this page

When ERPNext serial and batch tracking decides what you can trace

ERPNext serial and batch tracking records which individual units or lots of an item moved through your stock, so you can answer where a specific item went and where it came from. ERPNext is a free and open-source ERP covering accounting, inventory, manufacturing and projects, built on the Frappe Framework, according to the frappe/erpnext repository. Within its inventory module, an item can be flagged to track serial numbers (one identifier per unit), batches (a shared identifier for a lot), or both, and that flag decides what every later receipt, transfer, delivery and manufacturing entry must record. Teams need this when a recall, warranty claim, expiry check or regulator request asks which customers received a given unit or lot, rather than which products were sold in aggregate.

Most distributors, retailers and manufacturers reach this point when one of three things changes: a product carries a warranty tied to a unit, a product has a shelf life that must be enforced, or a supplier or regulator requires lot-level records. Before configuring anything, confirm which of these applies to each item group, because the choice cannot be made for the whole catalog at once without affecting purchasing, selling and manufacturing. Ask your compliance lead which identifiers the regulator or customer contract requires, how long records must be kept, and whether a single unit can ever be split across batches. Your answers determine whether you need serial numbers, batches, or both, and whether expiry dates are captured at receipt.

Which tracking option fits each item type

Serial numbers suit items where each unit is individually identified and sold, such as machinery, equipment with warranties, or units in a rental fleet. Each unit carries one number through receipt, transfer, delivery and return, so you can establish which customer holds a specific unit and what service history it has.

  • Quantity per serial: Each serial represents one unit, so a receipt of 50 units needs 50 serial entries.
  • Warranty and service history: A serial links the unit to its buyer and to any repairs recorded against it.
  • Typical fit: Distributors of durable equipment and manufacturers shipping finished goods that need individual identity.
  • Entry effort: This is the highest per unit, since each number must be captured at receipt and delivery. Barcodes on supplier labels reduce the manual work.

Check whether your suppliers already print unique serials on each unit, because relabeling in your warehouse adds cost and creates room for error.

Why negative stock is blocked for serialized and batch items

ERPNext will not issue a serial number or batch quantity that has not been received into the system, so the order in which receipts, transfers and corrections are posted decides whether deliveries go through. The cards below cover the situations where that rule shapes day-to-day work and the decisions to settle before go-live.

Late supplier receipts

A customer order can be ready to ship before the supplier's receipt is entered, and ERPNext will block the delivery note for a serial or batch item that has no recorded stock. Check how often goods arrive ahead of paperwork in your operation, and agree who posts the receipt on the same day. Otherwise warehouse staff will work around the system, which breaks traceability.

Backdated entries

If a receipt is posted with an earlier date than a delivery already made, the delivery can fail validation or the stock ledger can show the unit as unavailable on the day it left. Set a rule that receipts are posted on the physical date of arrival, and test how your team corrects a wrongly dated entry before it happens in production.

Stock reconciliation for counts

A physical count that finds a serial or batch quantity not in the system cannot be corrected by pushing stock below zero. The reconciliation has to add the units with their serial or batch numbers, which means counters need the identifiers, not just quantities. Confirm this step with your warehouse team before the first cycle count.

Transfers and in-transit stock

A transfer out of one warehouse needs the units to exist in that warehouse first, so a receive step that lags behind a send step can leave the destination unable to issue the same lot. Decide whether transfers use a transit warehouse, and confirm how partial receipts assign serial or batch numbers to each leg.

Manufacturing consumption timing

Work orders that consume a batch before its receipt is posted will fail the same stock check, which often surfaces during production planning rather than at receipt. Map which material consumptions happen against which batches, and confirm whether your planning sequence posts inbound material before the work order starts.

Data migration cut-over

Loading opening stock for serialized and batch items requires every unit or lot to be entered before any outbound transaction is imported. A migration that replays historical sales before the opening balances will fail on the first shipment. Plan the opening stock load as the first migration step, and verify counts against the legacy system before go-live.

How batch expiry and traceability reports answer recall questions

When a recall or quality hold arrives, the questions are concrete: which batch or serial is affected, where it sits now, and which customers received it. In ERPNext, the answers depend on two things: the expiry date recorded on each batch, and the stock movements that carried that batch or serial through receipts, transfers, deliveries and manufacturing entries. Start by confirming how expiry behaves in your version. Check whether ERPNext stops a delivery of a batch past its expiry date or only flags it in reports. Test this with a batch you create for the purpose: give it a past expiry date, then attempt to deliver it. The result tells you whether warehouse staff will meet a hard stop or a warning, and that determines the procedure you write for them.

The batch-wise stock views show how much of each batch remains in each warehouse at a chosen date, which is the starting point for quarantining stock. The traceability reports work in the other direction. The serial and batch traceability view links a serial number or batch to the documents that moved it, so a recall query can run from a lot to the delivery notes and invoices that shipped it. Stock held in intermediate or transit warehouses and partial deliveries can complicate this trail, so confirm how the report treats them in your version. Also verify that every goods issue, including production consumption and stock adjustments, records the batch or serial. A movement without one leaves a gap that no report can close later.

Before go-live, run a recall drill on your own data. Pick one batch shipped to several customers and one serial number transferred between warehouses, then measure how long it takes to produce a list of affected customers, quantities and current locations. Compare that output against your delivery notes and sales invoices, and record every missing link. Ask your implementation partner, or check the documentation for your ERPNext version, what the traceability output covers for returns and for stock consumed in production. Keep the drill results in your quality and audit file, because the reports are only as complete as the batch and serial data entered at each step.

How to set up serial and batch tracking in ERPNext

This sequence takes an ERPNext instance from a version check to traceable stock, with serial and batch tracking enabled on the right items, receipts that record every unit, and a tested recall trace before existing inventory is loaded. Each step ends with a check that tells you whether it is safe to move on.

  1. Confirm the version and item master settings

    Before changing any item, confirm which ERPNext major version you run and whether the Serial and Batch Bundle is in use there, since this page assumes version 15 or later. Review the stock settings and the item groups that will hold tracked goods, and decide which items need serial numbers, which need batch numbers and which need neither. Your team or your partner should record this decision in a short table that lists item groups, tracking type and the owner of each rule. The step is done when a test item can be opened and the tracking options appear as expected in a non-production site.

  2. Enable serial and batch tracking per item

    Open each item in scope and set the serial number or batch number flag on its item master, then save. Tracking is set per item, so a mixed catalog should be checked item by item rather than by item group alone. Confirm with the item owner which items must also carry a shelf life, because expiry settings are added in the next step. The check is a sample of items from each group, opened after saving, that shows the expected flags and no leftover settings from a copied template.

  3. Define naming series and expiry rules

    Set the naming series for serial numbers and batches so that identifiers follow a format your warehouse and suppliers can read and print. For items that spoil or expire, set the shelf life and the rule that decides expiry, and confirm with quality owners how batch expiry should be checked on receipt and delivery. Write down who may create or edit a naming series, because changing it later affects every new identifier. The check is a test record created under each series, confirming that the identifier format and expiry date show correctly on the record.

  4. Set up receipts with serial and batch bundles

    Configure the purchase receipt workflow so that each received line creates a Serial and Batch Bundle that lists the exact serial numbers or batch quantities. Your warehouse staff should confirm whether they enter identifiers by hand, by scanning or by importing a file, and the team should test which option matches the supplier's labels. Keep receipts and bundles linked so that a later audit can move from a unit to the receipt that brought it in. The check is a test receipt with three or more identifiers that shows matching bundle quantities and the expected stock balance per warehouse.

  5. Test a delivery and a recall trace

    Create a test delivery for a tracked item, select the specific serial numbers or batches to ship, and confirm that the stock ledger updates correctly. Then run the traceability report from a delivered identifier back to its supplier receipt, and forward from a batch to every customer that received it. Negative stock is blocked for these items, so also confirm that an attempt to ship more than is on hand fails with a clear message. The step is done when a recall trace returns every test delivery and receipt linked to the chosen batch, without gaps.

  6. Load existing stock with traceable identifiers

    Import the current on-hand inventory only after the receipt and delivery tests pass. Prepare a file with item codes, warehouses, identifiers, expiry dates and quantities, and check it against a sample of physical stock before loading. Load in small batches as the Data Import documentation advises for large volumes, then reconcile the stock balance and the bundle totals after each batch. The step is complete when the imported balances match the physical count and the recall trace works for at least one imported identifier.

Access, data quality and audit trail considerations

Serial and batch records change what stock can be traced to, so who can create them, edit them and load them in bulk matters as much as the item setup. The cards below cover the controls to decide on before go-live, using ERPNext roles, permissions and the standard import tooling.

Who may create batches

Batch numbers are created from receipts or at the point of stock entry, so the people who hold those document permissions effectively decide what gets a batch identity. Decide which roles may create batch records directly and which must use an existing batch from a purchase receipt. Confirm in your own instance how the batch numbering series and the batch creation permission interact for your roles before you grant anything broadly.

Who may edit serial and batch bundles

Since version 15, quantities and serial or batch selections are recorded in Serial and Batch Bundle documents attached to stock vouchers. Editing a bundle after posting can change which lots a movement is attributed to, so treat bundle edits as a sensitive action. Limit write access to a small stock control group and test that a reversal or amendment path exists for corrections.

Audit trail of stock movements

The stock ledger and the serial and batch history together show which lot moved, when, from which warehouse and under which voucher. Auditors and recall teams will ask for this chain, so check that cancelled and amended vouchers remain visible and that document version history is enabled for the stock doctypes. Agree how long exports of this evidence are kept outside the system.

Role-based visibility of batch data

Cost, valuation and supplier details that sit alongside batch records may not suit every stock user. Use role permissions and user permissions to restrict which warehouses, companies or item groups a user can see when reviewing batch or serial stock. Verify each role with a test user before relying on the restriction, since reports can expose data through different views.

Bulk loading with the Data Import tool

Loading long serial or batch lists from spreadsheets is common during migration, but the Data Import tool works through templates and the documentation advises importing only a few thousand records at a time. Load in controlled batches, keep the source file as evidence, and reconcile counts and totals against the source after each run. Check that imported records follow the same permissions as manual entries.

Data quality checks before go-live

Duplicate serial numbers, blank batch fields and mismatched expiry dates create traceability gaps that surface during a recall. Define validation rules for identifiers and expiry, run reconciliation between physical counts and system balances, and assign an owner for exceptions. Confirm with your own instance which checks ERPNext enforces natively and which need custom scripts, and whether server scripts are permitted on your hosting.

Questions buyers ask before setting up batch tracking

How much does batch tracking in ERPNext cost to set up?

Most of the cost is people time, because ERPNext is free to self-host under GPL-3.0 and the ERPNext pricing page lists self-hosting as free. Your budget goes to configuration, data preparation, testing, training and any hosting you pay for. The main cost drivers are:

  • The number of items that need batch or serial control
  • The volume of historic stock to convert into batch records
  • Scanning, label printing and handheld hardware
  • The number of warehouses and the stock movements each one handles

Design and build are one-time work. Hosting, support and changes for new items or suppliers recur. In a quote, ask for each item of work in the written scope, its owner, and what is excluded.

Can our in-house team set up batch tracking in ERPNext?

Yes, a capable in-house team can set it up if it has ERPNext stock experience and time to test before go-live. The work covers item master settings, batch and expiry configuration, the Serial and Batch Bundle behavior introduced in version 15, label and scanning setup, and traceability reporting. Errors in item setup are costly to correct once stock has moved, so the risk is less the initial build than the mistakes made in the first weeks. Decide who owns the lot policy and who reviews changes to item settings. If nobody on the team has done this before, a partner can review the design before the build starts.

How long does ERPNext batch tracking setup usually take?

No general duration is reliable without a written scope, because the scope sets the length of the work. The largest drivers are the number of items under batch control, the amount of historic stock to convert, how many warehouses take part, and whether scanning and labels are included. Testing with your own receiving, production and dispatch routines usually takes longer than the configuration itself. Ask any implementation partner for a phased plan with milestones, the test cases they will run, and the decisions that must be made by your team before each phase can close. Confirm the target version and its release schedule with your own team as well.

What item data do we need before enabling batch tracking?

You need a clean item master and a written lot policy before any configuration starts. Prepare the following:

  • Item codes, names, units of measure and item groups, with duplicates removed
  • Which items need batch numbers, which need serial numbers, and which need neither
  • Shelf life or expiry rules, and whether expiry is set by the supplier or by your own receipt date
  • Batch numbering rules, including how supplier lot codes map to ERPNext batch IDs
  • The warehouse list and the stock movements each one handles

A lot policy states who creates batch IDs, when they are created, and what happens to stock that arrives without one. Without this agreement, configuration decisions get made in the build and reversed later.

Why does ERPNext block negative stock for batched items?

ERPNext blocks negative stock for serialized and batched items because each outgoing quantity must match a specific serial number or batch that is known to be in the warehouse. Allowing a negative balance would create a delivery with no traceable lot behind it, which breaks recall and expiry control. In practice, a delivery or transfer for these items fails until a receipt or correction brings the stock in. Confirm the behavior in your target version, check your stock settings for the rest of your items, and test how a late receipt or a supplier correction is handled before go-live.

What happens to existing stock when batch tracking goes live?

Existing stock needs a plan to get batch or serial records, or it becomes stock that cannot be shipped until it is identified. Options include a stock reconciliation to assign batches, a planned clearance of old stock, or an import of opening balances. Large imports need care: the ERPNext Data Import guide advises importing only a few thousand records at a time, so large inventories are loaded in batches and checked after each run. Ask for the import approach, the reconciliation checks and the sign-off step before the switch date. Confirm the process in a test environment first.

Can we trace a batch from supplier receipt to customer?

Yes, when batch numbers are captured at every movement, ERPNext can link a batch from receipt through transfers, manufacturing and delivery to the customer. Traceability depends on consistent data entry, so the practical question is whether every receiving, production and dispatch step records the batch. Confirm which traceability reports your target version provides, and whether they cover the reverse search you need for a recall. Include recall and withdrawal drills in your testing, because they expose gaps in data capture that normal operations hide. Your compliance or quality team should approve the procedure and its evidence.

How DeployOpen scopes and supports ERPNext tracking

DeployOpen plans, implements, customizes, hardens and supports self-hosted open-source platforms inside your own infrastructure, including ERPNext. For serial number and batch tracking, we start from how your items move through receiving, stock, production and sales, then build the tracking setup around that flow.

How we scope

  • Written scope lists which item groups need serial or batch tracking and which stay untracked.
  • Scope states which warehouses, receipts, deliveries and manufacturing entries must capture serial or batch numbers.
  • Scope names the traceability reports, batch expiry rules and negative stock behavior your team has to see.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We configure item master settings, numbering rules and Serial and Batch Bundle behavior for your item groups.
  • We test receipts, transfers, deliveries, returns and stock reconciliation against a copy of your data.
  • We check batch expiry handling and stock reposting after backdated entries in a staging environment.
  • We customize only where standard ERPNext settings cannot meet the written requirement, with changes kept upgrade-safe.

How we hand over

  • Handover includes configuration records, custom app code where used, and a list of every tracked item group.
  • Documentation covers receiving, picking, delivery and recall procedures for serialized and batch stock.
  • Operators receive a test script they can rerun after upgrades or item master changes.
  • Your team gets a traceability walkthrough from a received batch to a customer delivery note.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after go-live.
  • A retainer can cover re-testing of tracking rules when your item groups, warehouses or ERPNext version change.
  • Support scope is agreed in writing, including who handles hotfixes and how upgrade windows are planned.
  • Ask for the support terms and response expectations in your quote before the retainer begins.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.