I would like to be able to set a value (and print a content area into my email) where an expression evals as empty (IF EMPTY). What would be the best way to achieve this?
The journey is triggered by Sales Cloud updates when a prospect becomes a customer. At present, I've tried pulling from a synchronized DE as well as adding the field into the entry data and setting it directly from the Journey DE but have been unsuccessful with both attempts.
Here's each attempt:
- Synchronized DE -
<!--%%[
VAR @fibreDate, @newFibre
SET @rows = LookupRows("Opportunity_Salesforce","Id", "Id")
SET @row = row(@rows,1)
SET @fibreDate = field(@row,"Opportunity:Fibre_Service__r:First_Fibre_Connected_Date__c")
IF empty(@fibreDate) OR @fibreDate == "" THEN
SET @newFibre = "True"
ENDIF
]%% -->
%%[IF not Empty(@hasUFB) AND @newFibre=="True" THEN]%%
<!--Holiday-Message-BEGIN-->
<table class="email-container" role="presentation" style="max-width: 600px !important; background-color:#e5f1ff" width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td style="padding:10px 0px; background-color:#fff4e5">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td style="padding-top:5px">
<img alt="Important info icon" src="image url" style="max-width:34px;height:34px;" width="34" height="34">
</td>
<td style="text-align:center;padding:10px 10px 10px 10px;">
<h4 style="margin:0; color:#F7941D;font-size:20px;font-weight:bold; text-align:center;font-family:Calibri,Arial,sans-serif;">
HasFibre and FibreNew YOUR FIBRE
</h4>
</td>
</tr>
</table>
<table role="presentation" width="90%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class="mobile-padding" style="padding:0 20px 0px; font-size: 16px; line-height: 140%; color: #666666; text-align: left;">
<p style="font-family:Calibri,Arial,sans-serif;">
Please note that over the holiday season there may be a delay with your fibre connection, and although we will do our best it may not be completed until mid-January. %%=IIF(@offerType=="@youChoose","Any connection delays will also impact the delivery of your chosen incentive.","")=%%</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
%%[ENDIF]%%
<!--Holiday-Message-END-->
- Directly from the Journey DE -
<!--%%[
VAR @fibreDate, @newFibre
SET @fibreDate = Opportunity:Fibre_Service__r:First_Fibre_Connected_Date__c
IF not Empty(@hasUFB) AND empty(@fibreDate) THEN
SET @newFibre = "True"
ENDIF
]%% -->
%%[IF @newFibre=="True" THEN]%%<!--Holiday-Message-BEGIN-->
<table class="email-container" role="presentation" style="max-width: 600px !important; background-color:#e5f1ff" width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td style="padding:10px 0px; background-color:#fff4e5">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td style="padding-top:5px">
<img alt="Important info icon" src="image url" style="max-width:34px;height:34px;" width="34" height="34">
</td>
<td style="text-align:center;padding:10px 10px 10px 10px;">
<h4 style="margin:0; color:#F7941D;font-size:20px;font-weight:bold; text-align:center;font-family:Calibri,Arial,sans-serif;">
Just HasFibre YOUR FIBRE
</h4>
</td>
</tr>
</table>
<table role="presentation" width="90%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class="mobile-padding" style="padding:0 20px 0px; font-size: 16px; line-height: 140%; color: #666666; text-align: left;">
<p style="font-family:Calibri,Arial,sans-serif;">
Please note that over the holiday season there may be a delay with your fibre connection, and although we will do our best it may not be completed until mid-January. %%=IIF(@offerType=="@youChoose","Any connection delays will also impact the delivery of your chosen incentive.","")=%%</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
%%[ENDIF]%%
<!--Holiday-Message-END-->
Looking at my test data, I can see the Journey data includes null/empty value for that particular field - what am I doing wrong?
Any help would be greatly appreciated.