Skip to content

Generate MerchantAggregate IDs through IdGenerationService #2000

Description

@StuartFerguson

Problem

MerchantDomainService.CreateMerchant uses a caller-provided MerchantId or Guid.NewGuid(). This makes new IDs random and bypasses IdGenerationService.

Suggested ID inputs

Use EstateId plus a stable upstream merchant identifier or merchant number. Keep a caller-provided ID as the stable key where it is part of the integration contract. Merchant name is not a safe key because it is neither guaranteed unique nor immutable.

Acceptance criteria

  • Add a deterministic merchant ID generator to IdGenerationService based on the agreed stable identifier and estate scope.
  • Use it consistently for creation and subsequent lookups.
  • Define compatibility for existing streams and client-supplied merchant IDs.
  • Cover retries, same external key in different estates, and duplicate keys within an estate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions