---
schema_version: "1"
id: e3b4ea4751b1ddc25abf53340f82c55ff5b53a91d096e5a53d7506505fee9cac
title: Access Flexcard Data JSON with Merge Fields (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_access_flexcard_data_json_with_merge_fields.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_access_flexcard_data_json_with_merge_fields.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b58caa699d317962bff73396c8867a0bc679e8ef9490f9f2ee941128b8722163
description: 'For the managed package runtime, enable Flexcard element properties to access data JSON using merge fields. A merge field is a variable that references the value of a JSON node. Merge field syntax requires you to wrap a full JSON path with a curly bracket on both ends, such as {FirstName}. For example, if a JSON node is "FirstName": "John", then the merge field {FirstName} returns John.'
products:
  - Omnistudio
release: "264"
---
# Access Flexcard Data JSON with Merge Fields (Managed Package)

For the managed package runtime, enable Flexcard element properties to access data JSON using merge fields. A merge field is a variable that references the value of a JSON node. Merge field syntax requires you to wrap a full JSON path with a curly bracket on both ends, such as {FirstName}. For example, if a JSON node is `"FirstName": "John"`, then the merge field `{FirstName}` returns `John`.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

Only certain element properties support merge fields.

## Common Use Cases

- Set the value of an element's label with data coming from the data source. For example, on a Flexcard that displays an Account's primary contact information in a Block element, set the **Title** of the collapsible Block element to {PrimaryContactName}.
- Pass data from from an Action element. For example, use an Update Omniscript action to pass data, such as {Id} and {Name}, from a Flexcard to the Omniscript it's embedded inside. See [Update an Omniscript from a Flexcard (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_update_an_omniscript_from_a_flexcard.htm&release=264.0.0&type=5 "For the managed package runtime, create an action that updates an Omniscript's data JSON from the Flexcard embedded in the Omniscript. You can embed a Flexcard inside an Omniscript as a Custom LWC.").
- Pass data to a child Flexcard from the parent's datasource. For example, update the contextId on a child Flexcard by passing {Id} as an attribute form the parent Flexcard. See [Embed Flexcard Inside Another Flexcard (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcard_inside_another_flexcard.htm&release=264.0.0&type=5 "For the managed package runtime, embed a reusable Flexcard as a child inside another Flexcard. The child Flexcard can have its own data source. Or, the parent can override the child's data source with its own data source. The parent can also pass specific data to the child, such as its recordId to use as the child's contextId.").
- Set the value of descriptive text for accessibility users. For example, select {AccountName} as the **Alternative Text** for an Image element that displays a company logo.
- Display data as plain text with the Text element. For example, enter Hello {FirstName}! on a Contact Flexcard.

## Additional Syntax

This table provides additional syntax examples for nested JSON.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d152721e151">
              <p style="margin-bottom:0;">JSON Node</p>
            </th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d152721e157">
              <p style="margin-bottom:0;">Merge Field Syntax Example</p>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="JSON Node" class="slds-cell-wrap" style="vertical-align:top;" headers="d152721e151 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>"ContactInfo": {
    "FirstName": "Margarite",
    "LastName": "Mandela"
  }</code></pre>
            </td>

            <td data-label="Merge Field Syntax Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d152721e157 ">
              <p>To access a nested node, use a dot <code>.</code>
                between the parent and child node names.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>{ContactInfo.FirstName}
//returns Margarite</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="JSON Node" class="slds-cell-wrap" style="vertical-align:top;" headers="d152721e151 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[{
    "Account":{
        "AccRevenue":"139000000",
        "AccPrimContact":"Sean Forbes",
        "AccWebsite":"http://edgecomm.com",
        "AccPhone":"(512) 757-6000",
        "AccName":"Edge Comms",
        "AccPostal":"78767",
        "Contacts":[
            {
            "PostalCode":"78767",
            "Country":"USA",
            "State":"Texas",
            "City":"Austin",
            "Street":"313 Const Place",
            "Phone":"(512) 757-6000",
            "Name":"Rosa Gonzalez",
            "Id":"0033g00000EbAAP"
            },
            {
            "PostalCode":"78767",
            "Country":"USA",
            "State":"Texas",
            "City":"Austin",
            "Street":"312 Const Place",
            "Phone":"(512) 757-6000",
            "Name":"Sean Forbes",
            "Id":"0033g00000EXAAP"
            }
        ]
    }
}]</code></pre>
            </td>

            <td data-label="Merge Field Syntax Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d152721e157 ">
              <p>To access a specific item in a data field with an array, enter the number
                of the index surrounded by brackets, such as [0]. For example, [0] gets
                the first item, [1] gets the second item, and so on.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>{Account.Contacts[0].Name}
//returns Rosa Gonzalez</code></pre>
            </td>

          </tr>
        </tbody>
      </table>

- **[Access the Data JSON (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_access_the_data_json.htm&release=264.0.0&type=5)**  
    For the managed package runtime, use existing data JSON in an element property by indicating the use of a merge field.