---
schema_version: "1"
id: 857c9cf4f4f86f9510787813136e1ab1057b6ca91a4762f1202d7a77185a7544
title: Pass Data to Flexcards by Using Events
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_standard_pass_data_to_flexcards_by_using_events.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_standard_pass_data_to_flexcards_by_using_events.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5cf608ebfeaac3030a6e9f0a00b1d97530f0c08d0ad265f66027739c29569ebd
description: When an event occurs, a notification is sent to a Flexcard through an action on an element. Then, execute an action based on the event. Set up events to communicate between a child Flexcard and its parent, between an element and the Flexcard that it's on, or between distinct components. For example, add an action on an embedded child Flexcard that, when clicked, updates a field on the parent Flexcard. Or, add an action on an image that when clicked, updates a merge field value in a text element.
products:
  - Omnistudio
release: "264"
---
# Pass Data to Flexcards by Using Events

When an event occurs, a notification is sent to a Flexcard through an action on an element. Then, execute an action based on the event. Set up events to communicate between a child Flexcard and its parent, between an element and the Flexcard that it's on, or between distinct components. For example, add an action on an embedded child Flexcard that, when clicked, updates a field on the parent Flexcard. Or, add an action on an image that when clicked, updates a merge field value in a text element.

1. After you select the event action type, select the event type:
    - **Custom**: Notify events between a child and its parent, such as a child Flexcard and its parent Flexcard, or an element and the Flexcard that it’s on.
    - **PubSub**: Notify events between distinct components, such as between Flexcards.
2. Enter an event name. Don’t use a reserved name.
    
    To register dynamic events based on a parent attribute or a session variable, use these context variables:
    
    - `{Parent.attr}`: Use an attribute passed to a child from its parent Flexcard such as `event_{Parent.closed}`.
    - `{recordId}`: Use the ID of the record page that the Flexcard is on such as `accountEvent_{recordId}`.
    - `{Session.var}`: Use a stored value defined as a session variable of the Flexcard, or a public property defined as an exposed attribute of the Flexcard such as `chnnl_{Session.tab}`.
3. For pubsub events, enter a channel name with the same criteria as for the event name.
    
    By default, the channel name is the Flexcard name.
4. For custom events, consider how the event passes through elements and select the checkboxes accordingly:
    1. When you trigger a custom event from a nested element such as a block, select **Bubbles**.
    2. When components communicate with each other, such as a child Flexcard and its parent, or a Flexcard and the parent Omniscript, select **Bubbles** and **Compose**.
5. To pass contextual data, add an input parameter.
    1. In Key, enter a variable name.
    2. In Value, enter the variable value.
        
        Avoid using \[\] or <> brackets in value or user input fields. These characters can cause issues when sending pubsub events between Flexcards, as they are interpreted as merge fields, leading to data corruption.
        
        The Value field supports concatenated strings including a combination of plain text and supported merge fields, such as `{Parent.type} > {Name}`, and the `{Session.var}` context variable.

- **[Flexcards Reserved Event and Channel Names](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcards_reserved_event_and_channel_names_28308.htm&release=264.0.0&type=5)**  
    Review the event names and channel names that are reserved for specific purposes and use cases.
- **[Example Use Cases for Flexcard Events](https://help.salesforce.com/s/articleView?id=xcloud.os_standard_example_use_cases_for_flexcard_events.htm&release=264.0.0&type=5)**  
    Review examples of Flexcard event setup for common use cases such as updating a product list, registering dynamic custom events, or resetting a user selection.