Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

I am getting the following error

Avatar

Level 5

Error while compiling script 'content htmlContent' line 61: message.recipient_id is undefined. SCR-160012 Javascript: error while evaluating script 'content htmlContent'.

 

Please suggest. I looked for the following recipient-id it was not defined anywhere in the HTML. I am using visitor schema in target & filtering dimensions in queries and visitor as target mapping. 

 

THank you in advance

1 Accepted Solution

Avatar

Correct answer by
Level 5

Thank you @ParthaSarathy We found a workaround for this. As we are using the recurring delivery , we tried removing the analytics from the properties tab but did not worked.

 

Then we replaced recurring delivery with single email delivery, and removed the analytics from the properties tab, it started working. 

View solution in original post

12 Replies

Avatar

Level 3

@rvnth 

You seem to have personalized content in your HTML and your text version is not genereated. I would suggest to delete the text version of email and re-generate

 

Avatar

Level 5

Thank you @mustufam5967803 . Please can you suggest how to delete the text version because I am not using anything in text version of the email. 

Avatar

Level 3

Can you confirm your target recipient is same as target mapping in a delivery.

 

Avatar

Level 5

@mustufam5967803 , I am using the visitor schema in target & filtering dimensions and In devliery target mapping is visitor 

 

Thank you

Avatar

Community Advisor

Hi @rvnth ,

Basically HTML in your delivery uses message.recipient_id , since it has target mapping as Visitors it is unable to read recipient_id.

So, In Email HTML Content > Source code tab search for message.recipient_id

ParthaSarathy_0-1704824593136.png

If you're unable to find it in source tab, may be you're using some personalization block in your HTML and the personalization block might have message.recipient_id. You cross check it in that particular personalization block and make modifications in it.

Avatar

Community Advisor

Hi @rvnth 

 

You can follow the detailed guide which ParthaSarathy has given, along with that you can also check in the Deliveries Properties >> SMTP headers section if you are using any list Unsubscribe functionality which would be using message.recipient_id and make modification accordingly.

 

Thanks

Akshay

Avatar

Level 5

Thank you @AkshayAnand  @ParthaSarathy , my smpt headers were empty and also I tried proof testing without any HTML code by keeping empty and found the same error.

 

Please adise

Avatar

Community Advisor

@rvnth , Check If you have any content in text tab

ParthaSarathy_0-1704900217578.png

 

If not, try with new delivery template with Visitors target mapping. If you still get error in new delivery, then there might be issue with Target mapping.

Avatar

Level 5

@ParthaSarathy , Thank you your reply. 

Found the root cause , its with the analytics connector , adding a eid = message.recipient-id in URLs of my email. Is there a way instead of using recipient-id can I make use of visitor-id

 

<rtClickFormula><![CDATA[<%@ include option='NmsTracking_ClickFormula_Analytics' %><% // Parameters expected by Adobe Analytics Data Connector

var pattern = new RegExp("()", 'i')

if( $(urlstring).match(pattern) && delivery.FCP == false )

{

%>&chid=Email&buid=<%= message.delivery.operation.businessUnitLookUp.analyticsLookupValue %>&mid=<%= message.delivery.internalName %>&rid=<%= message.id.toString().toLowerCase() %>&eid=<%= message.recipient_id.toString().toLowerCase() %><% } %>]]></rtClickFormula>

Avatar

Level 5

This code is there in the external account adobe analytics connection

 

enrichment of calculation formula for tracked urls

 

Can I create a new connection by replacing the recipient-id with more appropriate visitor Id. I am not sure how it will impact but just wanted to check.

 

Thank you in advnace

Avatar

Community Advisor

@rvnth ,

Yes.. The script &eid=<%= message.recipient_id.toString() is trying to fetch recipient's primary key from broadLog schema. As you use Visitor's schema in target mapping, the broad log for visitor will be having visitor's schema linked and not on nms:recipient. So the script is unable to get message.recipient_id and leads to error.

Avatar

Correct answer by
Level 5

Thank you @ParthaSarathy We found a workaround for this. As we are using the recurring delivery , we tried removing the analytics from the properties tab but did not worked.

 

Then we replaced recurring delivery with single email delivery, and removed the analytics from the properties tab, it started working.