companies
Identity, qualification and original lead source.
unique key · domainportfolio / 01 · crm architecture
I designed a schema-as-code CRM architecture for Relevance, connecting account context, buying roles, deal progress and conversations in one operating model. The aim was to make the CRM useful to people and automations without giving the same field competing owners.
Relationships describe how records connect, not how data moves.
Identity, qualification and original lead source.
unique key · domainBuying role, engagement and person-level contact preferences.
unique key · work emailCommercial state, ownership and the next action.
one open deal per companyThreads linked back to the people, companies and deals they concern.
unique key · conversation IDThe deal is the commercial record. Company and person records keep identity and relationship context; conversation records preserve the interaction trail.
Every attribute has a named owner: Attio, enrichment, automation or a person. That gives each workflow a clear write boundary.
Lead source records how an account or person entered the system. Later activity does not overwrite the original source.
Company and person contact restrictions are separate. One person's opt-out does not suppress their colleagues.
Pipeline stage, attribution and next action live with the opportunity, rather than being inferred from a contact record.
One ordered path from interest to a clear outcome.
The schema is maintained as a versioned YAML contract. A reconciler compares the declared design with the Attio workspace and prepares ordered API changes. That keeps the documented model and configured CRM aligned.
Who a company is. Which people influence a deal. Where the opportunity stands. Which interactions belong to it. And which system or operator owns each field.
Built for Relevance's internal GTM operations. This is a sanitized architecture overview, not a client deployment or a copy of the production workspace.