Organizing Legacy Spaghetti
"Legacy spaghetti" is an IT landscape that has grown without a plan: many systems doing roughly the same things, connected by point-to-point integrations that nobody fully understands. A typical cause is a merger or acquisition. Two or more previously separate organizations come together, each with its own CRM, ERP, billing, data warehouse, integration platform and technology stack. On paper it is one company. In IT it is still several.
Symptoms of such a landscape:
- several systems for the same purpose (three CRMs, two billing systems, four ways to onboard a customer)
- the same data entered and stored multiple times, with no clear source of truth
- point-to-point integrations, nightly file transfers and manual reconciliation between the former organizations
- every initiative starting with the question "which of our systems does this affect?" and nobody being able to answer quickly
- decisions about which system "wins" made politically, or postponed indefinitely
Organizing this landscape requires a shared, neutral picture of what the business does, a structured and transparent way to decide the target state, and clear rules for how data and integrations should flow in that target state.
Business capability modeling
A business capability is something the business does or must be able to do, described independently of how it is done, who does it, or which system supports it. Examples: Customer Onboarding, Pricing, Invoicing, Claims Handling.
Capabilities are the most stable view of an organization. Processes, teams and systems change often. What the business must be able to do changes rarely. This stability, and the fact that capabilities belong to neither of the merging organizations, makes them the ideal neutral ground for consolidation.
Capability hierarchy
Capabilities form a hierarchy. The top level shows the whole business on one page. Lower levels add detail where it is needed.
| Level | Purpose | Example |
|---|---|---|
| Level 1 | Main business areas, for executive communication | Customer Management |
| Level 2 | Capabilities within each area, the typical level for system mapping | Customer Onboarding, Customer Data Management, Customer Service |
| Level 3 | Detailed capabilities, for analysis where a decision needs it | Identity Verification, Credit Check, Contract Signing |
Multiple levels make it possible to drill down into the details when needed, without overwhelming everyone with them. Most discussions happen at level 1 and 2. Level 3 is detailed only for the capabilities being consolidated or changed.
Example capability map
Why the capability map is so useful
- One picture for everyone. The capability map gives the whole organization the same view of the architecture, in a visually logical way. Business and IT, and people from both former companies, point at the same boxes and mean the same thing.
- A standard across initiatives. Every initiative, project or roadmap item can be placed on the same map. Coloring the map shows which parts of the business are impacted by a given initiative, and where several initiatives touch the same capability at the same time.
- Redundancy becomes visible. When systems are mapped to capabilities, the places where several systems support the same capability stand out immediately.
- Investment decisions. Heat maps showing business importance, current system quality, or cost per capability guide where to invest and where to simplify.
Mapping systems to capabilities
The next step is to map every system from every organization to the capabilities it supports, and to give each mapping a status. This is where the systems inventory and the capability map come together.
| Capability (L2) | Organization A | Organization B | Organization C | Target (North Star) |
|---|---|---|---|---|
| Customer Data Management | CRM A (Invest) | CRM B (Migrate) | Custom customer DB (Eliminate) | CRM A as master for customer data |
| Order Management | ERP A (Migrate) | Order service B (Invest) | ERP C (Migrate) | Order service B, extended to all brands |
| Invoicing | Billing A (Tolerate) | Billing B (Tolerate) | – | New SaaS billing platform (Planned) |
| Customer Service | Ticketing A (Invest) | Ticketing A (Invest) | Email inbox (Eliminate) | Ticketing A for all |
Statuses follow the lifecycle and TIME model (Tolerate, Invest, Migrate, Eliminate) described in the systems inventory.
Deciding the North Star
For each capability, the organization needs a North Star design: the target architecture it is moving toward. In a post-merger landscape, these decisions are sensitive. Every team is attached to its own systems, and decisions that look political lose trust quickly.
A transparent, constructive and structured process keeps the discussion factual:
-
Agree on the criteria first, before discussing any specific system. For example:
Criterion Questions Business fit Does it support the capability's requirements, including those of all former organizations? Technical fit Is it maintainable, scalable and aligned with the technology radar? Strategic fit Does it support where the business is going, not only where it is today? Cost Licenses, operations, and the cost of migrating to it Risk Migration complexity, vendor dependency, skills available Data and contracts Data quality, regulatory constraints, contract end dates -
Assess the candidates per capability against these criteria, with input from both sides and from business owners.
-
Consider all options, not only "pick one": adopt one of the existing systems, combine (one system per sub-capability), replace both with something new, or keep both temporarily with a clear end date.
-
Record the decision as an Architecture Decision Record, including the options considered and the reasoning, so the decision is understandable later and by everyone.
-
Define the transition, not only the end state: the steps and intermediate states between today and the North Star, ordered by business priority and dependencies.
The North Star is documented on two levels:
- System level: which system supports each capability in the target state, and the status of every current system (stays, migrates, retires).
- Data flow level: which data flows exist today, which are part of the target state, and which will be retired.
Data flow policies
Choosing the target systems is not enough. In a post-merger landscape, data flows in every direction: customer data is copied between three CRMs, orders are re-entered in two ERPs, and reports combine everything by hand. The North Star also needs data flow policies: explicit rules about the relationships between capabilities and the desired upstream–downstream direction for each data set.
Typical data flow policies:
| Data set | Master capability | Downstream consumers | Policy |
|---|---|---|---|
| Customer | Customer Data Management | Order Management, Invoicing, Customer Service, Analytics | Consumers never create or edit customers locally. Changes go to the master via its API; changes are published as events |
| Product | Product Management | Order Management, web shop, Analytics | Read-only downstream; product changes flow one way |
| Order | Order Management | Invoicing, Customer Service, Shipping, Analytics | Order events are the only source for downstream processes |
| Invoice | Invoicing | Customer Service, Accounting, Analytics | Accounting receives invoices, never recalculates them |
Policies like these turn the spaghetti into a directed flow: every data set has one source, data moves downstream, and changes go back to the master instead of being made in copies. Each flow in the current landscape can then be judged against the policy: does it follow the target direction, or is it a flow to remove?
Canonical enterprise data model
To consolidate systems and data flows, the organizations need a shared language for their data. A canonical enterprise data model describes the business entities semantically, what a Customer, Contract or Order means for the combined organization, and maps them to the logical and physical implementations in each individual system.
| Canonical entity | CRM A | CRM B | ERP C |
|---|---|---|---|
| Customer | Account (type = customer) | Client | DEBTOR table |
| Customer ID | Account.Id | Client.ClientNo | DEBTOR.DEB_NR |
| Customer segment | Account.Segment__c | derived from Client.Category | not available |
This mapping is what makes migrations, integrations and combined reporting possible. It builds on the conceptual data model described in unlocking the data.
A canonical model works well at the semantic level: shared definitions, identifiers and mappings. Forcing every system to use one identical, enterprise-wide schema for every entity rarely works. Different parts of the business legitimately need different representations of the same concept. This is exactly what strategic Domain-Driven Design helps to handle.
Strategic Domain-Driven Design
Strategic Domain-Driven Design (DDD) provides concepts for defining the boundaries and relationships between parts of a landscape. They complement the capability map well. See the DDD Reference by Eric Evans.
Subdomains: where to invest
DDD classifies parts of the business into subdomains, which helps decide where to build and where to buy:
| Subdomain type | Meaning | Consolidation strategy |
|---|---|---|
| Core | What differentiates the business from competitors | Invest; build or deeply customize; keep the best team on it |
| Supporting | Specific to the business, but not differentiating | Consolidate to one good-enough solution |
| Generic | The same in every company (HR, accounting, email) | Standardize on a commercial or SaaS product |
Classifying capabilities this way avoids a common post-merger mistake: spending years on a custom consolidation of a generic capability that a standard product would handle. Core domain charts are a useful workshop tool for this.
Bounded contexts and context mapping
A bounded context is a boundary within which a model and its language are consistent. Customer in Sales (a prospect with a pipeline) and Customer in Invoicing (a legal entity with payment terms) are different models, and that is fine as long as the boundaries and translations are explicit.
Context mapping describes the relationships between bounded contexts. These relationships are exactly the upstream–downstream relationships of the data flow policies:
| Relationship | Meaning | Typical use in consolidation |
|---|---|---|
| Customer–Supplier | Upstream team considers the needs of downstream teams | Master data capabilities serving consumers |
| Open Host Service / Published Language | Upstream offers a well-defined, documented interface for all consumers | Target-state master systems publishing APIs and events |
| Conformist | Downstream adopts the upstream model as it is | Consuming a SaaS product or a dominant system |
| Anticorruption Layer | Downstream translates the upstream model into its own | Integrating legacy systems during transition, without spreading their models |
| Shared Kernel | Two contexts share a small part of the model | Use rarely; shared identifiers for key entities |
| Separate Ways | No integration; each context solves its own need | When integration costs more than the duplication |
The DDD Crew context mapping repository has a good overview and templates.
Integration patterns
The North Star must also define how capabilities and systems integrate. Different relationships need different patterns, and choosing them deliberately is one of the most important architectural decisions in a consolidation.
| Pattern | Characteristics | Prefer when | Example |
|---|---|---|---|
| Synchronous API | Request–response, strongly consistent, tight runtime coupling | The consumer needs the current state or an immediate answer; commands that must succeed or fail now | Checking credit limit during order entry; creating a customer in the master system |
| Event-driven | Publish–subscribe, eventually consistent, loose coupling | Several consumers react to changes; the producer should not know its consumers; processes span capabilities | CustomerUpdated, OrderPlaced, InvoiceIssued events |
| Data products / data lake | Bulk, historical, analytical, cross-domain | Reporting, analytics, AI, and combining data from many capabilities | Combined sales reporting across former organizations |
| Batch file transfer | Scheduled bulk exchange | Legacy systems during transition, or external partners | Nightly export from a system scheduled for retirement |
Useful default policies:
- Commands go to the master synchronously; changes come back as events. A consumer that needs to change a customer calls the master's API. Everyone who needs to know about the change subscribes to its events.
- No direct database access between capabilities. Integration only through published APIs, events or data products.
- Analytics through data products, not through operational APIs. Reporting should not load operational systems.
- Batch only as a transitional pattern, with an end date.
See Enterprise Integration Patterns for a detailed catalog, and Martin Fowler's What do you mean by "Event-Driven"? for the different meanings of event-driven architecture.
Documenting it in the architecture repository
All of this belongs in the architecture repository, so that it is shared, kept current, and usable by people and by AI agents:
| Element | Content |
|---|---|
| Capability map | Hierarchy of capabilities (levels 1–3), with owners and subdomain type |
| System-to-capability mapping | Current and target systems per capability, with status |
| Data flows | Current and target flows between systems and capabilities, with status (keep, change, retire) |
| Data flow policies | Master capability and allowed directions per data set |
| Canonical data model | Semantic entities and their mapping to each system |
| Context map | Bounded contexts and their relationships |
| Integration standards | Preferred patterns per type of relationship |
| Decisions and roadmap | ADRs per capability; transition states toward the North Star |
Business capabilities, value streams and plateaus (transition states) are first-class concepts in ArchiMate and TOGAF, so the repository can follow these standards, or a simpler subset of them as described in the metamodel.
Roadmap
- Build the capability map (levels 1 and 2) together with business representatives from all former organizations.
- Map all systems from all organizations to capabilities, with basic attributes from the systems inventory.
- Document the key data flows between systems, starting with master data: customer, product, contract.
- Classify capabilities into core, supporting and generic subdomains.
- Prioritize the capabilities where consolidation brings the most value or reduces the most risk.
- Decide the North Star per prioritized capability, through the structured decision process, and record ADRs.
- Define data flow policies, the canonical model and integration patterns for the target state.
- Execute in transitions, one capability at a time, updating the system and data flow statuses as each step is completed.
Common pitfalls
- Mapping without deciding. A beautiful capability map with every system mapped, but no North Star decisions. The map is the means, not the goal.
- Winner takes all. Choosing all systems from the acquiring organization by default. It is fast, but loses better solutions and the trust of the acquired teams.
- Big bang migration. Trying to consolidate everything at once. Transition states and incremental migration reduce risk.
- Ignoring data flows. Consolidating systems while leaving the data spaghetti in place. The new target system ends up surrounded by the same point-to-point copies.
- One model to rule them all. Forcing a single detailed enterprise schema everywhere instead of shared semantics with explicit bounded contexts.