Day 18 – Dental Appointment Reminder

Challenge

https://ampscript30.com/ampscript-challenge-day18/

To create reminder emails that display the appointment details.

Solution

%%[
SET @fullname = Concat(FirstName, " ", LastName)
SET @appointmentdate = FormatDate(AppointmentDate, "MMMM d")
SET @appointmenttime = FormatDate(AppointmentDate, "HH:mm tt")
SET @location = AppointmentLocation
]%%
Hi %%=v(@fullname)=%%

This is a friendly reminder that you have a dental appointment scheduled with us on %%=v(@appointmentdate)=%% at %%=v(@appointmenttime)=%%. Our office is located in %%=v(@location)=%%. We look forward to seeing you soon!

In preparation for your appointment, here are a few things to keep in mind:

%%=ContentBlockbyName("Dental Appointment Reminder Content Block")=%%

If you need to reschedule your appointment or have any questions, please do not hesitate to contact our office.

Thank you for choosing us as your dental care provider. We look forward to seeing you soon.

Sincerely,
Next Dental

Preview

Summary

Use ContentBlockbyName(1, 2, 3, 4, 5) to retrieve the pre-set content block in the email body. My understand of the challenge is to create multiple content blocks based on different appointment code to show different instruction messages, but due to my own laziness I decided to just use one content block as a demo. If to create multiple content blocks, remember to name them using the appointment codes so that it can be retrieved via this function correctly.