AnsweredAssumed Answered

Adding Custom Object Field as Token via Email Script

Question asked by Sheila McGrath on Nov 25, 2019
Latest reply on Nov 25, 2019 by Sanford Whiteman

I have an email where i'm trying to add in tokens for the Make and Model of a new car that was just purchased. The Custom Object is "Account" and the field names are "Make" and "Model" which are housed in that account. Because a lead can have multiple accounts, the Make and Model are sometimes in the first record in the Custom Object and sometimes in the second. I'm trying to write the email script to look for the field "Product Code" = 388 which points out which account needs to serve up the Make and Model. I've read through numerous amounts of documentation and cannot seem to find how to adjust the scripts in the documentation for my scenario. Any help would be appreciated. My current script for a "Make" token, is as follows:

 

#foreach($account in $account_cList)
#if ($account.productcode == "388") {
>$foreach ${account.make}
}
#end

What am I doing wrong?

Outcomes