SfSkills Domains Docs GitHub

Home / architect / platform-selection-guidance

platform-selection-guidance

Use when choosing which Salesforce platform capability to use for a requirement — covering metadata storage (Custom Metadata vs Custom Settings vs Custom Objects), UI framework (LWC vs Aura), integration approach (Platform Events vs Change Data Capture vs Outbound Messaging), and data extension (OmniStudio vs standard automation).

Open the skill folder on GitHub


Use this skill when the question is which Salesforce platform feature or capability class should own a requirement — not which automation tool to use within the automation surface (see admin/process-automation-selection for Flow vs Apex vs Workflow decisions), and not how to implement the chosen feature. This skill covers the broader platform-level choice: how to store configuration data, which UI framework to use for new components, which integration pattern fits a given sync requirement, and whether OmniStudio is appropriate vs. standard Salesforce tooling.

The decisions here tend to have long life spans. Choosing Custom Settings instead of Custom Metadata Types means you will carry that deployment gap for years. Choosing Aura instead of LWC means you are working on a legacy framework. Getting these choices right at the outset dramatically reduces future rework.


Before Starting

Gather this context before working through decision guidance:


Questions to Ask Before Configuring

Ask these before naming a feature. Each traces to a gotcha in references/gotchas.md.

QuestionWhy it mattersWhat a good answer addsWhat a proper design adds over just doing it
"Must this configuration arrive in every org through the release pipeline, or do people edit it in production?"Custom settings data does not deploy; custom metadata records cannot be changed with DML (Gotchas 1 and 9)The change path for the values, not just the schemaConfiguration moves with the release, and runtime edits land in a store built for them
"Does any value differ by profile or user, or point at a specific record such as a queue?"Only hierarchy custom settings vary by user; custom metadata cannot look up records (Gotcha 5)The override levels and record references neededNo text-field IDs that break between orgs
"Is any value a secret?"Unprotected custom settings are readable by every profile, including guest (Gotcha 7)A list of values that belong in named credentialsSecrets never sit in readable configuration
"How do the components on the page talk to each other today?"LWC cannot handle Aura application events; Lightning Message Service is the replacement (Gotcha 2)The event chain to redesign before migratingMigrations do not silently break event wiring
"How many external subscribers, how many events a day, and how long can each be offline?"Retention is 24 or 72 hours for platform events and three days for CDC; delivery allocation is shared (Gotchas 3 and 10)Event volume per subscriber against the allocation and retentionThe pattern fits the limits, with a reconciliation path for long outages
"Is OmniStudio licensed here, and does the team know it?"OmniStudio needs a licence and its data model differs from SOQL (Gotcha 4)A yes/no on licence and skillsGuided processes use the tool the org can run and maintain

What a proper selection adds over "just using the familiar feature": the choice is checked against deployment, security, test, and limit behavior that is hard to reverse later.


Scope Boundary: Automation Tool Selection

This skill does not cover the choice between Flow, Apex, Process Builder, or Workflow Rules for automation requirements. That decision is fully covered by admin/process-automation-selection. If your question is "should this logic live in a Flow or an Apex trigger?" — stop here and use that skill instead.

This skill covers choices that sit above or alongside the automation layer: where to store configuration data the automation reads, which UI framework to use for the front-end surface, which integration pattern connects Salesforce to external systems, and whether OmniStudio is the right licensed add-on for a guided process.


Mode 1: Feature Selection for a New Requirement

Use this mode when a new requirement is being designed and the team has not yet committed to a platform feature.

Decision Area 1 — Metadata Storage: Custom Metadata vs Custom Settings vs Custom Objects

Use this framework when the requirement involves storing configuration data that automation, Apex, or flows will read at runtime.

CriterionCustom Metadata TypesCustom Settings (Hierarchy)Custom Objects
Deployable via Metadata API / change setsYes — records deploy as metadataNo — data values must be seeded separatelyNo — requires data deployment scripts
Queryable in SOQLYes, and custom metadata queries do not count against the SOQL query limitYes (via getInstance() API; data is cached)Yes
Available in formulas and validation rulesYesYes (hierarchy type only)No
User/profile-level overridesNo — org-level onlyYes — hierarchy types support org/profile/user overridesNo (requires relationship fields)
Volume ceiling~5,000 records per type practical limit (UNVERIFIED 2026-10-03)~5,000 records per list type (UNVERIFIED 2026-10-03)Up to object storage limits (millions of rows)
Relationships to other objectsNo lookup relationshipsNo lookup relationshipsFull lookup and master-detail support
Audit trailNo (UNVERIFIED 2026-10-03)NoYes (if History Tracking enabled)
Package-ableYes (type and records)Yes, the setting definition (Apex Developer Guide, "Custom Settings"); corrected 2026-10-03 from "No". Records are data and are seeded separately (UNVERIFIED 2026-10-03)Yes (object schema, not data)
Visible to Apex tests by defaultMetadata stays accessible in tests (UNVERIFIED for custom metadata specifically)No: needs SeeAllData=true or test setupNo: tests create their own data

