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

Managing email delivery content through personalisation blocks and linked schema

Avatar

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidh2892249
Level 3

02-03-2018

Hi there,

I have a project whereby I would like to manage many blocks of HTML content through:

* Personalisation Blocks

* A linked schema

* Profiling recipient data

My idea was to:

1) Create a new field called recipient.variantId on the recipient schema (string)

2) Create a new schema called contentManagement

     - containing a few fields, but of interest for this post:

               - variantId (string)

               - pbContentRef (string)

     - recipient schema linked to contentManagement schema to act as look up table (join details from recipient schema here)

<element belongsTo="dev:recipient" externalJoin="true" label="contentManagment"

             name="contentManagment" revCardinality="single" revLink="recipient"

             target="dev:contentManagment" type="link">

      <join xpath-dst="@variantID" xpath-src="@variantID"/>

</element>

3) Create various personalisation blocks containing different chunks of HTML content.

Give internal names such as:

pbHtml01

pbHtml02

pbHtml03

4) Update my lookup table schema (called contentManagement) as such:

variantId          pbContentRef

01                    <%@ include view='pbHtml01' %>

02                    <%@ include view='pbHtml02' %>

03                    <%@ include view='pbHtml03' %>

5) Create a delivery with personalisation tags that reference the pbContentRef attribute from the contentMangement schema.

<%= recipient.contentManagement.pbContentRef %>

6) Then I was hoping that any recipient that had a variantId of 01 for their recipient attribute would get the pbHtml01 HTML content generated.

Unfortunately it seems to just populate as blank.

I have played around with encoding some of the syntax of the pbContentRef values, but then I just get <%@ include view='pbHtml01' %> as a string, rather than generating the HTML content.

This concept ultimately works for strings and personalisation data attributes in this way, but is it possible to manage personalisation block content in this way.

Help greatly appreciated.

Thanks

David

Replies

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

02-03-2018

Hi David,

I think you are coping with same "complex" management as the default/factory ncm (Content Management) module (optional/under license) and the Javascript management to implement to be executed at runtime "twice".

Please read this:https://docs.campaign.adobe.com/doc/AC/en/DLV_Content_management_Use_case-_creating_content_manageme...

Use case: creating content management

and especially the section "function bloc(strPerso)", which is as "function perso()" a Javascript function to create in your Javascript library node, and usually used in the NCM template in order to "escape" the <% %>.

If you own the NCM module license, you should use it instead of creation everything similar by your own

Regards
J-Serge

Avatar

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidh2892249
Level 3

06-03-2018

Hi J-Serge, Jean-Serge Biron

Thanks for pointing me in the correct direction.

I've looked into the notes, and tried to resolve (currently with no luck), I wondered if you could help me with the final steps?

In addition to the resources i mentioned previously, I've now created a javascript code called dev:contentManagement.

Using the same code as the example to reduce chance of confusion with function names.

function perso(strPerso)

{

  var strStart = '<' + '%' + '=';

  var strEnd = '%' + '>';

  return strStart + strPerso + strEnd;

}

  function bloc(strPerso)

{

  var strStart = '<' + '%' + '@ include view="';

  var strEnd = '" %' + '>';

  return strStart + strPerso + strEnd;

}

I've then tried to update a delivery with references to make use of my personalisation blocks.

Firstly I Updated the dev:contentManagement schema as such:

variantId          pbContentRef

01                    <%= bloc('pbHtml01') %>

02                    <%= bloc('pbHtml02') %>

03                    <%= bloc('pbHtml03') %>

Then using this simple HTML in a delivery.

<!doctype html>

<html>

<% eval(xtk.javascript.load("dev:contentManagement").data); %>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

</head>

<body>

<%= recipient.contentManagement.pbContentRef %>

</body>

</html>

I have previewed with a recipient that has a variantId of 02 and it just shows as blank. When inspecting the source code, it is just generating <%= bloc('pbHtml02') %>

I have therefore tried removing a step and placing <%= bloc('pbHtml02') %> directly into the delivery.

When I preview this, it is again blank but generates this source code <%@ include view="pbHtml02" %> (just the tag, not the HTML of the personalisation block).

So in both instances it is generating what I believe to be the correct syntax for the javascript tags, but is not executing the "next step" and pulling in the subsequent content.

Can you please advise where I am going wrong?

Thanks

David

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

06-03-2018

Hi David,

I am afraid it is too tricky for me, sorry. It would mean analyzing deeply the NCM module code to find out what is missing in your case, and I am quite busy by now.
Perhaps should you ask for Adobe consultancy or Integrator consultancy, but other way is to consider buying NCM. Or other approach perhaps?

Good luck.

Regards.
J-Serge

Avatar

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 3
davidh2892249
Level 3

Likes

16 likes

Total Posts

131 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
davidh2892249
Level 3

07-03-2018

Hi Jean-Serge Biron

Thanks for your response, much appreciated.

I have tried quite a few different approaches with my custom schema to no avail, i'll try content manager to see if it helps execute the js tags a step further.

David