Expand my Community achievements bar.

SOLVED

targetdata is not defined

Avatar

Level 4

Hi guys,

I created a List by importing a Excel file. Then in my workflow, I'm using a Read List component to read that list and pass it to a Delivery. I'm trying to send a proof to a seed address (myself), but I'm getting an 'Unreachable' and a 'Error while compiling script 'content htmlContent' line 168: targetData is not defined. SCR-160012 JavaScript: error while evaluating script 'content htmlContent'.'

How can I fix this please?

Note: I'm doing it this way because the Excel file contains columns we don't have in our Schema (and it's only for this delivery) plus it contains duplicated emails that I have to send (a single user sharing the same email address but with different company names).

Note 2: I've already set up the TO so it won't 'Exclude duplicate addresses during delivery' and it will 'Keep duplicate records (same identifier)'

Thank you!

- Raúl

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Justina,

I didn't, the workaround is to upload the list into the Recipients schema, having that was easier than trying to emulate it through the seed addresses.

Regards,

Raúl

View solution in original post

6 Replies

Avatar

Employee

Hi Raul,

The steps or explanation shared here is only pertaining to cases where you have targetData personalization in email and you are trying to send proof using seed addresses

What is targetData personalization?

Normally on emails you will be using personalization data directly from recipient schema. Such personalization blocks will be like <%= recipient.firstName %>, <%= recipient.email %>

However, if there is some data which is inherently not available inside database marketers tend to generate that data on the fly.

It is done on the additional data section of a query activity or enrichment.

Suppose salutation was generated on the fly, the workflow will create a temporary structure to hold that data under column @salutation (this is configurable). Inside the delivery, you can use them for personalization by using <%= targetData.salutation %>

Now if you are trying to proof this delivery using seeds, you will have to populate the additional data section of seed with this wanted element so that the proofing can work.

Hence on the additional data section you define <targetData salutation=”Hi Sir” />

For this test, the delivery in my case is using targetData personalization, something like this <%= targetData.Survey_Unique_URL %>

So, my seed address have to have additional data containing <targetData Survey_Unique_URL=”http://www.adobe.com” />

You can change the url value as per your liking.

So I created a new seed address “Vipul Raghav” and configured it on the delivery.

1559967_pastedImage_3.png

If I send the proof at this step it will fail, the same that you have reported.

You will have to make the delivery believe that workflow is sending the same targetData to delivery.

As a result, I’ll just add a Query activity before it with a random selection query. Most important part is to provide targetData with alias name matching the field you need inside delivery. if you already have an actual workflow, you can skip this part.

1559968_pastedImage_5.png

Now open the delivery and send a proof and it goes out successfully.

Regards,

Vipul

Avatar

Level 1

Above info is very conceptual, thanks for sharing. I had exact same error but in Adobe standard Campaign. Its interesting how standard handles this scenario. It creates blank personalized fields in test email sends and we do not have to add any alias or sample data. But when I got same error for actual profile, I found that there were duplicate additional data for same profile and I was using aggregate instead of collection for "Type". Example: One profile registered same webinar twice and using workflow dynamically we were sending webinar reminders to profiles with personalized fields like webinar name, time, join link etc.

During execution, workflow could not determine which personalized values to populate and gave below error:

05/11/2020 7:00:29 AM

Failed

xxxx@xxx.com

Unreachable

Error while compiling script 'DM6926[htmldefaultContent]' line 107: context.targetData is undefined.

No

 

   

Send Status showed: Message Personalization Failed.

I fixed this by changing type to "collection" so that one row of additional data is picked for one profile to populate personalization data fields during execution of workflow.

Avatar

Level 4

Hi Vipul,

I have a query and added the Alias with the same target data dynamic content as you wrote, but I'm receiving the same error. What else can I try to fix this please?

-Raúl

Avatar

Level 2

Hi Raul,

I am facing the same issue right now. Did you manage to solve it? If you did, do you mind sharing the solution?

Thanks!

- Justina

Avatar

Level 10

(Moving this to the Campaign Classic forum for follow up)

Avatar

Correct answer by
Level 4

Hi Justina,

I didn't, the workaround is to upload the list into the Recipients schema, having that was easier than trying to emulate it through the seed addresses.

Regards,

Raúl