SOLVED

Re: What is wrong with my token?

Go to solution
SanfordWhiteman
Level 10 - Community Moderator

Re: What is wrong with my token?

The order of the list of records attached to a given lead is in no way visible in Admin. So I can't imagine what you're referring to here.

Every lead can have zero or more records of the same type of CO, and all those records will have all of the fields available on that CO. The fields may be empty for some of the records, and the records may be added in any order. The 3rd record in a list has no inherent meaning.

Travis_Schwartz
Level 4

Re: What is wrong with my token?

Can you point me to where I would be able to see the list of entire $customerList_cLost you wanted me to output so I can get the Velocity property names for the fields?

SanfordWhiteman
Level 10 - Community Moderator

Re: What is wrong with my token?

Just output the full

  ${customList_cList}

in a Velocity token, and preview the email by lead or list.

Travis_Schwartz
Level 4

Re: What is wrong with my token?

[{listID=eStateMent List, text2=null, listName=null}, {listID=Card Expiration Notice, text2=null, listName=null}, {listID=Returned Card Notice, text2=6586, listName=null}, {listID=Mobile Confirmation, text2=VISA Debit Card, listName=null}]

SanfordWhiteman
Level 10 - Community Moderator

Re: What is wrong with my token?

OK, you want to seek your target record by iterating over the CO list until you find the first match. Then exit (#break) to save processing overhead.

#foreach( $list in $customList_cList )
#if( $list.listID.equals("Returned Card Notice") )
#set( $targetList = $list )
#break
#end
#end
${display.alt($targetList.text2,"No matching list found.")}‍‍‍‍‍‍‍

Note if you add additional records later that also match "Returned Card Notice" (no technical reason why that couldn't happen) you'll need to figure out which one to use: the first match by date, last match by date, or something else.

Travis_Schwartz
Level 4

Re: What is wrong with my token?

Thanks for persevering through this with me, Sanford.

How it works on our end is records are tagged with the card return notice CO, and when that is resolved, it is synced from our server and cleared from their record. in this case would I still need to do the match by date? or would just anyone who had that CO be added. Ideally this will be an automated process that just happens as members qualify to have the CO added to their record.

SanfordWhiteman
Level 10 - Community Moderator

Re: What is wrong with my token?

You don't need to worry about match by date, then. Just use the code from my last post.