# Flexcard listeners, session variables and public attributes

*Omnistudio Developer Study Guide · Flexcards · Last updated October 27, 2026 · https://www.certifyforce.com/study-guide/omnistudio-developer/flexcards/flexcard-listeners-session-variables-and-public-attributes*

How to configure Flexcard Setup properties: pubsub, custom and Record change event listeners, session variables and where they render, public attributes (cfPropName, cf-kebab-case), multi-language custom labels, Omniscript support for parent, child and Omniscript-embedded cards, and custom LWCs inside and around Flexcards.

- Certification: Salesforce Omnistudio Developer
- Exam section: Flexcards
- Study guide: https://www.certifyforce.com/study-guide/omnistudio-developer

**Official exam objective:**

> Configure advanced properties for Flexcards (Event Listeners, Session Variables, Public Attributes of Flexcards, multi-language, Omniscript, child Flexcard, custom LWCs).

## What the exam expects

- Configure pubsub, custom and Record change event listeners and the actions they run.
- Create session variables and use them only in the fields that accept them.
- Create a public attribute and reference it from Lightning App Builder, Experience Builder, a custom LWC or an Omniscript.
- Turn on multi-language support and Omniscript support, and know what each requires of child cards.
- Embed a custom LWC in a Flexcard, and a Flexcard in a custom LWC with lightning-omnistudio-flexcard.

Key terms: **event listener** (a Setup entry that runs an action when an event arrives), **session variable** (a card-wide key-value read as {Session.key}), **public attribute** (a property set in a page builder, API name cfPropName), **Omniscript support** (the Setup toggle for cards that interact with an LWC Omniscript), **lightning-omnistudio-flexcard** (the wrapper that shows a Flexcard inside a custom LWC).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Listener types | Pubsub, Custom event, Record change | [Flexcard settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5) |
| Session variable fields | Action label, custom event input value, Field label/placeholder/output, Text | [Flexcard settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5) |
| Session variable source | Can't be a data source value | [Flexcard settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5) |
| Public attribute names | Pascal case; API cfPropName; markup cf-kebab-case | [Flexcard settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5) |
| Experience Builder attribute | Select lightningCommunity__Default | [Flexcard settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5) |
| Omniscript support on parent | Child cards must have it too | [Embed Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcard_inside_another_flexcard_29030.htm&language=en_US&type=5) |
| listen-os-data-change | true refreshes the card on Omniscript data change | [Embed in Omniscript](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcards_in_an_omniscript_24124.htm&language=en_US&type=5) |
| Wrong Flexcard name in wrapper | Error at runtime only, not at deployment | [Component reference](https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-omnistudio-flexcard.html) |

## Check yourself

- Why must a child Flexcard have Omniscript support when its parent does?
- When does a Record change listener ignore an edit made through an Experience Cloud page?
- Which name goes in an Omniscript Custom LWC element for a Flexcard named Claim Summary?
- When does a custom LWC on a Flexcard canvas render?

## Sources

- [Configure Flexcard Settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&language=en_US&type=5)
- [Add an Event Listener to a Flexcard (Managed Package)](https://help.salesforce.com/s/articleView?id=sf.os_add_an_event_listener_to_a_flexcard.htm&language=en_US&type=5)
- [Flexcards Context Variables](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcards_context_variables_42922.htm&language=en_US&type=5)
- [Embed Flexcard in a Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcard_inside_another_flexcard_29030.htm&language=en_US&type=5)
- [Embed Flexcards in an Omniscript](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcards_in_an_omniscript_24124.htm&language=en_US&type=5)
- [Pass Data from an Omniscript to an Embedded Flexcard](https://help.salesforce.com/s/articleView?language=en_US&id=xcloud.os_pass_data_from_an_lwc_omniscript_to_an_embedded_flexcard_41656.htm&type=5)
- [Embed a Custom Lightning Web Component](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_a_custom_lwc_inside_a_flexcard_29568.htm&language=en_US&type=5)
- [Omnistudio Flexcard (lightning-omnistudio-flexcard)](https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-omnistudio-flexcard.html)
- [Set Up Card Actions to Update a Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&language=en_US&type=5)
- [Pass Data to Flexcards by Using Events](https://help.salesforce.com/s/articleView?id=xcloud.os_standard_pass_data_to_flexcards_by_using_events.htm&language=en_US&type=5)
- [Communicate from Omniscript to a LWC Page](https://help.salesforce.com/s/articleView?id=xcloud.os_communicate_with_omniscript_from_a_lightning_web_component_18222.htm&language=en_US&type=5)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 7 linked practice questions, and unlimited timed mock exams are included with the Omnistudio Developer pack (USD $19): https://www.certifyforce.com/practice-exams
