Our team is working on sending personalized emails based on information stored in a custom object using travel itinerary information. Our problem, though, is that many leads in our database have multiple itineraries (i.e. multiple custom object records). We have set up some script tokens to display custom object information, but this will only display info from the most recent custom object record. How do we ensure the correct itinerary is displayed?
For example: If we are sending a pre-travel type email 7 days before a person's departure, and that person has 2 itineraries (A & B), but only Itinerary B's departure date is in 7 days, how can we ensure only Itinerary B's info is displayed instead of Itinerary A? In this example, we would want to display a "Departure Date" field and a "Booking Number" field.
I know we would need to utilize some velocity scripting, but any assistance here would be greatly appreciated!
Solved! Go to Solution.
If your campaign triggers on the addition of a CO record, the triggering record is automatically available as$TriggerObject
in Velocity.
Why do you say “this will only display info from the most recent custom object record”? That’s not so. You have access to the last 100 CO records in Velocity. It's an iterable List, $CustomObjectName_List.
The reason I say we are only able to display the most recent custom object record is because we have not implemented any velocity scripting. How would we be able to display only the CO record info that qualified a lead for a campaign?