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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to read memo data type from schema and display on delivery?

Avatar

Level 1

Trying to read memo data type from schema to display on a delivery, but unable to display it's empty.

 

Any possible ways to display a memo in a delivery?

 

Thanks,

Koti.

1 Accepted Solution

Avatar

Correct answer by
Level 6

Carefull about kind of implementation like "grabbing a whole memo field to personalize an email":
If the memo field is common to all recipients of the delivery, you'll then have use a delivery variable like here:
Add variables from a Workflow in a Delivery in Adobe Campaign | Blog by Florian Courgey
You can create also a personnalization block dynamically that will be included in the delivery

The reason is about how works AC with personnalization data:
it creates what we call "delivery parts" that is a kind of package regrouping the template code and and an amount of personnalization data for each recipients.
More you are using personnalization data, more the "delivery part" will be heavy... More it is heavy, more it will take time to send the emails: if you have other deliveries to be sent at the same time, it will then create a bottleneck

View solution in original post

1 Reply

Avatar

Community Advisor

Hello @kotireddysyamala ,

If you want to grap entire XML of the delivery object you can do following:

 

var delivery = NLWS.nmsDelivery.load(467173)
logInfo(delivery.toDocument().toXMLString())

 

Marcel

Avatar

Employee Advisor

Which schema does the memo belong to? can you share screenshots, you can get an idea of the memo xml structure by using the expression toString(memo) in the output column and share it here.

 

for example in javascript, given the following xml structured field, the substring will return the value between the indices 23 and 29 (example in https://jsfiddle.net/02tvr7e5/)

 

The substring() method extracts characters, between to indices (positions), from a string, and returns the substring.

 

xml = '<?xml version="1.0"?> <people>   <person first-name="eric" middle-initial="H" last-name="jung">     <address street="321 south st" city="denver" state="co" country="usa"/>     <address street="123 main st" city="arlington" state="ma" country="usa"/>   </person>    <person first-name="jed" last-name="brown">     <address street="321 north st" city="atlanta" state="ga" country="usa"/>     <address street="123 west st" city="seattle" state="wa" country="usa"/>     <address street="321 south avenue" city="denver" state="co" country="usa"/>   </person> </people>';

alert(xml.substring(23,29));

value returned = people

 

In adobe campaign the function is Substring(memo,0,255) you can find more information on this thread https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-standard/substring-function/m-p/2598...

Avatar

Correct answer by
Level 6

Carefull about kind of implementation like "grabbing a whole memo field to personalize an email":
If the memo field is common to all recipients of the delivery, you'll then have use a delivery variable like here:
Add variables from a Workflow in a Delivery in Adobe Campaign | Blog by Florian Courgey
You can create also a personnalization block dynamically that will be included in the delivery

The reason is about how works AC with personnalization data:
it creates what we call "delivery parts" that is a kind of package regrouping the template code and and an amount of personnalization data for each recipients.
More you are using personnalization data, more the "delivery part" will be heavy... More it is heavy, more it will take time to send the emails: if you have other deliveries to be sent at the same time, it will then create a bottleneck

Avatar

Level 1

@LaurentLam 
I am trying to implement something similar but via personalisation block. The problem is I am not able to read my xml stored in a memo data type variable in Personalisation block.
It always give me empty value.
<% var rate = targetData.rawData
document.write(rate);
%>

and if try to refer to child nodes, it says  targetData is 'undefined'
<% var rate = targetData.rawData.person.discount;
document.write(rate);
%>

Could you please help me if I am missing anything? Thanks