Create OmniStudio FlexCard
sf_create_flexcardCreate an OmniStudio FlexCard to display contextual data on Lightning pages and Experience Cloud sites. Configure data source, fields, actions, and states; the card is created inactive.
Instructions
Creates an OmniStudio FlexCard (OmniUiCard metadata type). FlexCards display contextual data on Lightning pages and Experience Cloud sites.
A FlexCard defines:
A data source (SOQL query, DataRaptor, Integration Procedure, Apex, or None)
Fields to display from the data source
Actions the user can take (navigate, launch OmniScript, open URL, start Flow)
States (card variations based on data conditions)
The card is created in inactive state. Use sf_activate_flexcard to activate it after creation.
dataSourceType options:
SOQL: provide a dataSourceName with a SOQL query string
DataRaptor: provide the DataRaptor interface name
IntegrationProcedure: provide the Integration Procedure key (Type_SubType)
Apex: provide the Apex class name
None: no data source (static card)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Human-readable label | |
| fields | No | Fields to display on the card | |
| states | No | Conditional states | |
| actions | No | Card actions | |
| cardName | Yes | API name of the FlexCard (OmniUiCard) | |
| description | No | ||
| objectApiName | No | Primary SObject, e.g. 'Account' | |
| dataSourceName | No | SOQL query, DataRaptor name, or Integration Procedure name | |
| dataSourceType | No | SOQL |