FlexCard Requirements
This skill activates when a business analyst or product owner needs to gather and document FlexCard requirements before a developer begins building in Card Designer. It produces structured requirements artifacts — data source inventory, action registers, and state template specs — that translate stakeholder intent into buildable FlexCard specifications.
Before Starting
Gather this context before working on anything in this domain:
- Confirm the org has an OmniStudio license. FlexCards are part of OmniStudio and require the same Industries cloud licenses as OmniScript (Health Cloud, FSC, Manufacturing Cloud, etc.).
- Determine whether the FlexCard embeds in a Lightning record page, Service Console, or Experience Cloud — this context drives data source access patterns and Guest User permission requirements.
- The most common wrong assumption: practitioners confuse requirements gathering (what the card needs to show and do) with implementation (how to build it in Card Designer). This skill scopes to pre-build analysis only.
- FlexCards support five data source types (SOQL, Apex, DataRaptor, Integration Procedure, Streaming) and five action types (Navigation, OmniScript Launch, Apex, DataRaptor, Custom LWC) — requirements must specify which type is appropriate for each need.
- Card state templates are compiled to LWC at activation time (not at save time) — requirements that specify embedded LWC components must confirm the LWC is deployed before card activation.
Core Concepts
Five Data Source Types
Every FlexCard pulls data from exactly one of these sources:
| Source |
When to use |
| SOQL |
Direct query against Salesforce objects; fastest for simple record display |
| Apex |
Apex class method for computed or aggregated data |
| DataRaptor |
Declarative field mapping for single-object reads |
| Integration Procedure |
Orchestrated multi-source or external API data |
| Streaming |
Platform Event subscription for real-time updates |
Requirements must specify which type per card (and per child card if nested). SOQL is sufficient for single-object record display; Integration Procedure is required for multi-object or external API data.
Five Action Types
Users interact with FlexCards through one of these action types:
| Action type |
Behavior |
| Navigation |
Routes the user to a record page, URL, or tab |
| OmniScript Launch |
Opens an OmniScript in a modal or inline |
| Apex |
Calls an Apex method (typically for record updates or processing) |
| DataRaptor |
Runs a DataRaptor directly (typically for simple field updates) |
| Custom LWC |
Launches a custom Lightning Web Component for complex UI interactions |
Requirements must list every action, its type, its triggering condition, and the expected outcome.
Card State Templates
FlexCards support multiple card states — different layouts rendered based on record data:
- A FlexCard can have multiple card state templates, each with a condition expression
- The first matching state template is rendered; states are evaluated in order
- State templates are compiled to LWC at activation time — changes require reactivation
- Requirements must specify: how many states are needed, the condition expression per state, and what elements each state should display differently
Embedded Components
FlexCards can embed child components:
- Child FlexCards — nested card components with their own data source
- OmniScript — inline or modal OmniScript launch
- Custom LWC — custom Lightning components
Requirements must identify any embedded components, their data dependencies, and whether they need to be built before the parent FlexCard can be activated.
Common Patterns
Pattern: Data Source Mapping Matrix
When to use: When the FlexCard displays data from more than one object, or when stakeholders have not identified whether SOQL, IP, or DataRaptor is appropriate.
How it works:
- For each data field the FlexCard must display: list the source object, whether it is a direct field or computed/aggregated, and any external API dependencies
- Map each field to a data source type: SOQL for direct Salesforce object fields, DataRaptor for simple remapped reads, Integration Procedure for multi-source or external data
- Document the SOQL query or IP name, and which FlexCard element binds to which field path
Why not the alternative: Leaving data source type unspecified forces the developer to make architectural decisions mid-build. Using SOQL when an Integration Procedure is required causes silent data load failures or missing data on the card.
Pattern: Action Requirements Register
When to use: When users need to take actions from the FlexCard (not just view data).
How it works:
- List every action the user can take: what the user clicks/triggers, what type of action it maps to, and what happens
- For OmniScript Launch actions: identify which OmniScript, whether it opens inline or in a modal, and what data the OmniScript needs from the FlexCard context
- For Navigation actions: specify the destination (record page, URL, tab)
- For Apex or DataRaptor actions: specify the class/DR name and the data passed from the card
Decision Guidance
| Situation |
Recommended Approach |
Reason |
| Card displays fields from a single Salesforce object |
SOQL data source |
Simplest, fastest; no additional configuration needed |
| Card displays data from multiple objects or computed fields |
Integration Procedure |
Multi-source orchestration; SOQL joins are limited in FlexCard |
| Card updates a record when a user clicks a button |
Apex action or DataRaptor action |
Server-side execution; Apex for complex logic, DataRaptor for simple field updates |
| Card needs to launch a guided process |
OmniScript Launch action |
Inline or modal OmniScript; specify context data passed to OmniScript |
| Card shows different layouts for different record statuses |
Card state templates |
Document number of states and condition expressions per state |
| Card embeds in Experience Cloud for community users |
Note guest user FLS requirements |
Community guest users have restricted object access; flag required permissions |
Recommended Workflow
Step-by-step instructions for an AI agent or practitioner working on this task:
- Confirm OmniStudio license availability and the FlexCard's deployment context (Lightning record page, Service Console, Experience Cloud) — document in requirements header.
- Identify and map all data fields the FlexCard must display — source object, field path, and whether a SOQL, DataRaptor, or Integration Procedure data source is appropriate.
- Document all user actions required — for each action: action type (Navigation, OmniScript Launch, Apex, DataRaptor, Custom LWC), triggering element or button, and expected outcome.
- Identify card state template requirements — how many states are needed, what conditions trigger each state, and what the layout differences are between states.
- Identify embedded component requirements — child FlexCards, inline OmniScripts, or custom LWC components; confirm each embedded component is already built or add to build dependency list.
- Review with the developer to confirm all data source types and action types are correct and buildable within FlexCard's five supported types before development starts.
- Document any Experience Cloud or guest user permission requirements that must be resolved before card activation.
Review Checklist
Run through these before marking work in this area complete:
Salesforce-Specific Gotchas
Non-obvious platform behaviors that cause real production problems:
- State templates compile to LWC at activation — not at save — FlexCard state templates are compiled to LWC only when the card is activated, not when it is saved in Card Designer. This means that a developer editing a card must reactivate it for changes to take effect. Requirements that specify a state template change mid-project must note that reactivation (and a brief outage for users currently viewing the card) is required.
- Child FlexCards must be activated before the parent can be activated — If requirements specify a nested FlexCard architecture, the child card must be fully built and activated before the parent card can be activated. This is a build dependency that must appear explicitly in the requirements document's build order section.
- Integration Procedure data source requires the IP to be active — FlexCards bound to an Integration Procedure data source silently return empty data if the IP is not in Active status. Requirements must note which IP is the data source and confirm it will be active before card activation.
Output Artifacts
| Artifact |
Description |
| FlexCard requirements document |
Data source inventory, action register, state template spec, embedded component list |
| Data source mapping matrix |
Per-field table mapping display fields to data source types and element bindings |
| Action requirements register |
List of all user actions with type, triggering element, and expected outcome |
| Card state template spec |
Number of states, condition expression per state, layout differences |
Related Skills
omnistudio/flexcard-design-patterns — use after requirements are complete to implement in Card Designer
admin/omniscript-flow-design-requirements — companion BA requirements skill for OmniScripts that the FlexCard may launch
architect/omnistudio-vs-standard-decision — use to confirm FlexCard is the right tool over standard Lightning components
omnistudio/integration-procedures — use when requirements identify multi-source or external API data needs
1---2name: flexcard-requirements3description: Specify a FlexCard before a developer opens Card Designer: the card-state set and the condition that selects each state, the data source type behind each card (DataRaptor, Integration Procedure, Apex remote, SOQL), the action menu users get (navigate, launch OmniScript, Apex, DataRaptor), and every embedded child FlexCard or custom LWC. Produces the artifacts a BA hands to the builder. Trigger keywords: FlexCard requirements, FlexCard BA, FlexCard layout design, FlexCard data sources, FlexCard actions, FlexCard card states, OmniStudio FlexCard scoping. NOT for building the card in Card Designer, NOT for OmniScript step and branching requirements (use admin/omniscript-flow-design-requirements), NOT for standard Lightning record-page component requirements.4---56# FlexCard Requirements78This skill activates when a business analyst or product owner needs to gather and document FlexCard requirements before a developer begins building in Card Designer. It produces structured requirements artifacts — data source inventory, action registers, and state template specs — that translate stakeholder intent into buildable FlexCard specifications.910---1112## Before Starting1314Gather this context before working on anything in this domain:1516- Confirm the org has an OmniStudio license. FlexCards are part of OmniStudio and require the same Industries cloud licenses as OmniScript (Health Cloud, FSC, Manufacturing Cloud, etc.).17- Determine whether the FlexCard embeds in a Lightning record page, Service Console, or Experience Cloud — this context drives data source access patterns and Guest User permission requirements.18- The most common wrong assumption: practitioners confuse requirements gathering (what the card needs to show and do) with implementation (how to build it in Card Designer). This skill scopes to pre-build analysis only.19- FlexCards support five data source types (SOQL, Apex, DataRaptor, Integration Procedure, Streaming) and five action types (Navigation, OmniScript Launch, Apex, DataRaptor, Custom LWC) — requirements must specify which type is appropriate for each need.20- Card state templates are compiled to LWC at activation time (not at save time) — requirements that specify embedded LWC components must confirm the LWC is deployed before card activation.2122---2324## Core Concepts2526### Five Data Source Types2728Every FlexCard pulls data from exactly one of these sources:2930| Source | When to use |31|---|---|32| SOQL | Direct query against Salesforce objects; fastest for simple record display |33| Apex | Apex class method for computed or aggregated data |34| DataRaptor | Declarative field mapping for single-object reads |35| Integration Procedure | Orchestrated multi-source or external API data |36| Streaming | Platform Event subscription for real-time updates |3738Requirements must specify which type per card (and per child card if nested). SOQL is sufficient for single-object record display; Integration Procedure is required for multi-object or external API data.3940### Five Action Types4142Users interact with FlexCards through one of these action types:4344| Action type | Behavior |45|---|---|46| Navigation | Routes the user to a record page, URL, or tab |47| OmniScript Launch | Opens an OmniScript in a modal or inline |48| Apex | Calls an Apex method (typically for record updates or processing) |49| DataRaptor | Runs a DataRaptor directly (typically for simple field updates) |50| Custom LWC | Launches a custom Lightning Web Component for complex UI interactions |5152Requirements must list every action, its type, its triggering condition, and the expected outcome.5354### Card State Templates5556FlexCards support multiple card states — different layouts rendered based on record data:57- A FlexCard can have multiple card state templates, each with a condition expression58- The first matching state template is rendered; states are evaluated in order59- State templates are compiled to LWC at activation time — changes require reactivation60- Requirements must specify: how many states are needed, the condition expression per state, and what elements each state should display differently6162### Embedded Components6364FlexCards can embed child components:65- **Child FlexCards** — nested card components with their own data source66- **OmniScript** — inline or modal OmniScript launch67- **Custom LWC** — custom Lightning components6869Requirements must identify any embedded components, their data dependencies, and whether they need to be built before the parent FlexCard can be activated.7071---7273## Common Patterns7475### Pattern: Data Source Mapping Matrix7677**When to use:** When the FlexCard displays data from more than one object, or when stakeholders have not identified whether SOQL, IP, or DataRaptor is appropriate.7879**How it works:**801. For each data field the FlexCard must display: list the source object, whether it is a direct field or computed/aggregated, and any external API dependencies812. Map each field to a data source type: SOQL for direct Salesforce object fields, DataRaptor for simple remapped reads, Integration Procedure for multi-source or external data823. Document the SOQL query or IP name, and which FlexCard element binds to which field path8384**Why not the alternative:** Leaving data source type unspecified forces the developer to make architectural decisions mid-build. Using SOQL when an Integration Procedure is required causes silent data load failures or missing data on the card.8586### Pattern: Action Requirements Register8788**When to use:** When users need to take actions from the FlexCard (not just view data).8990**How it works:**911. List every action the user can take: what the user clicks/triggers, what type of action it maps to, and what happens922. For OmniScript Launch actions: identify which OmniScript, whether it opens inline or in a modal, and what data the OmniScript needs from the FlexCard context933. For Navigation actions: specify the destination (record page, URL, tab)944. For Apex or DataRaptor actions: specify the class/DR name and the data passed from the card9596---9798## Decision Guidance99100| Situation | Recommended Approach | Reason |101|---|---|---|102| Card displays fields from a single Salesforce object | SOQL data source | Simplest, fastest; no additional configuration needed |103| Card displays data from multiple objects or computed fields | Integration Procedure | Multi-source orchestration; SOQL joins are limited in FlexCard |104| Card updates a record when a user clicks a button | Apex action or DataRaptor action | Server-side execution; Apex for complex logic, DataRaptor for simple field updates |105| Card needs to launch a guided process | OmniScript Launch action | Inline or modal OmniScript; specify context data passed to OmniScript |106| Card shows different layouts for different record statuses | Card state templates | Document number of states and condition expressions per state |107| Card embeds in Experience Cloud for community users | Note guest user FLS requirements | Community guest users have restricted object access; flag required permissions |108109---110111## Recommended Workflow112113Step-by-step instructions for an AI agent or practitioner working on this task:1141151. Confirm OmniStudio license availability and the FlexCard's deployment context (Lightning record page, Service Console, Experience Cloud) — document in requirements header.1162. Identify and map all data fields the FlexCard must display — source object, field path, and whether a SOQL, DataRaptor, or Integration Procedure data source is appropriate.1173. Document all user actions required — for each action: action type (Navigation, OmniScript Launch, Apex, DataRaptor, Custom LWC), triggering element or button, and expected outcome.1184. Identify card state template requirements — how many states are needed, what conditions trigger each state, and what the layout differences are between states.1195. Identify embedded component requirements — child FlexCards, inline OmniScripts, or custom LWC components; confirm each embedded component is already built or add to build dependency list.1206. Review with the developer to confirm all data source types and action types are correct and buildable within FlexCard's five supported types before development starts.1217. Document any Experience Cloud or guest user permission requirements that must be resolved before card activation.122123---124125## Review Checklist126127Run through these before marking work in this area complete:128129- [ ] OmniStudio license confirmed and deployment context documented130- [ ] All displayed data fields mapped to a data source type (SOQL / DataRaptor / IP)131- [ ] All user actions documented with action type and expected outcome132- [ ] Card state templates specified with condition expressions133- [ ] Embedded components identified and build dependencies noted134- [ ] Experience Cloud / guest user permission requirements documented if applicable135- [ ] No data source type listed as "to be determined" (developer must receive complete spec)136137---138139## Salesforce-Specific Gotchas140141Non-obvious platform behaviors that cause real production problems:1421431. **State templates compile to LWC at activation — not at save** — FlexCard state templates are compiled to LWC only when the card is activated, not when it is saved in Card Designer. This means that a developer editing a card must reactivate it for changes to take effect. Requirements that specify a state template change mid-project must note that reactivation (and a brief outage for users currently viewing the card) is required.1442. **Child FlexCards must be activated before the parent can be activated** — If requirements specify a nested FlexCard architecture, the child card must be fully built and activated before the parent card can be activated. This is a build dependency that must appear explicitly in the requirements document's build order section.1453. **Integration Procedure data source requires the IP to be active** — FlexCards bound to an Integration Procedure data source silently return empty data if the IP is not in Active status. Requirements must note which IP is the data source and confirm it will be active before card activation.146147---148149## Output Artifacts150151| Artifact | Description |152|---|---|153| FlexCard requirements document | Data source inventory, action register, state template spec, embedded component list |154| Data source mapping matrix | Per-field table mapping display fields to data source types and element bindings |155| Action requirements register | List of all user actions with type, triggering element, and expected outcome |156| Card state template spec | Number of states, condition expression per state, layout differences |157158---159160## Related Skills161162- `omnistudio/flexcard-design-patterns` — use after requirements are complete to implement in Card Designer163- `admin/omniscript-flow-design-requirements` — companion BA requirements skill for OmniScripts that the FlexCard may launch164- `architect/omnistudio-vs-standard-decision` — use to confirm FlexCard is the right tool over standard Lightning components165- `omnistudio/integration-procedures` — use when requirements identify multi-source or external API data needs