Suggested Car Listings

In this example, a car broker wants to send a subscriber an email that includes a list of makes and models of cars that the subscriber might like based on the subscriber's stated preference.

The car broker creates an attribute for the subscriber to contain the subscriber's preference in car type. The broker populates the attribute with a survey.

Data Extensions and Relationships

The car broker also creates a data extension that contains multiple makes and models of cars for each of the short list of types that the subscribers could choose in the survey. The car broker creates a data relationship to associate the car_preference attribute on the subscriber to the type column in the data extension.

The subscriber table contains this data:

email_addressfirst_namelast_nameregioncar_preference
aruiz@example.comAngelRuiznorthsedan
johndoe@example.comJohnDoesouthconvertible
janedoe@example.comJaneDoenorthSUV

The cars data extension contains this data:

typemakemodel
SedanCompany ASedan A
SedanCompany BSedan B
SedanCompany CSedan C
ConvertibleCompany DConvertible A
ConvertibleCompany EConvertible B
SUVCompany FSUV A
SUVCompany DSUV B
SUVCompany GSUV C
SUVCompany HSUV D

AMPscript

The car broker includes this AMPscript block in the body of the email:

Output

When the car broker sends the email, the application processes the code:

For Angel Ruiz

CompanyModel
Company ASedan A
Company BSedan B
Company CSedan C

For John Doe

CompanyModel
Company DConvertible A
Company EConvertible B

For Jane Doe

CompanyModel
Company FSUV A
Company DSUV B
Company GSUV C
Company HSUV D