Email Element Visibility
WARNING
Using the Visibility property for an element is consider an Advanced Use when Editing Emails and should be carefully considered and documented appropriately.
Visibility Conditions use simple logic expressions for rendering an element inserted into the editor. This is most commonly seen when Editing Emails and is represented by an "eye" icon at the right-side of the element.
An example email showing the visibility icons when in "edit" mode.
INFORMATION
Please see Website Element Visibility under Add Behavior for more information related to website content and adjusting its visibility.
The Visibility flag ("eye" icon) will be color coded. The "green" flagged Visibility Conditions are editable, you can change the condition statement as needed whereas the "blue" flagged conditions are set by the platform and not directly editable. Hovering over the "blue" button will show a pop-up for the condition that is being used.
An example showing what visibility condition is being used when hovering over the "eye" icon.
(advanced)
Condition StatementsThe Condition Statements used for the Visibility property can be considered conditional if
statements. Where the condition being tested is either true
or false
. Essentially, if the condition is true
the element will be visible and/or rendered appropriately based on the condition used.
Variable Only Test
If a Variable Only Test is being performed it is testing to see if a value exists for the variable. The actual value itself is not relevant to the test, only that the value is not null
(or no value). If there is a value associated with the variable, the conditional test will return true
and the element will be displayed.
Example: Variable Only Test
The screen snippet above was taken from the Bidder registration/purchase receipt System Emails. The conditional test is used to display the Divider element on the page.
The use of the HasTickets
variable in this example case is testing a simple true
/false
condition, Does the bidder have a ticket? If the answer is Yes the Divider element is displayed; if the answer was No the Divider element would not be displayed.
INFORMATION
Tickets and Dividers have no specific connection although you can use the HasTickets
variable all the same as it is tested outside of the context of the element itself.
Test For False
The default is to test for true
statements although you can test for false
statements by prepending the code-base variable with the logical not symbol !
(exclamation mark). For example, !HasTickets
would display the element if the bidder did not have a ticket for the event.
Variable Value Test
When writing a Variable Value Test you still need to phrase the condition so it can be evaluated to a true/false
resolution. As an example, to test if the variable is 0
you would specifically state variable_name === 0
or variable_name == '0'
where variable_name
is an accepted code-base variable (see below).
What does === and == mean?
The strict equality (===) operator checks whether its two operands are equal, returning a Boolean result. Unlike the equality (==) operator, the strict equality operator always considers operands of different types to be different. ~ MDN web docs
Test Multiple Variables
To Test Multiple Variables in the same condition statement you would use the logical and &&
(two ampersand symbols) to add each code-base variable into the statement.
INFORMATION
Most programming "logic" operators can be used with Visibility Conditions by themselves or combined as needed.
(advanced)
Code-base VariablesThis is a current short list of Code-base Variables you can see in action.
Bidder Emails
!HasActivity
HasActivity
HasBalance
!HasBalance
HasDonations
HasItemsWon
HasPayments
HasPurchases
HasTickets
HasToken
NotifyBidderNumber
ShowPaymentLink && Token.Url
ShowTaxDeductible && TaxDeductibleAmount
Sponsorship Related Emails
HasSponsorship
... is there a sponsorship.SponsorshipPurchases
... list of all sponosrships.Sponsorship
... first one (only one!) purchased.
Online Bidding Emails
Auction.Options.IncludeItemImagesBidding
(used for a block visibility)HasProxyBid
HasToken
!Item.MultipleWinners
Item.MultipleWinners
System Notifications
Comments
Coupons
HasPurchases
HasTickets
!Item.MultipleWinners
Item.MultipleWinners
Ticket Emails
NotifyBidderNumber
Other
BidTotal
Balance
DiscountApplied
Donation
(which is any cash donation included)
Last Revised: March 2023