Skip to main content
cedericp8720613
Level 1
Mar 22, 2017 11:21 AM UTC
Solved

Personalized content fallback

Hi,

I,m currently setting up my very first email delivery in Adobe Campaign. In a first phase, I want to add basic personalization (last name, first name).

However, I'm aware I also need to implement a fallback in case the CRM fields are empty. So instead of "Dear Mr. X', I need a fallback resorting to simply 'Dear Mr.'

How do I implement this fallback?

Kind regards

 

Cederic

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Amit_Kumar
Amit_KumarAccepted solution
Level 10
Mar 27, 2017 6:35 AM UTC

Hi Cedric,

try using coalesce  function in your target and add a default value as empty i.e 

      

Coalesce

Returns value 2 if value 1 is zero or null, otherwise returns value 1

Coalesce(<value 1>, <value 2>)

refer to the screens below. This will help the business user and template designers to avoid the if else and any other js from email template.

6 replies

alistairk396804
Level 3
Mar 22, 2017 12:47 PM UTC

Ideally I would probably make a new field on load which contains the correct value for your greeting.

Failing that your best bet is to create a personalisation block which deals with this and select that block for your greeting. You should be able to duplicate the Greetings personalisation block as a base and modify to suit your needs.

Translate
Adhiyan
Adobe Employee
Adobe Employee
Mar 22, 2017 4:22 PM UTC

Hi Cedric,

You should use if ,else if constructs in the delivery editor to use such conditional content.

Detailed steps are given in : https://docs.campaign.adobe.com/doc/AC6.1/en/DLV_Personalizing_deliveries_Conditional_content.html

Translate
Amit_Kumar
Amit_KumarAccepted solution
Level 10
Mar 27, 2017 6:35 AM UTC

Hi Cedric,

try using coalesce  function in your target and add a default value as empty i.e 

      

Coalesce

Returns value 2 if value 1 is zero or null, otherwise returns value 1

Coalesce(<value 1>, <value 2>)

refer to the screens below. This will help the business user and template designers to avoid the if else and any other js from email template.

Translate
Level 2
Oct 16, 2018 3:49 PM UTC

This is the Campaign Standard forum, and the accepted answer is for Campaign Classic?

Translate
Level 2
Mar 5, 2019 10:42 AM UTC

I'm guessing the answer is NO in AC standard then....

Translate
Level 2
May 13, 2019 2:13 PM UTC

In Adobe Campaign Standard, which is what forum this question was posted to:

There really isn't an out-of-box way to do this. The only way you can choose fallback behavior is with JavaScript. Here is some pseudocode which should get you started:

<% var greeting = null; if(context.profile.firstName == null) { greeting = ""; } else { greeting = context.profile.firstName;  } %>

Dear Mr. <%= greeting %>

(Note that "Dear Mr." by itself does not sound natural to native English speakers, so you'd want better copy.)

Translate