Decision rule:

  1. If the configuration needs to deploy across orgs (sandboxes, production, packages) without manual data entry → Custom Metadata Types.
  2. If the configuration needs user-level, profile-level, or org-level overrides (e.g., a default currency setting that differs by user) → Custom Settings (Hierarchy type).
  3. If the configuration has volume above ~5,000 rows, needs relationships to other records, needs audit trail, or requires complex CRUD → Custom Object.
  4. If none of the above — default to Custom Metadata Types. They are the current strategic choice for configuration storage.

Do not use Custom Settings (List type). List custom settings are a legacy pattern with no hierarchy support and no deployment advantage. All new configuration storage should use Custom Metadata Types or Custom Objects.

Decision Area 2 — UI Framework: LWC vs Aura

CriterionLightning Web Components (LWC)Aura Components (Legacy)
Strategic directionCurrent standard — the Aura Components Developer Guide says to always choose LWC unless you need a feature it does not supportLegacy — no new Aura-only platform features as of Spring '25 (UNVERIFIED 2026-10-03)
PerformanceBetter — the Aura guide says LWC performs better and is easier to developLower — heavier framework overhead
Mobile supportFullLimited — mobile features added after ~2021 are LWC-only (UNVERIFIED 2026-10-03)
Experience Cloud supportFullPartial
Slack integrationSupportedNot supported (UNVERIFIED 2026-10-03)
Can contain the otherLWC cannot contain AuraAura can contain LWC children (LWC Developer Guide, "Lightning Web Components and Aura Components Working Together": "Aura components can contain Lightning web components. However, the opposite doesn't apply.")

Decision rule:

Decision Area 3 — Integration Pattern: Platform Events vs Change Data Capture vs Outbound Messaging

PatternWhen to UseWhen Not To Use
Platform EventsEvent-driven integration — publisher and subscriber are decoupled; high-volume event publishing; not tied to a specific record's field changesWhen the subscriber needs to know which specific fields changed — use CDC instead
Change Data Capture (CDC)External system must stay in sync with Salesforce record changes (inserts, updates, deletes, undeletes); CDC events include the changed field names automatically (changedFields in the change event header)When you are not reacting to Salesforce record changes but publishing application-level events — use Platform Events. Without an add-on, only five entities can be selected
Outbound MessagingLegacy SOAP-based pattern; the Metadata API describes outbound messages as workflow and approval actionsDo not use for new integrations. Workflow Rules are retired (UNVERIFIED 2026-10-03: retirement status is Help-only). Migrate to Platform Events.

Decision rule:

  1. Does the integration need to sync an external system with Salesforce record changes (field-level deltas)? → Change Data Capture.
  2. Does the integration need to publish application-level events that trigger external processing, independent of any specific record save? → Platform Events.
  3. Is there existing Outbound Messaging still in place? → Plan migration to Platform Events. Do not extend it.

Retention windows: High-volume Platform Events retain for 72 hours (replay window); legacy standard-volume events for 24 hours. CDC events are stored for up to three days. Correction (2026-10-03): earlier text said CDC retention extends to 7 days with Shield Event Monitoring; the Change Data Capture Developer Guide gives only the three-day window.

Decision Area 4 — OmniStudio vs Standard Automation

CriterionOmniStudio (OmniScript + DataRaptors + Integration Procedures)Standard Flow + LWC
License requiredYes — OmniStudio license (included in Salesforce Industries clouds)No additional license
Guided multi-step wizard UIExcellent — OmniScript is purpose-built for thisAchievable with Screen Flow or custom LWC, but requires more build effort
Complex data transformations across multiple objectsDataRaptors handle multi-source read/transform/writeRequires Apex or multi-step Flow
Declarative integration orchestrationIntegration Procedures — declarative HTTP callout orchestrationRequires Apex for same complexity
Team profileTypically used by Salesforce Industries/Vlocity-trained consultantsStandard Salesforce admin and developer teams
Strategic positioningStrategic for Industries cloudsStrategic for all non-Industries use cases

