Coding SOP: raw materials, packaging, products, batch numbers
Two packaging variants sharing one code, or two raw material lots carrying the same internal lot number, are enough to cause a dispensing mix-up and break the traceability chain. A coding and batch numbering SOP ensures that each identifier points to only one item.
In a cosmetic factory, every material and every batch is referred to by a code and a batch number. The SOP for coding raw materials, packaging materials and finished products and for batch numbering specifies the code structure, who assigns new codes, which register they are recorded in and how internal batch numbers are generated, so that each identifier points to only one item. This article describes the steps, their rationale and how they are monitored.
For receiving operations, see the article SOP for receipt and quarantine of raw and packaging materials; for printing batch numbers on packaging, see SOP for printing and checking batch numbers and expiry dates. All code structures below are examples.
1. Purpose, scope and basis
Purpose: each material, variant and batch has its own identifier that is not duplicated and not reused, so that records can be linked from the raw material lot to the finished product batch. Scope: raw materials, packaging materials, bulk products, finished products, formula versions and artwork.
| Requirement level | Source | Content |
|---|---|---|
| [Mandatory] | Decree 93/2016/ND-CP on cosmetic manufacturing conditions, Article 15, Clause 4 | During operation, cosmetic manufacturers must apply a quality management system in line with CGMP-ASEAN. |
| [Mandatory] | Circular 06/2011/TT-BYT on cosmetic product management, Article 18, Clause 1, point g; Clause 2 | Cosmetic labels must show the production batch number. The product name and the production batch number must appear on the original label of the immediate packaging. |
| [Mandatory] | Decree 90/2026/ND-CP on penalties for administrative violations in the health sector, Article 69, Clause 1, points b and c | Imposes fines for manufacturing cosmetics with a formula that does not match the notification dossier, and for using raw materials that have expired or do not meet quality specifications in cosmetic manufacturing. |
| [Standard] | CGMP-ASEAN | A batch number is a designation in numbers and/or letters that identifies the complete history of the batch, quality control and distribution (section 14.2). Every finished product should bear a production identification number which enables the history of the product to be traced (section 6.2.1); a batch numbering system should be specific for the product, and a particular batch number should not be repeated for the same product in order to avoid confusion (section 6.2.2); records of batch numbers should be maintained (section 6.2.4). All deliveries of raw materials and packaging materials should be checked and verified for their conformity to specifications and be traceable to the product (section 6.1.2). The master formula should contain, among other information, the product name and product code or number (section 8.3.1). ISO 22716 also has a section on documentation. |
| [Common practice] | U.S. FDA, 2013 draft guidance (non-binding) | Finished product packages should bear permanent, meaningful, unique lot or control numbers, with a corresponding coding system. |
| [Common practice] | WHO TRS 986, Annex 2 (pharmaceutical sector, for reference only) | There should be an SOP describing the batch numbering system, with the objective of ensuring that each batch of intermediate, bulk or finished product is identified with a specific batch number (section 15.38); the SOPs for batch numbering that are applied to the processing stage and to the respective packaging stage should be related to each other (section 15.39); the SOP for batch numbering should ensure that the same batch numbers will not be used repeatedly, and this applies also to reprocessing (section 15.40); batch-number allocation should be immediately recorded, e.g. in a logbook, and the record should include at least the date of allocation, product identity and size of batch (section 15.41). |
2. Responsibilities
- Requester (R&D, purchasing, planning): completes a request form with the technical information.
- Code list custodian (usually part of QA): checks for duplicates, assigns codes, records them in the register and locks discontinued codes.
- QA: approves the SOP, the code structure and new codes; decides in cases of duplication or mix-up.
- Warehouse: assigns internal lot numbers on receipt.
- Production planning: assigns production batch numbers and records them in the batch number register.
Requesters do not assign codes themselves [Common practice].
3. Code and batch number structure
Examples; the length, characters and meaning of each part are determined by the factory (with software validation if needed):
| Item | Example | Notes |
|---|---|---|
| Raw material | NL-0458 | Many factories assign a different code when the manufacturer or quality grade differs |
| Packaging material | BB-1207 | One code per variant (material, capacity, color, printed content) |
| Finished product | TP-0315-50 | Product code + pack size (50 mL) |
| Formula version | CT-0315/03 | Incremented when the formula is changed through change control |
| Internal raw material lot number | N261204-02 | Receipt date + sequence number; recorded alongside the supplier lot number |
| Production batch number | 2612015 | Year, month, sequence number of the batch within the month |
| Packaging batch number | 2612015-1 | Used when one bulk batch is filled in several runs |
General rules: one variant, one code, and one code, one variant; do not reuse a cancelled code or batch number; avoid easily confused characters (the letter O and the digit 0); when the nature of a material changes, assign a new code or a new version.
4. Procedure
- Request: complete a request form with the technical documents, the manufacturer, and the variant details or artwork.
- Duplicate check: search by name, INCI, manufacturer and variant; if the material already has a code, use the existing code.
- Code assignment: take the next number in the register; do not fill the gap left by a cancelled code.
- Approval: QA signs the approval; an unapproved code must not be entered into specifications, formulas or purchase orders.
- Record in the register and the software at the same time: code, description, date assigned, assigned by, approved by, status.
- Document update: specifications and master formulas use the new code.
- Assign internal lot numbers on receipt: one number per supplier lot; record both numbers on the receiving record and the warehouse label.
- Assign the production batch number when the production order is issued: immediately record the date assigned, product code, formula version and batch size.
- Assign packaging batch numbers: derived from the compounding batch number according to a fixed rule.
- Reprocessed and destroyed batches: a reprocessed batch is numbered according to the SOP, with a recorded link to the original batch; the number of a destroyed batch is not reassigned.
- Discontinuing a code: lock it in the software and record the date and reason; do not delete it.
5. Rationale for each step
| Step | Why it is needed | Risk if skipped |
|---|---|---|
| Duplicate check | If one material has two codes, its inventory and quality history are split in two | The warehouse reports a stock-out while stock remains; recurring supplier defects do not show up in trends |
| One code – one variant | The person dispensing only needs to check the code | A 30 mL bottle is picked for a 50 mL order |
| No reuse of codes or batch numbers | Old records, retained samples and complaints still refer to the old identifier | One batch number leads to two batches; the investigation goes in the wrong direction |
| QA approval | Separates the request from the approval | Raw materials that have not been evaluated are purchased and used |
| Two lot numbers for raw materials | The supplier number links to the CoA; the internal number links to the receipt date, status and expiry date | Two suppliers use the same lot number; the original CoA cannot be traced |
| Formula version recorded with the batch number | Shows which batch followed which formula | It cannot be demonstrated that a batch followed the notified formula |
| Packaging number derived from the compounding number | Traces back from the finished product to the right bulk batch | The affected filling runs cannot be isolated |
6. Monitoring
- Code register review: QA checks that each new code has a request form and an approval signature, and that the sequence numbers are continuous.
- Duplicate screening: filter the code list by name and INCI.
- Warehouse checks: randomly select a few packages and compare the code and both lot numbers against the software.
- Traceability exercise: trace from a finished product batch back to the supplier lot number and time it (see retained samples and batch traceability (in Vietnamese)).
- Software block test: try entering a locked code or a batch number that has already been used.
Example indicators: the number of duplicate codes found per quarter; the number of material mix-ups caused by codes; traceability exercise time. Acceptance levels are set by the factory [Common practice].
7. Failures, SOP revision and records
Duplicate codes, duplicate batch numbers, use of an unapproved code, or recording the two types of lot number interchangeably are handled under the procedure for deviations and CAPA (in Vietnamese); the first question is which finished product batches that identifier has gone into. When two duplicate codes are merged, both are kept in the register and the link is recorded; old records are not rewritten. CGMP-ASEAN recommends that an error be corrected in such a manner that the original entry is not lost, with the correction made close to the original entry, initialed and dated (section 8.1.2).
The SOP is revised through change control when the software or the code structure changes, or when errors recur. Records to retain: the code register, request and approval forms, the batch number register, the list of discontinued codes, and the version history of formulas and artwork. For how batch numbers are recorded in each batch record, see batch manufacturing records. You can ask a contract manufacturer to show you how its finished product batch numbers link to raw material lot numbers.
Frequently asked questions
Should the supplier's lot number be used directly as the internal lot number?
It should not. Two suppliers may use the same number, and one lot may be delivered several times. The internal lot number is tied to each receipt; the original lot number is still recorded to link to the CoA [Common practice].
Does the batch number have to follow a mandatory structure?
No. CGMP-ASEAN and the legal documents cited in this article do not specify a structure; CGMP-ASEAN recommends a batch numbering system specific to the product, with no batch number repeated for the same product (section 6.2.2).
Does changing the manufacturer of the same raw material require a new code?
It depends on the factory's rules. Many factories assign a new code because the specifications and quality history differ; the change is evaluated through change control.
References
- ASEAN Cosmetic Directive (ACD), Appendix VI — ASEAN Guidelines for Cosmetic Good Manufacturing Practice. ASEAN Cosmetic Committee. PDF.
- ISO 22716:2007. Cosmetics — Good Manufacturing Practices (GMP) — Guidelines on Good Manufacturing Practices. International Organization for Standardization.
- Chính phủ. Nghị định 93/2016/NĐ-CP ngày 01/07/2016 quy định về điều kiện sản xuất mỹ phẩm. [Government of Vietnam. Decree 93/2016/ND-CP of 1 July 2016 on cosmetic manufacturing conditions.]
- Bộ Y tế. Thông tư 06/2011/TT-BYT ngày 25/01/2011 quy định về quản lý mỹ phẩm. [Ministry of Health. Circular 06/2011/TT-BYT of 25 January 2011 on cosmetic product management.]
- Chính phủ. Nghị định 90/2026/NĐ-CP ngày 30/03/2026 quy định xử phạt vi phạm hành chính trong lĩnh vực y tế. [Government of Vietnam. Decree 90/2026/ND-CP of 30 March 2026 on penalties for administrative violations in the health sector.]
- U.S. FDA (2013). Draft Guidance for Industry: Cosmetic Good Manufacturing Practices. Guidance page.
- WHO Technical Report Series, No. 986, Annex 2 (2014). WHO good manufacturing practices for pharmaceutical products: main principles. World Health Organization. GMP guidelines for medicines, cited for methodology. who.int.
BUTTER-C