#440 — Facade enforce one sales rep per merchant

Repo: Twill-AI/facade State: closed | Status: done Assignee: sparsh-twillpayments

Created: 2025-07-29 · Updated: 2025-08-21

Description

Right now the link between a merchant and a user is persisted as a comma separated list of partner_assigned_merchant_ids in the profile table. This means that enforcing a one sales rep per merchant is not easy. We need to update our DB structure to enforce this constraint.

AC:

  • Options to implement “only one sales rep is assigned to merchant” are investigated, listed with pros/cons, discussed with the team. Document can be found here
  • If Facade’s API updates are required then relevant front-end task is filed.
  • Facade enforces “only one sales rep is assigned to merchant”.
  • Logic above is covered by unit tests.

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets