Visibility Rules

Visibility Commands allow you to display or hide blocks depending on rules set.

Getting Started

To apply a command, select the block you wish to apply the visibility rule to and click on the eye icon:

There are two ways to apply Visibility Commands:

Content Source Visibility Commands

Applying rules based on data in the feed. Once the Visibility Condition dialogue has appeared, select the field from the content source in question before applying one of the following rules:

Rule

Description

"%%.root.field.%%".length < 15

Display image based on character length in data field

"%%.root.field.%%".length < 1

hide if character length less than 1

"%%.root.field.%%" == "y"

if data equals 'y'

%%.root.field.%%' != 'y'

if data does not equal 'y'

%%.root.field.%% > 0

if greater than 0

%%.root.field.%% < 1

if less than 1

%%.root.field.%% <= 10

if less than or equal to 10

%%.root.field.%% >= 10

if greater than or equal to 10

%%.root.field.%% >= 1 && %%.root.field.%% <= 10

greater than or equal to 1 and if less than or equal to 10

%%.root.field.%% == 10 || %%.root.field.%% == 20

if equals 10 OR if equals 20

Adding multiple visibility rules

Code

Description

&&

multiple rules AND

||

multiple rules OR

An example of multiple conditions would be (%%.rootfield.%% >= 1 && %%.root.field.%% <= 10) || "%%.rootfield.%%" == "y"

Use Case 1: Only showing a ‘Selling Fast’ badge when a product is under 10 in quantity.

On the hosted image, select the eye icon:

Then apply the following rule:

URL Visibility Commands

Applying rules based on the data pulled through from the ESP or CRM:

Codes for URL data

Visibility rules on URL parameter e.g customer tier merged from ESP

%%url(name)%%' <= 1

URL param length less than or equal to 1

%%url(name)%%'.length >=9

URL param length greater than or equal to 9

%%url(name)%%'.length <=1 || '%%url(name)%%'.length >=9

URL param length less than or equal to 1 OR URL param length greater than or equal to 9

Ensure that the bracketed (name) contains the exact URL name that was added when connecting to the URL parameter.

Use Case 2: Only displaying first name when it is between 4 and 9 characters in length.