Articles

Coding Rules


1. The Cornerstone of Enterprise Data Management
In the process of introducing an ERP system, many people focus on functional modules or reports, but ignore the most basic and critical task—Coding Rules. A code is like the ID number of enterprise data. If the rules are not set well, future queries, statistics, and even system integration will face great difficulties. A good coding rule must be "unique," "extensible," "readable," and "consistent." Below are practical suggestions for the two most commonly used types of codes: customers/suppliers, and goods/raw materials/semi-finished products.

2. Coding Rules for Customer and Supplier Numbers
Customers and suppliers are external partners. It is recommended to use "serial numbers" or "classified serial numbers." To ensure system stability and report consistency, it is recommended that the code length not exceed 10 characters.
* Simple serial number (e.g., C00001, S00001): The prefix C stands for Customer, S for Supplier, followed by a fixed number of digits. It is short, fast to input, and will not lose meaning due to company name changes.
* Classified serial number (e.g., C-HK-0001): If there are many customers or suppliers, a classification code can be added (e.g., C-HK for Hong Kong customers). However, too many classification codes will increase input burden and error rates.
* Practical advice: Never use Chinese names or phone numbers as codes. Once a code is generated, it should be regarded as a permanent identifier.

3. Coding Rules for Goods, Raw Materials, and Semi-Finished Products
Goods coding is the most complex part of the ERP system. To be compatible with international barcode standards, it is recommended that the code length not exceed 26 characters. In practice, the coding of goods, semi-finished products, and materials usually incorporates three key attributes: "size," "color," and "main material" to allow "knowing the item by its code."
* Meaningful coding (Smart coding): Directly encode attributes into the number. Example: FG-PL-100-R represents "Finished Good, Plastic, 100cm, Red" (11 characters). Example: RM-ST-50-B represents "Raw Material, Steel, 50cm, Blue" (10 characters). The disadvantage is poor extensibility.
* Meaningless coding (Serial number): This is the most recommended method by ERP consultants. The number itself carries no meaning; detailed attributes are stored in the "Item Master" file. Example: P000001 for finished goods, M000001 for raw materials. The advantage is strong extensibility.
* Practical advice: Use "category prefix + serial number" (e.g., P for Product, M for Material, S for Semi-finished). For example: P000001 (7 characters). Or P-2026-ABC-CUST01-0001 (21 characters, within the 26-character limit).
* Make good use of the "Item Master" to store specifications, sizes, materials, and supplier item numbers. Reserve space for barcodes (Barcode / QR Code) during coding.

4. Conclusion: Coding is a Long-Term Asset for the Enterprise
There is no absolute right or wrong in coding rules, only "suitability." It is recommended that cross-departmental discussions be held and finalized in the early stages of ERP introduction. Once the rules are determined, they should be strictly enforced, and "no duplicates" and "auto-numbering" mechanisms should be set in the ERP system. A good coding rule can make enterprise data management more efficient and lay a solid foundation for future digital transformation. It is recommended that codes should not be too long, as they are hard to remember, and reports may not display the complete code.