PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Meta

Merge customer identities safely

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's understanding of system design, data modeling, transactional consistency, concurrency control, idempotency, and index/cache maintenance when merging customer identities in a payments platform.

  • hard
  • Meta
  • System Design
  • Software Engineer

Merge customer identities safely

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Take-home Project

Implement mergeCustomers(oldId, newId) to merge two customer identities while preserving each account’s balances, transaction history, and transfer records (including pending/held). Specify how you remap ownership, handle customerId collisions, update indexes and caches (including the top-N payers structure), and ensure atomicity and consistency across the system.

Quick Answer: This question evaluates a candidate's understanding of system design, data modeling, transactional consistency, concurrency control, idempotency, and index/cache maintenance when merging customer identities in a payments platform.

Related Interview Questions

  • Design an Online Game Leaderboard - Meta (hard)
  • Design an Instagram-like Media Feed - Meta (medium)
  • Design an Online Judge and Live Comments - Meta (medium)
  • Design an Instagram-like platform - Meta (medium)
  • Design a Coding Contest Platform - Meta (medium)
Meta logo
Meta
Aug 9, 2025, 12:00 AM
Software Engineer
Take-home Project
System Design
2
0

System Design Task: mergeCustomers(oldId, newId)

Context

Your payments platform allows a single real person to accumulate multiple customer identities (duplicates). Each customer may own multiple accounts. Accounts have balances, immutable transaction history, and transfers (including pending/held states).

Task

Design and implement mergeCustomers(oldId, newId) to merge the identity represented by oldId into the identity represented by newId.

Requirements

  • Preserve all accounts as-is (no balance moves, no ledger rewrites), including:
    • Account balances
    • Full transaction history
    • Transfer records (completed, pending, held/authorized)
  • Remap ownership from oldId to newId across the system.
  • Handle customerId collisions (e.g., uniqueness constraints, duplicated identifiers, preferences).
  • Update indexes and caches, including a top-N payers leaderboard/structure.
  • Ensure atomicity, consistency, and idempotency; handle concurrent merges safely.
  • Describe locking and failure handling.

Deliverables

  • Clear invariants and data model assumptions (minimal and reasonable).
  • Step-by-step algorithm for mergeCustomers(oldId, newId), including:
    1. Ownership remapping strategy
    2. Collision resolution rules
    3. Index and cache updates (incl. top-N payers)
    4. Atomicity/consistency guarantees and locking
  • Pseudocode-level detail sufficient for implementation.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Meta•More Software Engineer•Meta Software Engineer•Meta System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.