Skip to main content

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.

LevelPurposeExample
Level 1Main business areas, for executive communicationCustomer Management
Level 2Capabilities within each area, the typical level for system mappingCustomer Onboarding, Customer Data Management, Customer Service
Level 3Detailed capabilities, for analysis where a decision needs itIdentity 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 AOrganization BOrganization CTarget (North Star)
Customer Data ManagementCRM A (Invest)CRM B (Migrate)Custom customer DB (Eliminate)CRM A as master for customer data
Order ManagementERP A (Migrate)Order service B (Invest)ERP C (Migrate)Order service B, extended to all brands
InvoicingBilling A (Tolerate)Billing B (Tolerate)–New SaaS billing platform (Planned)
Customer ServiceTicketing 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:

  1. Agree on the criteria first, before discussing any specific system. For example:

    CriterionQuestions
    Business fitDoes it support the capability's requirements, including those of all former organizations?
    Technical fitIs it maintainable, scalable and aligned with the technology radar?
    Strategic fitDoes it support where the business is going, not only where it is today?
    CostLicenses, operations, and the cost of migrating to it
    RiskMigration complexity, vendor dependency, skills available
    Data and contractsData quality, regulatory constraints, contract end dates
  2. Assess the candidates per capability against these criteria, with input from both sides and from business owners.

  3. 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.

  4. Record the decision as an Architecture Decision Record, including the options considered and the reasoning, so the decision is understandable later and by everyone.

  5. 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 setMaster capabilityDownstream consumersPolicy
CustomerCustomer Data ManagementOrder Management, Invoicing, Customer Service, AnalyticsConsumers never create or edit customers locally. Changes go to the master via its API; changes are published as events
ProductProduct ManagementOrder Management, web shop, AnalyticsRead-only downstream; product changes flow one way
OrderOrder ManagementInvoicing, Customer Service, Shipping, AnalyticsOrder events are the only source for downstream processes
InvoiceInvoicingCustomer Service, Accounting, AnalyticsAccounting 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 entityCRM ACRM BERP C
CustomerAccount (type = customer)ClientDEBTOR table
Customer IDAccount.IdClient.ClientNoDEBTOR.DEB_NR
Customer segmentAccount.Segment__cderived from Client.Categorynot available

This mapping is what makes migrations, integrations and combined reporting possible. It builds on the conceptual data model described in unlocking the data.

warning

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 typeMeaningConsolidation strategy
CoreWhat differentiates the business from competitorsInvest; build or deeply customize; keep the best team on it
SupportingSpecific to the business, but not differentiatingConsolidate to one good-enough solution
GenericThe 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:

RelationshipMeaningTypical use in consolidation
Customer–SupplierUpstream team considers the needs of downstream teamsMaster data capabilities serving consumers
Open Host Service / Published LanguageUpstream offers a well-defined, documented interface for all consumersTarget-state master systems publishing APIs and events
ConformistDownstream adopts the upstream model as it isConsuming a SaaS product or a dominant system
Anticorruption LayerDownstream translates the upstream model into its ownIntegrating legacy systems during transition, without spreading their models
Shared KernelTwo contexts share a small part of the modelUse rarely; shared identifiers for key entities
Separate WaysNo integration; each context solves its own needWhen 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.

PatternCharacteristicsPrefer whenExample
Synchronous APIRequest–response, strongly consistent, tight runtime couplingThe consumer needs the current state or an immediate answer; commands that must succeed or fail nowChecking credit limit during order entry; creating a customer in the master system
Event-drivenPublish–subscribe, eventually consistent, loose couplingSeveral consumers react to changes; the producer should not know its consumers; processes span capabilitiesCustomerUpdated, OrderPlaced, InvoiceIssued events
Data products / data lakeBulk, historical, analytical, cross-domainReporting, analytics, AI, and combining data from many capabilitiesCombined sales reporting across former organizations
Batch file transferScheduled bulk exchangeLegacy systems during transition, or external partnersNightly 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:

ElementContent
Capability mapHierarchy of capabilities (levels 1–3), with owners and subdomain type
System-to-capability mappingCurrent and target systems per capability, with status
Data flowsCurrent and target flows between systems and capabilities, with status (keep, change, retire)
Data flow policiesMaster capability and allowed directions per data set
Canonical data modelSemantic entities and their mapping to each system
Context mapBounded contexts and their relationships
Integration standardsPreferred patterns per type of relationship
Decisions and roadmapADRs 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​

  1. Build the capability map (levels 1 and 2) together with business representatives from all former organizations.
  2. Map all systems from all organizations to capabilities, with basic attributes from the systems inventory.
  3. Document the key data flows between systems, starting with master data: customer, product, contract.
  4. Classify capabilities into core, supporting and generic subdomains.
  5. Prioritize the capabilities where consolidation brings the most value or reduces the most risk.
  6. Decide the North Star per prioritized capability, through the structured decision process, and record ADRs.
  7. Define data flow policies, the canonical model and integration patterns for the target state.
  8. 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.