Shopify legalEntityId: testing cross-shop consolidation without merging unknown entities
Distinguish shop-scoped IDs from organization-level legal-entity IDs, and do not merge nulls into a single company.
Shopify legalEntityId: testing cross-shop consolidation without merging unknown entities
Grouping shops by company does not make absent legal-entity IDs evidence of a shared company. Joining on a common empty identifier can invent relationships between unresolved shops. Establish a policy separating confirmed links from unresolved states before consolidating the mapping. [1, 2, 3]
What the primary source establishes
Shopify added a stable legalEntityId across shops and markets to BusinessEntity in API 2026-07. The announcement explicitly states that it returns null when there is no backing entity or stable external ID. [1]
The handover decision
Test a small mapping containing multiple shops for a known entity and shops whose entity is unresolved. Link only confirmed identifiers and keep unresolved cases separate. Retain shop_id, business_entity_id, legal_entity_id, and resolution_state rather than deriving company identity from a display name. [1, 3]
A reference defined before the output
In the illustrative mapping, shops A and B both have null legal_entity_id. That is not evidence of a shared company. Their normal state is unresolved; merged is the counterexample. A separate approved register may justify a later link, but the shared null value does not. [1, 3]
The scoped Truthound check
Truthound Core 3.3.2 can check resolution_state under an unresolved-entity condition with ConditionalExpressionValidator. It does not look up or adjudicate legal entities. If an approved external mapping supplies the link, preserve that evidence revision in the comparison table. [1, 2, 3]
Limits and alternative choices
Identifier equality does not itself establish legal ownership structures or accounting-consolidation scope. Maintain a separately approved legal-entity mapping with its supporting evidence. If an approved register already confirms a common entity, null API identifiers alone need not prohibit that supported link. [1, 3]
Application conditions
Prepare shop and entity identifiers with explicit resolution states, retaining the independent evidence for any external mapping.
Alternatives
Maintain a separately approved legal-entity mapping with its supporting evidence.
Limitations
Identifier equality does not itself establish legal ownership structures or accounting-consolidation scope.
Evidence
- Event checked
- Subject checked
- Modified
