By Anant MishraDesign study
Five fictional source requests and authored group associations. Two offline scenarios and boundary checks executed locally. No supplier identity, ERP integration, database deployment or operational outcome was verified.
Design feature 01
5 fictional requests
Design feature 02
2 offline scenarios
Design feature 03
0 ERP calls
Executive Summary
Five fictional source records retain namespace and leading-zero distinctions, with separate assigned, unmapped and ambiguous association outcomes.
Architectural Deep Dive
Design study. A fictional group is preparing a supplier reference feed from multiple ERP instances and companies. Several exports contain the same local supplier number. The proposed adapter must preserve distinct source records and resolve only explicitly supplied group associations. No actual supplier, ERP connection, payment or identity-verification process is exercised.
The fixture uses arbitrary labels for source instances, companies and group targets. Its association rows are authored assumptions, not evidence that named legal entities are the same. The executed reference is a small Python key-and-association checker. It creates no database and implements no fuzzy matching or supplier due diligence.
Define the source record key
The local key has three text components: instance, company and local_id. All must be nonempty strings without leading or trailing whitespace. The reference preserves case and leading zeros. These are deliberately strict exercise rules. A real adapter would need an approved source-specific representation and a reliable catalog for environment and company namespaces.
Business Central’s vendor resource separately documents a non-editable GUID identifier and a string vendor number. Its vendor retrieval route places the vendor within a company and environment-specific prefix. Those references motivate preserving context. The fixture’s local_id is an invented opaque code and does not pretend to reproduce a complete vendor API schema.
Trace four superficially similar records
The first record is erp-a, north, 00042. The second is erp-b, north, 00042. Their company and local ID match, but their source instances differ. The reference retains both keys. The third is erp-a, south, 00042, distinguished from the first by company. The fourth is erp-a, north, 42, distinguished by its exact text identifier.
The supplied associations assign the first and third records to fictional group target g1, the second to g2 and the fourth to g3. Two distinct source records may therefore share a group target without becoming the same source key. The checker reports both source keys, rather than discarding one record after grouping.
A fifth request, erp-c, north, 00042, has no association row. It remains unmapped. The baseline output consequently contains four assigned source records and one unmapped record, with no ambiguous assignments. Those counts describe the invented fixture only. No supplier population, spend total or operational matching rate is inferred.
Hold a competing association
The second executed scenario appends another association for the first source key, this time pointing to g9. The local policy now classifies that source record as ambiguous and returns no selected group target for it. The other three assigned records remain assigned and the fifth remains unmapped. The output preserves the sorted competing target labels for inspection.
This policy also holds repeated association rows even if their target labels match. Selecting the first or last row could hide a duplicated import or unclear provenance. A production system might distinguish exact retransmissions from conflicting decisions, but that requires a designed receipt and version policy. This reference intentionally chooses a narrower hold rule.
The scenario does not show an identity review being performed. Its useful result is that competing evidence stays visible to a later process. An operator would investigate the authoritative source and association records before deciding whether any correction was warranted.
Exercise malformed keys and collision risks
The reference rejects an integer local ID instead of converting it to text. Once an upstream parser has removed leading zeros, the original identifier cannot be reconstructed reliably from the remaining number alone. It also rejects missing components, blank company labels, edge whitespace and duplicate full request keys.
A boundary check uses components containing a delimiter to demonstrate that tuples remain distinct when a naive joined string would collide. Additional checks retain case differences, distinguish 00042 from 42 and verify that reversing request order preserves the source-key outcomes. They test the declared software contract, with no claim about a particular ERP’s identifier rules.
PostgreSQL’s constraints documentation describes composite primary keys and their unique, non-null requirement. That offers one implementation mechanism for a later persistence layer. The offline reference establishes neither a database constraint deployment nor the business correctness of a key selected for production.
Retain reproducibility and next dependencies
The fictional fixture, offline verifier, reproduction guide and actual local execution record preserve both scenario outputs, boundary-check count and source/input hashes. They run with Python’s standard library and no credentials.
An implementation rehearsal would need authorized master-data extracts, verified record-ID semantics, an authoritative namespace catalog, accountable association evidence and a correction process. It would also need to check persistence, import completeness and downstream joins using actual systems. The companion essay explains the boundary between a source key and a reviewed group association, while the ERP architecture paper provides the wider platform context. No reduction in duplicate suppliers, payment errors or close effort is claimed.
Proposed approach
- Scope
- Source-key preservation and explicit association cardinality
- Evidence
- Authored fixture, verifier, hashes and actual local execution record
Sources
- Vendor resource type — Microsoft Business Central documentation; checked 23 November 2026
- Get vendors — Microsoft Business Central documentation; checked 23 November 2026
- Constraints — composite primary keys — PostgreSQL 18 documentation; checked 23 November 2026
Related reading
Read the publishing standards or suggest a correction.