---
schema_version: "1"
id: ec29fe92d36f492ef0f964df932aec4d0fda0030ed50f1d0988d9c84de7010b8
title: Add Conditions to a Flexcard State (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_add_conditions_to_a_flexcard_state.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_add_conditions_to_a_flexcard_state.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6da80fa7ee83a66d46f24af7103d350fc9182ced52bb2bd1c72b0e7eec638100
description: For the managed package runtime, Flexcard states enable the presentation of different CRM interactions for each state. Set conditions to determine if, when, and how data displays on a Flexcard.
products:
  - Omnistudio
release: "264"
---
# Add Conditions to a Flexcard State (Managed Package)

For the managed package runtime, Flexcard states enable the presentation of different CRM interactions for each state. Set conditions to determine if, when, and how data displays on a Flexcard.

![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).

![example](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)

example

Example: Policy Information Flexcard

A Flexcard displays policy information for an Account. If the Policy is up to date, the default state displays data fields, and an action to update Account information. If the Policy is about to expire, the Policy has a red border, an alert notification, and an action to renew the Policy.

![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

When arranging the order of your states on the canvas, place the states in a logical order, where the first condition is checked against the next, and so on. Typically, states with complex conditions precede states with simple ones, followed by a state with no conditions, and then a Blank Card State. The Flexcard displays the first state whose conditions evaluate to true.

For example, the order of the states for the previous example would be:

1. State 1 - Condition: DaysToExpiration < 31 && DaysToExpiration != Null (empty)
2. State 2 - No conditions
3. State 3 - Blank Card State (no records returned)

![Important](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_important.png)

Important

Applied conditions are visible in Preview only.

1. From the Flexcards tab, click a version of a Flexcard to open the Flexcard Designer.
2. Select a state, and click the pencil icon next **Conditions** in the Properties panel.
3. Click **\+ Add Condition**.
4. To create basic conditions:
    
    1. Click into the **Data Field**, from the list of data fields, select a data field to filter, such as DaysToExpiration.
    2. To define the relationship between the data field and a value, select an operator from **Operator** dropdown, such as <.
    3. In the **Value** field, enter the value to check against the data field, such as 31. Enter literal values. Variables are not supported.
        
        ![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
        
        Beginning Summer '21, if your Flexcard is a [child Flexcard](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."), use the `{Parent.attributeName}` to check against the value of an attribute passed to the child from the parent Flexcard. See [Flexcards Context Variables (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcards_context_variables.htm&release=264.0.0&type=5 "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.").
    4. If adding another condition, click **\+ Add Condition** and select **AND** or **OR** from the dropdown between conditions:
        
        - Select **AND** if all conditions must be met.
            
            - For example, the policy status is purchased AND the expiration date is less than 31 days.
            
            ![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
            
            If there’s only one condition, that condition must be met to display cards.
        - Select **OR** if any condition can be met.
            
            - For example, the policy status is closed OR the expiration date is less than 31 days.
            
            ![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
            
            If there’s only one condition, that condition doesn’t need to be met to display cards.
5. To build nested conditions:
    
    1. Click **\+ Add Group** after creating a condition, such as DaysToExpiration < 31.
    2. Click **\+ Add Condition** and enter values for all fields for each condition.
    3. Select **AND** or **OR** from the dropdown between conditions.
    
    For example, use the conditions feature to build the conditional expression DaysToExpiration < 31 AND ( PolicyType = Universal Life OR PolicyType = Universal Variable Life) to filter for policies about to expire, and whose policy type is either Universal Life or Universal Variable Life.
    
    ![FlexCard Conditions ­Group](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/flexcard_conditons_group.png)