Momentum Fitness Co.
Member Reactivation

Back to Home

A personalized member reactivation email built in Salesforce Marketing Cloud using AMPscript, Data Extension lookups, conditional logic, dynamic class recommendations, MJML and responsive HTML. The email adapts both the message and offer based on how long a member has been away and their membership type.

AMPscriptData ExtensionsPersonalizationConditional ContentMJMLHTML Email

Email Preview

The preview uses the supplied rendered email as the visual reference. Dynamic AMPscript values are represented with the sample content from the provided render.

Project Overview

The campaign is designed to bring inactive fitness members back into the studio with a personalized message, membership-specific discount and one recommended class. Instead of showing a generic class, the AMPscript progressively broadens the recommendation criteria until it finds an available option.

Member Reactivation DE
        ↓
AMPscript reads member profile
        ↓
Days-since-last-visit segmentation
        ↓
Membership-based offer + hero banner
        ↓
Class Schedule lookups
        ↓
Availability check (SpotsLeft > 0)
        ↓
Recommended class + image + schedule
        ↓
Personalized responsive email

Data Extensions

Reactivation List

FirstName
MembershipType
LastVisitDate
FavouriteClass
CoachName
HomeStudio
WinBackCode
ClassesCompleted

Class Schedule

ClassId
ClassName
Day
Time
Coach
Studio
SpotsLeft

Class Image

Class
ImageURL

The recommendation image is retrieved from the Class_Image Data Extension. This avoids relying on dynamically constructed filenames, which can fail when asset naming or casing differs.

Personalization & Segmentation

The AMPscript calculates the number of days since the member's last visit and uses that value to change both the subject line and hero copy.

IF @daysSinceLastVisit < 30 THEN
    @subjectline = "FirstName, ready for your next class?"
    @hero_text = "FirstName, Ready to Sweat Again?"

ELSEIF @daysSinceLastVisit < 60 THEN
    @subjectline = "We’ve missed you, FirstName!"
    @hero_text = "Missed us, FirstName?"

ELSE
    @subjectline = "FirstName, let’s get you back in the studio."
    @hero_text = "FirstName, Ready for Your Comeback?"
ENDIF

Membership-Based Offer

The discount and hero image are selected from the member's MembershipType.

Basic Monthly15% discount + hero-1.png
10-Pack10% discount + hero-2.png
Other membership types20% discount + hero-3.png
Personalized codeWinBackCode is displayed directly in the email.

Recommendation Logic

Only one class is recommended. The lookup starts with the most personalized match and falls back to broader criteria if no available class is found.

1. Favourite Class + Coach + Home Studio
             ↓ if unavailable
2. Favourite Class + Home Studio
             ↓ if unavailable
3. Home Studio + Coach
             ↓ if unavailable
4. Home Studio + highest SpotsLeft
Reactivation segmentationCalculates days since the last visit and changes the subject line and hero copy for <30, 30–59, and 60+ days.
Membership offerSelects a 15%, 10%, or 20% discount and matching hero banner based on membership type.
Class recommendationTries four fallback combinations, starting with the member’s favourite class + coach + studio, then broader matches.
Availability checkOnly accepts recommendations with more than 0 available spots; the final studio fallback is ordered by SpotsLeft.
Dynamic class imageLooks up the recommendation image from the Class_Image Data Extension instead of constructing a case-sensitive filename URL.
Time formattingAdds spacing and uppercase AM/PM to the schedule time before it is displayed.

Email Logic

Dynamic First Name If FirstName is empty, the email defaults to “Champ”.
Visit Based Messaging Subject line and hero text change based on the customer's last visit.
Membership Personalization Hero banner and membership discount are selected from MembershipType.
Dedicated Image DE A separate Data Extension is used to retrieve the image URL for the recommended class.

AMPscript Functions Used

Lookup LookupRows LookupOrderedRows IndexOf Replace Concat Empty DateDiff Add

AMPscript

The full AMPscript handles member attributes, segmentation, membership offers, recommendation fallbacks, image lookup and time formatting.

/*Subject and Hero text based on days since last visit*/
IF @daysSinceLastVisit < 30 THEN
	SET @subjectline = Concat(@firstName,', ready for your next class?')
	SET @hero_text = Concat(@firstName,',<br/> Ready to Sweat Again?')
ELSEIF @daysSinceLastVisit < 60 THEN
	SET @subjectline = Concat('We’ve missed you, ',@firstName,'!')
	SET @hero_text = Concat('Missed us, <br/>',@firstName,'?')
ELSE
	SET @subjectline = Concat(@firstName,', let’s get you back in the studio.')
	SET @hero_text = Concat(@firstName,', <br/>Ready for Your Comeback?')
ENDIF

/*Hero Banner and Discount based on membership type*/
IF @membershipType == 'Basic Monthly' THEN
	SET @membershipDiscount = '15'
	SET @heroBanner = 'https://images.ampscriptacademy.com.au/uploads/hero-1.png'
ELSEIF @membershipType == '10-Pack' THEN
	SET @membershipDiscount = '10'
	SET @heroBanner = 'https://images.ampscriptacademy.com.au/uploads/hero-2.png'
ELSE
	SET @membershipDiscount = '20'
	SET @heroBanner = 'https://images.ampscriptacademy.com.au/uploads/hero-3.png'
ENDIF

/*Recommended Class Section - Headline and Text*/
IF @recommendation == 'FavClassCoachStudio' THEN
	SET @recommendation_text = Concat('We found your favourite class with ', @coachName,' at ', @homeStudio,'. Looks like the perfect way to get back into your routine.')
	SET @classHeadline = Concat(@favouriteClass, ' with ', @coachName)
ELSEIF @recommendation == 'FavClassStudio' THEN
	SET @recommendation_text = Concat('Your favourite class is available at ', @homeStudio,'. Why not make it your comeback class?')
	SET @classHeadline = Concat(@favouriteClass, ' at ', @homeStudio)
ELSEIF @recommendation == 'FavCoachStudio' THEN
	SET @recommendation_text = Concat(@coachName, ' is back at ', @homeStudio,'. It could be a great time to get back into your routine.')
	SET @classHeadline = Concat('Train with ', @coachName)
ELSE
	SET @recommendation_text = Concat("We found a great class for you at ", @homeStudio,". All that's left is to show up. 💪")
	SET @classHeadline = Concat(@favouriteClass, ' at ', @homeStudio)
ENDIF

Key Features

Behavior-Based MessagingCopy changes based on days since the last visit.
Membership PersonalizationOffer and hero banner change by membership type.
Smart Class RecommendationOne recommendation with progressive fallback logic.
Live Availability CheckRecommendations are only accepted when SpotsLeft is greater than zero.
Dynamic Class ImageryImageURL is retrieved from the Class_Image Data Extension.
Member ProgressCompleted class count and next class number are personalized.
Responsive EmailEmail structure is developed using MJML and rendered HTML.
Dynamic ScheduleClass day, time, studio, coach and spots remaining are populated dynamically.

Credits

Company Logo Created using Design.com Logo Maker
Email Inspiration Inspired by Garmin Virtual Event Launch Reminder
Email Development Designed and built using MJML
Campaign Implementation AMPScript Personalization and Testing using AMPscript Academy

Source Code

The project source files can be added to the portfolio repository alongside this project page.


View Project on GitHub