You'll want to use Segmentations. I would create 4 custom boolean feilds for "Appt 1" "Appt 2" "Appt 3" "Appt 4" -- then for each appt, you check another box (through a smart campaign). On your confirmation email you setup Segmentation for each field, and apply one to a text section in your email. The criteria would simply be "Appt 1" is 'True' then it will show the details. If 2 3 or 4 are 'false' then it won't show them.
Now, you may have to create some other fields to populate content, or token fields to populate to get the data correct in each as well -- but holistically, that would be the structure I recommend.
In the end, we are doing creating 4 segmentations for each appointments and 4 snippets accordingly
If the condition is fulfilled for a segment, its corresponding snippet will show its content. If not, the snippet will be blank
This sounds like a case where an Appointment custom object would be useful. You could use velocity scripting to print all of the appointments someone has booked on a particular date.
I agree strongly with Steven here -- trying to manage this with flat lead fields (especially since an appointment is typically more than just a time: it includes location + practitioner at the very least) is not the right choice.
The exception (maybe) would be if you have an external system that keeps an (fixed) number of fields strictly in sync with your appointment system, so adds, changes and deletes are all replicated in near-real time to Marketo.
Still, this is a perfect example of the Zero-One-Many (sometimes called Zero-One-Infinity) principle in systems design, which I've written about before with regard to Marketo db architecture. Over time, you will find you need exactly zero, exactly one, or more than one variation of something. Any arbitrary limits other than 0 or 1, like "we need to store three appointments" or "a breeder can have five puppies for sale" are destined to fail -- maybe not now, but soon. So plan for that by building an extensible limit (up until the capabilities of the platform, of course, as surrounding systems place limits on what we can do but we shouldn't impose arbitrary limits for what seems like convenience).
6 of 6 people found this helpful
How about creating a specific set of smart campaigns that will track that?
For example - interesting moments or specific scoring for this matter?