Skip to content

Salesforce architecture at PWG

PWG runs Financial Services Cloud on top of a CRM core extended with 272 custom objects. The data model is FSC-idiomatic: households sit above accounts, accounts hold financial accounts and goals, and advice is tracked against opportunities.

  • Individual accounts represent a natural person, linked 1:1 to a primary Contact.
  • Entity accounts represent a legal entity (SMSF, trust, company).
  • Household is an FSC Group record type. Members attach via AccountContactRelation with a role.
  • Primary group membership is maintained by the ACR - Populate Primary Group on Individual and Entity Accounts Flow — see docs/generated/flows/.

Stages currently configured: Lead → Qualified → Proposing → Implementation → Won / Lost. Stage history tracking on StageName was enabled on 2026-04-24 — dwell-time metrics per stage accrue from that date forward.

The full state machine — including automated transitions from Flows and Apex triggers — is in docs/generated/state-machines/Opportunity-StageName.md.

  • 113 Apex triggers across 14 multi-trigger SObjects.
  • 271 active Flows, 1,611 versions in the flow table.
  • 80 Flows carry ≥ 5 versions — a version-churn signal.

The PWG*Trigger naming convention indicates internal code (e.g. PWGOpportunityTrigger, PWGTaskTrigger). The dlrs_*Trigger pattern indicates triggers owned by the Declarative Lookup Rollup Summaries managed package. Multi-trigger SObjects are a handler-pattern violation flagged in docs/human/known-issues.md.

Per-object automation maps live in docs/generated/process-maps/; they show which Flows, triggers, and workflow rules fire against each SObject.

  • Financial Services Cloud (FSC) — core.
  • DLRS (Declarative Lookup Rollup Summaries) — cross-object rollup automation without writing Apex. Identified by the dlrs_ namespace in triggers and classes.
  • Additional managed packages are inventoried in docs/generated/automation/apex-classes.md (look for non-PWG namespaces).

The MCP server (mcp-server/) holds a Permission Set Claude MCP Read-Only — grants View All Data without DML. The MCP code itself rejects non-GET REST and refuses DML SOQL keywords as a second layer of enforcement.

  • docs/generated/objects/INDEX.md — every SObject’s fields, record types, child relationships, and validation rules.
  • docs/generated/apex-graph/INDEX.md — trigger call graphs and complexity rankings.
  • docs/generated/process-maps/ — per-object automation maps.