You are here:
Pass Data from an LWC Omniscript to an Embedded Flexcard (Managed Package)
For the managed package runtime, to populate data fields and perform actions on a Flexcard embedded in an LWC Omniscript, you can pass data from an Omniscript's data JSON to the Flexcard. Embed a Flexcard inside an LWC Omniscript with the Custom Lighting Web Component element.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
There are three ways to pass data from the LWC Omniscript to the embedded Flexcard:
Options |
Description |
Reference |
|---|---|---|
Pass a set of records |
Use the records global context variable to map data from the LWC Omniscript to an emdedded Flexcard. |
|
Pass the recordId |
Pass the recordId global context variable from the LWC Omniscript to the Flexcard. |
|
Pass a parent object |
Pass a Parent object containing parent attributes to the Flexcard from the LWC Omniscript. The Omniscript is the parent of the embedded Flexcard. The Parent global context variable, such as {Parent.Id}, must be used in the Flexcard where the merge field is supported. |
To update the Flexcard whenever the passed-in Omniscript data changes, add a Property Name of listen-os-data-change and a Property Source of true to the Omniscript's Custom LWC element properties for the Flexcard.
- Map Data from an LWC Omniscript to an Embedded Flexcard (Managed Package)
For the managed package runtime, after embedding a Flexcard inside an LWC Omniscript, map records from the Omniscript to data fields in the Flexcard. For example, populate a list of Flexcards from an array in an Omniscript. In this scenario, the Flexcard uses data from the Omniscript instead of its own data source. - Pass the RecordId from an Omniscript to Run a Query on a Flexcard (Managed Package)
For the managed package runtime, pass the recordId context variable from an LWC Omniscript to an embedded Flexcard to run a query on the Flexcard. The query returns the data that populates the Flexcard data fields and actions. - Pass a Parent Object from an LWC Omniscript to Run a Query on a Flexcard (Managed Package)
For the managed package runtime, pass a Parent object from the LWC Omniscript to the Flexcard. The LWC Omniscript is the parent of the embedded Flexcard. The Parent context variable must be used in the Flexcard where merge fields are supported, such as {Parent.Id}.

