SOLVED

Velocity scripting with segmentations

Go to solution
BenCirillo
Level 2

Velocity scripting with segmentations

Has something changed or suddenly stopped working with Velocity reading segmentations? 

 

I have a simple script that creates a greeting line based on segmentations. Basically, if you're in one of our physician segments, it says "Dear Dr. (Lastname)", otherwise if your full name isn't blank it says "Dear (Full Name), otherwise it just says "Greetings." 

 

This script was working fine, now suddenly the segmentations aren't being recognized. The script still works because it's moving on to the next condition and displaying full names. But members in the segments aren't being recognized as such. I checked the records I was testing and they are marked as being in the segment. I also checked to make sure all the relevant fields, including segmentation, were checked in the script token. 

 

Here is the script: 

#if ($lead.Segmentation_MasterAudienceSegementation_1001 == "ASPS Active Members + Candidates" || $lead.Segmentation_MasterAudienceSegementation_1001 == "ASPS Intl Active + Candidates" || $lead.Segmentation_MasterAudienceSegementation_1001 == "RFF Domestic Residents and Fellows" || $lead.Segmentation_MasterAudienceSegementation_1001 == "RFF International Residents and Fellows" || $lead.Segmentation_MasterAudienceSegementation_1001 == "Other Physicians")
Dear Dr. $lead.LastName,
#elseif ($lead.Full_Name != "")
Dear $lead.Full_Name,
#else
Greetings,
#end

 

1 ACCEPTED SOLUTION

Accepted Solutions
BenCirillo
Level 2

Re: Velocity scripting with segmentations

Never mind, I figured it out. I had changed the name of the segmentation to correct a typo (Segementation instead of Segmentation) and didn't update the name in the script. One of those easy to overlook typos that even after having made the change, staring at the script I didn't notice. 

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity scripting with segmentations

What's the output of simply

${lead}

 

BenCirillo
Level 2

Re: Velocity scripting with segmentations

Never mind, I figured it out. I had changed the name of the segmentation to correct a typo (Segementation instead of Segmentation) and didn't update the name in the script. One of those easy to overlook typos that even after having made the change, staring at the script I didn't notice.