Decision rule:

  1. Is an OmniStudio license included (Salesforce Industries cloud, Health Cloud, Financial Services Cloud, etc.)? And is the use case a guided multi-step wizard or complex multi-source data operation? → OmniStudio.
  2. No OmniStudio license, or the use case is automation-only without a guided UI? → Standard Flow + LWC (+ Apex where needed).
  3. OmniStudio license is present but the use case is a simple single-page form or record update? → Standard Flow — do not add OmniStudio overhead to simple use cases.

Mode 2: Review an Existing Implementation for Better Platform Fit

Use this mode when reviewing a design document, inherited org, or completed build to identify mismatched platform choices.

Work through the Review Checklist below against the inherited design, then use Mode 3 for any item that needs a migration.


  1. Ask the six questions in "Questions to Ask Before Configuring" and write down the answers; they decide most of the tables in Mode 1.
  2. Confirm the routing tree first: for automation-tool questions go to admin/process-automation-selection, and for integration patterns read standards/decision-trees/integration-pattern-selection.md before using Decision Area 3.
  3. Score the top two or three candidates in the relevant Mode 1 table and check each against the limits in references/gotchas.md (deployment, secrets, test visibility, event retention and allocation).
  4. Record the choice as a decision record using references/examples.md Example 4 as the shape: requirement, candidates, decision, rejected options with the platform fact that ruled them out, and the deployable components.
  5. Run python3 skills/architect/platform-selection-guidance/scripts/check_platform_selection_guidance.py --project-dir <retrieved-project> to flag Aura components without LWC equivalents, outbound messages, custom metadata fields storing raw record IDs, active workflow rules, and custom settings used in Apex.
  6. Hand implementation to the skill listed under Related Skills for the chosen feature.

Review Checklist


Mode 3: Evaluate an Upgrade Path

Use this mode when the team has identified a legacy feature and needs a migration path assessment.

Aura to LWC Migration

Steps:

  1. Audit the Aura component's event model. If it uses Aura application events with no LWC equivalent, identify what triggers those events and whether the pattern can be redesigned.
  2. Build the LWC equivalent as a new component. Do not try to convert Aura markup to LWC line-by-line.
  3. Insert the LWC into the Aura container. Aura containers can hold LWC children — this is the safe incremental pattern.
  4. Retire the Aura component shell when all dependent pages have migrated.

Risk: Aura application events broadcast to all registered handlers. LWC uses a DOM event model. Designs that rely on cross-component Aura application events require redesign — not just rewrite.

Custom Settings to Custom Metadata Types Migration

Steps:

  1. Document all existing Custom Setting fields and their values across all org levels (org, profile, user).
  2. Create the equivalent Custom Metadata Type with matching fields.
  3. Create CMT records in the target org (or via Metadata API) for each configuration value.
  4. Update Apex, Flow, and formula references to point to the new CMT type.
  5. Keep the old Custom Setting active during parallel run. Remove only after full validation.

Risk: Profile-level and user-level Custom Setting overrides have no direct equivalent in Custom Metadata Types. If these hierarchy levels are in active use, evaluate whether Custom Settings should remain for that specific use case. Do not migrate blindly.

Outbound Messaging to Platform Events Migration

Steps:

  1. Map each Outbound Message to its triggering Workflow Rule and the fields it sends.
  2. Design a Platform Event with equivalent fields.
  3. Build an after-save Record-Triggered Flow (or Apex trigger) to publish the event on the same conditions as the old Workflow Rule.
  4. Migrate the external subscriber from the SOAP endpoint to the Platform Events Pub/Sub API or CometD.
  5. Deactivate the Workflow Rule and remove the Outbound Message.

Risk: Outbound Messaging retries on failure for up to 24 hours (extendable to seven days through Support), per Integration Patterns and Practices. Platform Events have a 72-hour replay window (high-volume) but are published once with no Salesforce-side retry to external endpoints. If the external subscriber goes offline, you must implement replay logic.


Design Tradeoffs Reference

DimensionCustom Metadata TypesCustom SettingsCustom Objects
Deployment simplicityHighLowMedium (schema deploys; data doesn't)
Hierarchy / per-user configNoYesNo (requires code)
Large volume (1M+ rows)NoNoYes
Formula accessYesYes (hierarchy type)No
DimensionLWCAura
Strategic investmentActiveMaintenance only
PerformanceHigherLower
Mobile / SlackFullPartial / None
DimensionPlatform EventsCDCOutbound Messaging
TriggerApplication-level publishRecord save (any change)Workflow Rule (retired)
Field delta includedNoYesPartial (configured fields)
Retention72 hours (high-volume); 24 hours (legacy standard-volume)Up to three days (corrected 2026-10-03 from "72h (7d with Shield)")Retries up to 24 hours

Package files