Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

ACS - Personalization conditional expression in Multilingual Push template

Avatar

Avatar
Give Back
Level 2
rajdeepk7439790
Level 2

Likes

3 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
rajdeepk7439790
Level 2

Likes

3 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile
rajdeepk7439790
Level 2

27-08-2018

Hello Adobe Campaign Standard Expert,

I am using multilingual template for push notification template and it uses content block that determines which variant to select for the particular languages. If  target populations are from different countries then content block decides the template based on customer countries.

Now, what i am looking is to personalized the delivery content message based on segment (targetdata) from the workflow.

I am using two segment 'Apple' and 'Android' and named the segment code as Apple and Android.  In the delivery content template, this segment code is used for conditional expression as  shown below

<%

if (Segment code == "Apple" )

{

%>IOS Message Tiltle<%

}

else if (Segment code == "Android")

{

%>Android Message Title<%

}

else

{

%>Default Message<%

}

%>¨Capture.PNG

But when I ran the delivery, it returns an error.

27/08/2018 19:16:04

SCR-160032 JavaScript: failure while compiling script 'TemplateCheck'.

27/08/2018 19:16:04

JST-310000 Error while compiling script 'TemplateCheck' line 4: illegal XML character (line='if (<%= context.targetData.segmentCode document.writeraw(" == \"Apple\" )\r\n{\r\n%>IOS Message Tiltle"); ' token='%= context.targetData.segmentCode document.writeraw(" == \"Apple\" )\r\n{\r\n%>IOS Message Tiltle"); ').

Capture1.PNG

Can anyone please suggest how I can use targetdata in personalization for conditional expression.

Any suggestion would be greatly appreciated.

Thanks in Advance!!

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct Reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct Reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile
Adhiyan
Employee

03-09-2018

Hello Rajdeep,

Can you share the full code from the subject line.

Also , can you try to use "=" instead of "==" in the script and try.

Regards,

Adhiyan

Avatar

Avatar
Give Back
Level 2
rajdeepk7439790
Level 2

Likes

3 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile

Avatar
Give Back
Level 2
rajdeepk7439790
Level 2

Likes

3 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Boost 3
Boost 1
View profile
rajdeepk7439790
Level 2

30-08-2018

Could anyone please suggest the workaround?

Adhiyan

florentlb