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

Adding targetData logic in an email


Level 1

Hi I'm very new to ACS, and was hoping someone can help me out.  I built an email and I'm trying to access targetData in the email for the make and model of a car.  I put the code below in the email (I tried "context.targetData" and "context.profile.targetData") and I just get back when I preview "'targetData' element unknown (see definition of 'Enrichment (temp:enrichment1-src)' schema)."  How do I fix this please?


<% var aVehicle = 'vehicle';
var aField1 = targetData.Make;
var aField2 = targetData.Model;
if( aField1 != '' || aField2 != '') { aVehicle = aField1 + ' ' + aField2; } document.write(aVehicle); %>
2 Replies


Level 1

I wasn't using the entire variable being pulled in from targetData.  It should have been:


Now I'm just having trouble testing with the test profiles since none of them have the data.