Home / omnistudio / flexcard-container-composition
flexcard-container-composition
Design FlexCard composition: parent/child state flow, layout modes, actions, event wiring, and data source selection. Trigger keywords: flexcard, flex card composition, parent child flexcard, flexcard state, flexcard. NOT for the first-time FlexCard Hello-World, LWC alternatives, or Experience Cloud theming — use admin/flexcard-requirements.
Open the skill folder on GitHub
FlexCard Container Composition
Use this skill when deciding how a FlexCard surface should be split — one card or several, parent/child or siblings, which data source per card, how the pieces talk — and when a correctly-configured child card is inexplicably not calling its data source. Composition choices on this platform are performance choices and, more often than teams expect, security choices.
Data Source Selection
The Data Source wizard offers exactly ten types. Naming yours exactly is what lets a reviewer check the decision.
| Type | Verbatim description | Use |
|---|---|---|
| Integration Procedures | "uses an Integration Procedure to return data from multiple internal and external sources" | default — one place to cache, centralise errors, and enforce access |
| Omnistudio Data Mapper | "uses a Data Mapper Extract interface to return data from a Salesforce object" | single-object read, no aggregation |
| Apex Remote | "uses an Apex Remote class and method to return data" | logic that needs code |
| Apex REST | "uses a REST endpoint of an Apex class to return data" | an existing Apex REST service |
| SOQL Query | "uses the Salesforce Object Query Language (SOQL) to search an org's Salesforce data" | prototyping only |
| SOSL Search | "uses the Salesforce Object Search Language (SOSL) to construct text-based search queries" | cross-object text search |
| Streaming API | "uses the Salesforce Streaming API to send notifications of general events" | server-pushed events |
| SDK | "uses a method from a Software Development Kit (SDK) to get data to populate fields" | SDK-backed integration |
| Custom | "uses sample JSON to set up a Flexcard with temporary data that'll eventually be replaced" | design-time scaffolding |
| None | for child FlexCards fed by their parent | any Data-Node-fed child |
SOQL Query and Custom are prototyping data sources. Neither has anywhere to put field-level security, a Cache Block, requiredPermission, or an error branch. Ship on Integration Procedures or Data Mapper with fieldLevelSecurityEnabled true — and project down to the fields the card actually renders, because the payload lands in the browser whether or not the template shows it.
Parent To Child: Two Mechanisms, And They Do Not Compose
The parent's Flexcard element has three properties that matter:
| Property | Purpose |
|---|---|
| Flexcard Name | which child card to embed |
| Data Node | pass "a record or an array of records to the child" — {record} for the current record, {records} to send all data |
| Attributes | pass specific values — attribute name and value, e.g. Id → {Id} |
Attributes arrive in the child's Input Map; the child references them as {Parent.Id}.
The override rule, verbatim, and it is the single most useful fact in this skill:
Selecting a parent Data Node silently overrides a child's own data source, configured or not — the single most common cause of "my child card isn't fetching". Quoted in