---
title: Display Rules
slug: test-archbee/display-rules
docTags: 
createdAt: 2024-07-16T11:07:22.000Z
---

:::hint{type="info"}
This feature works in combination with a **JWT Public Access Control&#x20;**&#x6F;r

- with Guest Accounts
- with Magic Links&#x20;
- with SAML integration

A JWT authentication will have to be configured so the conditions defined in the Display Rules are validated or invalidated.
:::

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/34p_RWIWUpga79cy9-DUe_cc-light.png)

The Display Rules feature allows you to display specific content blocks based on predefined conditions. This feature provides flexibility in content delivery, ensuring that users see content tailored to their needs and behaviors.&#x20;

## Creating Display Rules Conditions

::::WorkflowBlock
:::WorkflowBlockItem
Go to the **Dynamic Components** tab in the platform's bottom left corner.
:::

:::WorkflowBlockItem
Select **Display Rules**
:::

:::WorkflowBlockItem
Create a New Rule Set:

- Click o&#x6E;**&#x20;+ Create** **New Rule Set&#x20;**&#x74;o define conditions for displaying content.
- Specify your conditions using **AND**/**OR** logic to determine when content should be shown. These conditions can be based on various parameters such as user behavior, profile attributes, or other criteria relevant to your platform.
:::
::::

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/Oi-fGlMQsXXSVHDytatWU_dynamic-components-light.png)

## Applying Display Rules to a Block

::::WorkflowBlock
:::WorkflowBlockItem
**Edit Your Content Block**
In the editor, locate the block you want to transform into a display content block.
:::

:::WorkflowBlockItem
**Access the block menu**
Hover on the block to reveal the block menu, which is represented by six dots (`⋮⋮` block menu icon).
:::

:::WorkflowBlockItem
Press the **Display Rules** button
:::
::::

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/rp-gYdXw5ZofPlKNH1cCp_ccmenu-light.png "Default Block Menu")
:::

:::VerticalSplitItem
::Image[]{src="https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/tGYpvRp_1IQqNACiAA7Kd_ccmenu2-dark.png" darkSrc="https://archbee-image-uploads.s3.amazonaws.com/bNBm7nPJgXjbjLyfbHNh2/RLIPVVrO9-SYD-IqsoMai_ccmenu2-dark-1.png" size="98" width="1026" height="948" darkWidth="1026" darkHeight="948" position="center" caption="AI Options Block Menu" showCaption="true"}
:::
::::

## Applying Display Rules to document/folder

::::WorkflowBlock
:::WorkflowBlockItem
Click on the three vertical dots near the document/folder name
:::

:::WorkflowBlockItem
Select the Display Rule that you want to apply
:::
::::

Choose the rule set you previously created from the **Dynamic Components.**

![](https://api.archbee.com/api/optimize/bNBm7nPJgXjbjLyfbHNh2/O0TuHIqbg_mW9x8slT4JN_display-rules-light.png)

:::hint{type="success"}
Once these steps are completed, the selected content block will be transformed into a conditional content block, displaying only when the specified conditions are met.
:::

## Example Use Case:

Imagine you want to display a special promotion only to users who have previously purchased from your store and are visiting during a holiday season.&#x20;

You would:

::::WorkflowBlock
:::WorkflowBlockItem
Navigate to the Dynamic Components tab and create a new rule set with conditions based on purchase history and the current date.
:::

:::WorkflowBlockItem
Apply this rule set to the promotional content block in the editor.
:::

:::WorkflowBlockItem
Users meeting these conditions will now see the special promotion block during their visit.
:::
::::

## JWT Token Integration

- Keeping encoded conditions in the URL used for connection.
- Ensuring that dynamic content can be securely tailored based on the information contained within the token.

:::hint{type="info"}
When a user accesses the platform, their JWT token is decoded to retrieve the conditions. These conditions are then matched against the predefined rule sets, determining which content blocks should be displayed
:::

## Display Rules with Public Authentication options

You can now apply Display Rules to public users who sign in using:

- Guest Accounts
- Magic link
- SAML

## How It Works

- [Create a Display Rule](https://docs.archbee.com/display-rules#WKba6)&#x20;
- Apply Rule to a document or a folder
- Done! &#x20;

:::hint{type="success"}
When a user logs in (magic link, guest accounts, or SAML)
the rule checks the email's info
If it matches → **they can see it the document/folder**
If not → **it's hidden**
:::

## Example

**Rule**: Email contains archbee
**User logs in** with [sarah@archbee.com](mailto\:sarah@archbee.com)
✅ Sarah can view the doc
**User logs in** with [mike@gmail.com](mailto\:mike@gmail.com)
❌ *Mike won’t see it*
