For the managed package runtime, global and local context variables are available to a Flexcard to provide context to data sources, actions, and other components. All variables are case sensitive.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Global Variables
|
Name |
Description |
Merge Field |
|---|---|---|
|
Label |
Salesforce Custom Labels. See Add Custom Labels to Supported Fields on a Flexcard (Managed Package). |
{Label.mylabel} For example, {Label.AccountName} gets a custom label named AccountName. |
|
objectApiName |
Beginning Winter '22, pass the object API Name to a component as an attribute, such as a Custom LWC, when a Flexcard is on a record page. Similar to {recordId}, use Test Parameters to verify in Preview. See Test Data Source Settings on a Flexcard (Managed Package). Supported property fields:
|
{objectApiName} For example, use an SOQL Query to get a list of accounts. Enter {objectApiName} as the object to query. Then add a Test Parameter whose Key is ObjectApiName and Value is Account. |
|
Params |
The page parameters passed to the URL. |
{Params.fieldName} For example, {Params.Id} gets the context Id. We recommend using {recordId} to get the context Id of a record. |
|
Parent |
Reference attributes from the parent Flexcard on the child Flexcard with this variable. Attributes are defined at design time on the parent Flexcard. See Embed Flexcard Inside Another Flexcard (Managed Package). |
{Parent.attributeName} For example, Parent.Id gets the {Id} attribute defined on the parent Flexcard. |
|
recordId |
Gets the context Id of a Salesforce object's data record. Use Test Parameters to verify in Preview. See Test Data Source Settings on a Flexcard (Managed Package). |
{recordId} For example, if using an Omnistudio Data Mapper to get a list of Account Cases, in the Input Map, enter AccountId as Key and {recordId} as the Value. Then add a Test Parameter whose Key is recordId and Value is 138238279r9ff to populate your Flexcard with actual data. |
|
records |
The records object of the Flexcard, which can be passed on to Child Flexcard, Custom LWC, and Flyout parameters. |
{records} For example, {records} gets all records, while {records [0]} gets the first available record. |
|
Session |
Variables used to store values from data sources and external systems, and hardcoded values. Properties are defined at design time on the Flexcard. See Add Session Variables to a Flexcard (Managed Package). |
{Session.sessionkey} For example, {Session.pageLimit} gets a session variable named pageLimit. |
|
User |
User and Contact properties for the logged-in user. Note
Rendered User context variable is viewable at run time only. View in Preview. Available properties:
|
{User.property} For example, {User.userName} gets the logged in user's username. |
Local Variables
|
Name |
Description |
Merge Field |
|---|---|---|
|
action |
The parameters received by an event listener and sent to an action. |
{action.parameter} For example, if your event is sending you a contextId parameter, then use {action.contextId}. |
|
element |
The values set by the toggle element and tied to an action.
|
{element.value}, {element.checked} |
|
record |
The record object that belongs to the State, and passed on to Child Flexcard, Custom LWC, and Flyout parameters. |
{record}, {record.FieldName} For example, {record} gets the entire record, while {record.Name} gets the Name field from the record. |