Oracle Responsys RPL: How do you create a fallback value when the supplemental table data fails?

575 Views Asked by At

so in Responsys we pull in the subject line via a supplemental table. We had an issue where the supplemental table failed last week and the campaign was sent out with no subject line. What we are trying to do is create a fallback value so when there is no data in the supplemental table or if the supplemental table fails then we will have a default subject line. Below is my code that I use to pull in the subject line.

<#data DEC_19_Promotional_Supplemental_Table as PROMO>
    <#filter PROMO_CAMPAIGN="${campaign.name}">
        <#fields PROMO_CAMPAIGN PROMO_SL>${PROMO.PROMO_SL}
</#data>

So I tried this code block below and I see no reason logically why this would not work

<#data DEC_19_Promotional_Supplemental_Table as PROMO>
<#filter PROMO_CAMPAIGN="${campaign.name}">
<#fields PROMO_CAMPAIGN PROMO_SL>
<#if (PROMO.PROMO_SL??) && !PROMO.PROMO_SL?isnull>
${PROMO.PROMO_SL}
<#else>
You have a new message from ExampleSite.com!
</#if>
</#data>

Anyone have any ideas on how to do this?

1

There are 1 best solutions below

1
On

Hopefully you solved this 1 year old problem, anyway, just for the sake of discussion and exchange, I'm gonna go ahead and say that in most cases it is best to declare a variable with a baseline value before entering a given external source. Then, you enter your supplemental data and re-define your variable to the desired value. So basically:

<#assign X = "1">
<#if Y == z{
  <#assign X = "2">
}
</#if>