SlideShare a Scribd company logo
1 of 51
ExactTarget Training

Personalization &
Basic AMPscript
21 November 2013
Founded in 1999 in Overland Park, KS
100+ associates, strategists, designers
& developers
Significant work for significant clients
Presenters
Kevin Joseph Smith, Sr. Training Coordinator
ksmith@DEGdigital.com
913.951.3124

ExactTarget Training :: Personalization & Basic AMPscript
Agenda
Personalization (not AMPscript)
AMPscript
Variables
– Declare
– Set
– Output
Common Functions
– ProperCase
– Lowercase
– Uppercase
– RedirectTo

Commenting
– Hide a Content Area with AMPscript

ExactTarget Training :: Personalization & Basic AMPscript
Personalization
(not AMPscript)
Lists - Personalization
If your subscriber data is stored in Lists
(segmented with Groups), then you can
add personalization (mail merge) to the
subject line, preheader, HTML version
or text version by using the name of the
Profile Attribute surrounded by double
percent signs.
For example, if you had the Profile
Attribute of “First Name”, you would use
%%First Name%%
You must have data for a subscriber or
a blank space will appear for the
personalization.

Several locations will provide a
dropdown list of your account’s Profile
Attributes.
ExactTarget Training :: Personalization & Basic AMPscript
Lists - Personalization

An example of an email that has personalization of First Name.
ExactTarget Training :: Personalization & Basic AMPscript
Lists - Personalization

This subscriber had a value for first name in ExactTarget.

ExactTarget Training :: Personalization & Basic AMPscript
Lists - Personalization

This subscriber did not have a value for first name in ExactTarget.
ExactTarget Training :: Personalization & Basic AMPscript
Data Extensions - Personalization
If your subscriber data is stored in
Data Extensions (or segmented with
Data Filters) then you can add
personalization (mail merge) by using
the name of the column heading
(field) of the sending Data Extension
surrounded by double percent signs.
For example, if you had the column
heading of “First_Name”, you would
use %%First_Name%%
You must have data for a subscriber
or a blank space will appear for the
personalization.

ExactTarget Training :: Personalization & Basic AMPscript
Data Extensions - Personalization

An example of an email that has personalization of First Name.
ExactTarget Training :: Personalization & Basic AMPscript
Data Extensions - Personalization

This subscriber had a value for first_name field in the Data Extension.

ExactTarget Training :: Personalization & Basic AMPscript
Data Extensions - Personalization

This subscriber did not have a value for first_name field in the Data Extension.
ExactTarget Training :: Personalization & Basic AMPscript
AMPscript
AMPscript
AMPscript requires Advanced Content Management (ACM) to be purchased and
enabled in your account. It’s included with Enterprise 2.0 accounts.
AMPscript is a scripting language that you can embed within emails (also
Landing Pages (if enabled) and MobileConnect (if enabled)).
Create highly personalized emails with AMPscript:
– Define and set variables within the email
– Format subscriber data
– Dynamic emails (without using Dynamic Content Wizard)
– Lookup relational/reference data from Data Extension

ExactTarget Training :: Personalization & Basic AMPscript
Variables
(Declare, Set, and Output)
Personalization Recap
You’ve seen that if subscriber data is stored in Lists or Data Extensions, you can
personalize emails with variables associated with that subscriber (e.g. first
name).
With AMPscript, you have the ability to declare and set variables at the
beginning of an email and then output those values (once or multiple times)
throughout the email.
A variable is a stored piece of data.

ExactTarget Training :: Personalization & Basic AMPscript
Variables
What if you had a weekly email, which has a few values change from week to
week, and you want the ability to quickly update them.

ExactTarget Training :: Personalization & Basic AMPscript
Variables
You could utilize AMPscript! At the top of the email, you will declare and set the
variables to be used within the rest of the email.

ExactTarget Training :: Personalization & Basic AMPscript
Variables
You will always choose “HTML Only” Content Area when setting and declaring variables
in a template-based email.
AMPscript can be coded directly into Paste HTML emails or Paste HTML Templates.

ExactTarget Training :: Personalization & Basic AMPscript
Delimiters
To alert ExactTarget that you are
declaring and setting variables, you
must add a opening block delimiter:
%%[
To alert ExactTarget you have
completed declaring and setting
variables, you must add a closing
block delimiter:
]%%
Always declare and set a variables at
the top of an email.

ExactTarget Training :: Personalization & Basic AMPscript
Declare Variables
You will then declare to ExactTarget that
you are creating variables inside of the
email. You’ll accomplish this by adding
the word VAR after the opening delimiter.
Next choose what you would like each
variable called.
VAR
@promotion, @promodate, @rep, @firstnam
e

Variable names must begin with the @
symbol and be followed by at least one
other letter, number, or underscore.
Spaces and commas are not allowed in
variable names.
The @ symbol and variable are called a
Keyword.
Variables are null until a value is SET.

ExactTarget Training :: Personalization & Basic AMPscript
SET Variables
You will then set the value of each
variable by typing SET followed by the
variable name, an equal sign, opening
parenthesis, typing the value for the
variable, and closing parenthesis.
SET @promotion = "Annual Fall Sale"
SET @promodate = "31 October"
SET @rep = "John Doe"

You even have the ability to set Profile
Attributes for Lists or column headings
for Data Extension as a variable.
SET @firstname = [First_Name]

ExactTarget Training :: Personalization & Basic AMPscript
SET String Constant Value
String (or text) constant values must be quoted in double or single quotes.
SET @promotion = "Annual Fall Sale"
SET @promotion = 'Annual Fall Sale'

String constants can escape the delimiting quote character if they appear within
the text by doubling it.
SET @promotion = "October's Annual Fall Sale"
SET @promotion = 'October''s Annual Fall Sale'

Alternative quote characters, such as smart quotes, are not recognized…so
write your AMPscript in ExactTarget or a text editor!

ExactTarget Training :: Personalization & Basic AMPscript
SET Numeric Constant Value
When setting a numeric variable, you do not need to use single quotes or
double quotes:
SET @price = 12

Numeric constant values can also include one decimal point and an introductory
minus sign to indicate negative values.
SET @expense = -12
SET @expense2 = -12.00
SET @expense3 = 12.00

Numeric constant values cannot contain commas.

ExactTarget Training :: Personalization & Basic AMPscript
Set Boolean Constant Values
Boolean constant values must be true or false and are case insensitive.
SET @preference1 = TRUE
SET @preference2 = true
SET @preference3 = FALSE
SET @preference4 = false

ExactTarget Training :: Personalization & Basic AMPscript
Set Profile Attributes or Data Extension Fields
You even have the ability to set Profile Attributes for Lists or column headings for
Data Extension as a variable.
If the Profile Attribute or Data Extension column heading contains a space, these
values must be enclosed in brackets.
SET @first = [First Name]
SET @first = First_Name

If the Profile Attribute or Data Extension column heading doesn’t contain
space, you can still add brackets.
SET @first = [First_Name]

ExactTarget Training :: Personalization & Basic AMPscript
Output Variables
To output (or retrieve or print) a
variable declared at the top of the
email, you will add the inline delimiter
of %%=v( followed by the keyword
(e.g. @rep) and close with another
inline delimiter of )=%%

Dear %%=v(@firstname)=%%,
We are celebrating our
%%=v(@promotion)=%%!
Join us %%=v(@promodate)=%% at
your closest store for a free
gift.
Thanks!
%%=v(@rep)=%%

ExactTarget Training :: Personalization & Basic AMPscript
Completed Email
Here’s what our completed email looks like:

ExactTarget Training :: Personalization & Basic AMPscript
Rendered Email
When you test the email, all of the variables will be populated!

ExactTarget Training :: Personalization & Basic AMPscript
Common
Functions
ProperCase
What if your data is not clean and some subscribers have
a first name in shouting caps or lowercase (e.g. JOHN or jill).

ExactTarget Training :: Personalization & Basic AMPscript
ProperCase
You can add an AMPscript function
called ProperCase to format all first
names into the proper case.

If you had a Profile Attribute or Data
Extension field called First_Name (no
space):
%%=ProperCase(First_Name)=%%
%%=ProperCase([First_Name])=%%

If you had a Profile Attribute or Data
Extension field called First Name
(space), you must include brackets:
%%=ProperCase([First Name])=%%

ExactTarget Training :: Personalization & Basic AMPscript
ProperCase
If you had a Profile Attribute or Data Extension field called First_Name (no
space), you would use the ProperCase function. You could define and set the
variable at the top of the email, rather than in the body of the email:
%%[VAR @firstname
SET @firstname = ProperCase(First_Name)
]%%

You could render the ProperCase variable in the email:
%%=v(@firstname)=%%

ExactTarget Training :: Personalization & Basic AMPscript
Lowercase
You can add an AMPscript function
called Lowercase to format all first
names into the proper case.
If you had a Profile Attribute or Data
Extension field called Interest (no
space), you would use the Lowercase
function:
%%=Lowercase(Interest)=%%

If you had an Attribute or Data
Extension field called Primary Interest
(with a space), you must include
brackets:
%%=Lowercase([Primary Interest
])=%%

ExactTarget Training :: Personalization & Basic AMPscript
Lowercase
If you had a Profile Attribute or Data Extension field called Interest (no
space), you would use the Lowercase function. You could define and set the
variable at the top of the email, rather than in the body of the email:
%%[VAR @interest
SET @interest = Lowercase (Interest)
]%%

You could render the Lowercase variable in the email:
%%=v(@interest)=%%

ExactTarget Training :: Personalization & Basic AMPscript
Uppercase
You can add an AMPscript function
called Uppercase to format all first
names into the proper case.
If you had a Profile Attribute or Data
Extension field called Interest (no
space), you would use the Uppercase
function:
%%=Uppercase(Interest)=%%

If you had an Attribute or Data
Extension field called Primary Interest
(with a space), must use brackets:
%%=Uppercase([Primary Interest
])=%%

ExactTarget Training :: Personalization & Basic AMPscript
Uppercase
If you had a Profile Attribute or Data Extension field called Interest (no
space), you would use the Uppercase function. You could define and set the
variable at the top of the email, rather than in the body of the email:
%%[ VAR @interest
SET @interest = Uppercase (Interest)
]%%

You could render the Uppercase variable in the email:
%%=v(@interest)=%%

ExactTarget Training :: Personalization & Basic AMPscript
RedirectTo
If you have a Profile Attribute or Data
Extension column heading that
contains a hyperlink, you can use
personalization to populate the
hyperlink in the email, including the
href attribute.

ExactTarget Training :: Personalization & Basic AMPscript
RedirectTo
However, when declaring and setting hyperlink variables at the top of the email, you
must always use RedirectTo function to populate the href attribute in an anchor tag.
For example if you declared a hyperlink at the top of the email, when you output the
variable in the href, the hyperlink would not work:
%%[
VAR @url
set @url = "https://pages.exacttarget.com/northern_trail_outfitters/"
]%%
<a href="%%=v(@url)=%%">click here</a>

Nor can you use RedirectTo function when setting a variable:
%%[
VAR @url
set @url = RedirectTo("https://pages.exacttarget.com/northern_trail_outfitters/")
]%%

ExactTarget Training :: Personalization & Basic AMPscript
RedirectTo
Instead, you would add the RedirectTo function in the href attribute of an
anchor tag:
<a href="%%=RedirectTo(@url)=%%">click here</a>

ExactTarget Training :: Personalization & Basic AMPscript
Commenting
Commenting
AMPscript may contain comments-or non-executed notes-that allow you, as the
author, to document your code.
You must open comments with the /* sequence and close comments with the */
sequence. Comments may span multiple lines.
For example, if we had created this AMPscript:
%%[
VAR
SET
SET
SET
SET
]%%

@promotion, @promodate, @rep
@promotion = "Annual Fall Sale"
@promodate = "31 October"
@rep = "John Doe"
@firstname = ProperCase([First Name])

ExactTarget Training :: Personalization & Basic AMPscript
Commenting
We could mark it up with internal comments:
%%[
/*variables we can use in the email*/
VAR @promotion, @promodate, @rep
/*change the promotion!*/
SET @promotion = "Annual Fall Sale"
/*change the promotion date!*/
SET @promodate = "31 October"
/*if needed, change the rep's name!*/
SET @rep = "John Doe"
/*this function makes the first name propercase*/
SET @firstname = ProperCase([First Name])
]%%

ExactTarget Training :: Personalization & Basic AMPscript
Commenting

ExactTarget Training :: Personalization & Basic AMPscript
Hide a Content Area with AMPscript
We can also hide a Content Area with AMPscript by adding <-- ! -->
Hiding the Content Area will still execute the AMPscript.
<!-%%[
/*variables we can use in the email*/
VAR @promotion, @promodate, @rep, @firstname
/*change the promotion!*/
SET @promotion = "Annual Fall Sale"
/*change the promotion date!*/
SET @promodate = "31 October"
/*if needed, change the rep's name!*/
SET @rep = "John Doe"
/*this function makes the first name propercase*/
SET @firstname = ProperCase([First Name])
]%%
-->

ExactTarget Training :: Personalization & Basic AMPscript
Hide a Content Area with AMPscript

ExactTarget Training :: Personalization & Basic AMPscript
Questions
Thank You!
Kevin Joseph Smith, Sr. Training Coordinator
ksmith@DEGdigital.com
913.951.3124

ExactTarget Training :: Personalization & Basic AMPscript
Resources
AMPscript Overview
http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/
AMPscript Syntax Guide
http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/am
pscript_syntax_guide/
AMPscript Functions
http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/am
pscript_functions/

ExactTarget Training :: Personalization & Basic AMPscript

More Related Content

What's hot

Event Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and SecurityEvent Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and SecurityDreamforce
 
Data-Ed: Data-centric Strategy & Roadmap
Data-Ed: Data-centric Strategy & RoadmapData-Ed: Data-centric Strategy & Roadmap
Data-Ed: Data-centric Strategy & RoadmapData Blueprint
 
Salesforce integration with Box.com, docuSign & QuickBooks made easy
Salesforce integration with Box.com, docuSign & QuickBooks made easySalesforce integration with Box.com, docuSign & QuickBooks made easy
Salesforce integration with Box.com, docuSign & QuickBooks made easySaxon Global inc
 
Rethinking Trust in Data
Rethinking Trust in Data Rethinking Trust in Data
Rethinking Trust in Data DATAVERSITY
 
Step-by-Step Guide for Salesforce Marketing Cloud Connect Integration
Step-by-Step Guide for Salesforce Marketing Cloud Connect IntegrationStep-by-Step Guide for Salesforce Marketing Cloud Connect Integration
Step-by-Step Guide for Salesforce Marketing Cloud Connect IntegrationSolunus, Inc.
 
Agile Enterprise Data Model & Data Management Solution
Agile Enterprise Data Model & Data Management SolutionAgile Enterprise Data Model & Data Management Solution
Agile Enterprise Data Model & Data Management SolutionA.I. Consultancy Ltd
 
LDM Slides: Data Modeling for XML and JSON
LDM Slides: Data Modeling for XML and JSONLDM Slides: Data Modeling for XML and JSON
LDM Slides: Data Modeling for XML and JSONDATAVERSITY
 
Gartner: Master Data Management Functionality
Gartner: Master Data Management FunctionalityGartner: Master Data Management Functionality
Gartner: Master Data Management FunctionalityGartner
 
Sales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best PracticesSales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best PracticesSalesforce Partners
 
Channel Incentive Programs
Channel Incentive ProgramsChannel Incentive Programs
Channel Incentive ProgramsNishant Goyal
 
Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...
Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...
Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...Edureka!
 
The Zen of DataOps – AWS Lake Formation and the Data Supply Chain Pipeline
The Zen of DataOps – AWS Lake Formation and the Data Supply Chain PipelineThe Zen of DataOps – AWS Lake Formation and the Data Supply Chain Pipeline
The Zen of DataOps – AWS Lake Formation and the Data Supply Chain PipelineAmazon Web Services
 
Sap integration salesforce_presentation
Sap integration salesforce_presentationSap integration salesforce_presentation
Sap integration salesforce_presentationSalesforce Deutschland
 
A Business Intelligence requirement gathering checklist
A Business Intelligence requirement gathering checklistA Business Intelligence requirement gathering checklist
A Business Intelligence requirement gathering checklistMadhumita Mantri
 

What's hot (20)

Event Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and SecurityEvent Monitoring: Use Powerful Insights to Improve Performance and Security
Event Monitoring: Use Powerful Insights to Improve Performance and Security
 
Data-Ed: Data-centric Strategy & Roadmap
Data-Ed: Data-centric Strategy & RoadmapData-Ed: Data-centric Strategy & Roadmap
Data-Ed: Data-centric Strategy & Roadmap
 
Google's Dremel
Google's DremelGoogle's Dremel
Google's Dremel
 
Salesforce integration with Box.com, docuSign & QuickBooks made easy
Salesforce integration with Box.com, docuSign & QuickBooks made easySalesforce integration with Box.com, docuSign & QuickBooks made easy
Salesforce integration with Box.com, docuSign & QuickBooks made easy
 
Rethinking Trust in Data
Rethinking Trust in Data Rethinking Trust in Data
Rethinking Trust in Data
 
Step-by-Step Guide for Salesforce Marketing Cloud Connect Integration
Step-by-Step Guide for Salesforce Marketing Cloud Connect IntegrationStep-by-Step Guide for Salesforce Marketing Cloud Connect Integration
Step-by-Step Guide for Salesforce Marketing Cloud Connect Integration
 
Mdm: why, when, how
Mdm: why, when, howMdm: why, when, how
Mdm: why, when, how
 
Agile Enterprise Data Model & Data Management Solution
Agile Enterprise Data Model & Data Management SolutionAgile Enterprise Data Model & Data Management Solution
Agile Enterprise Data Model & Data Management Solution
 
LDM Slides: Data Modeling for XML and JSON
LDM Slides: Data Modeling for XML and JSONLDM Slides: Data Modeling for XML and JSON
LDM Slides: Data Modeling for XML and JSON
 
Gartner: Master Data Management Functionality
Gartner: Master Data Management FunctionalityGartner: Master Data Management Functionality
Gartner: Master Data Management Functionality
 
Sales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best PracticesSales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best Practices
 
Channel Incentive Programs
Channel Incentive ProgramsChannel Incentive Programs
Channel Incentive Programs
 
Dirty Data - SparkPlugs
Dirty Data - SparkPlugsDirty Data - SparkPlugs
Dirty Data - SparkPlugs
 
Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...
Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...
Salesforce Interview Questions And Answers | Salesforce Tutorial | Salesforce...
 
The Zen of DataOps – AWS Lake Formation and the Data Supply Chain Pipeline
The Zen of DataOps – AWS Lake Formation and the Data Supply Chain PipelineThe Zen of DataOps – AWS Lake Formation and the Data Supply Chain Pipeline
The Zen of DataOps – AWS Lake Formation and the Data Supply Chain Pipeline
 
Determine Your Data Strategy
Determine Your Data StrategyDetermine Your Data Strategy
Determine Your Data Strategy
 
Sap integration salesforce_presentation
Sap integration salesforce_presentationSap integration salesforce_presentation
Sap integration salesforce_presentation
 
Building your Cloud Strategy
Building your Cloud StrategyBuilding your Cloud Strategy
Building your Cloud Strategy
 
A Business Intelligence requirement gathering checklist
A Business Intelligence requirement gathering checklistA Business Intelligence requirement gathering checklist
A Business Intelligence requirement gathering checklist
 
Top Benefits of Salesforce in Business
Top Benefits of Salesforce in BusinessTop Benefits of Salesforce in Business
Top Benefits of Salesforce in Business
 

Similar to ExactTarget Training: Personalization & AMPscript

EMarketing Techniques Conference_Emailmarketingessentials May2008
EMarketing Techniques Conference_Emailmarketingessentials May2008EMarketing Techniques Conference_Emailmarketingessentials May2008
EMarketing Techniques Conference_Emailmarketingessentials May2008Corporate College
 
Transfer of Information: Configuring Optional Parameters in StoryPulse
Transfer of Information: Configuring Optional Parameters in StoryPulseTransfer of Information: Configuring Optional Parameters in StoryPulse
Transfer of Information: Configuring Optional Parameters in StoryPulseFOCALCXM
 
CRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.doc
CRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.docCRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.doc
CRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.docKrisStone4
 
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...Amazon Web Services
 
Mcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbangaMcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbangaDan Romuald Mbanga
 
How To Build A Bulk Email Sending Application In PHP
How To Build A Bulk Email Sending Application In PHPHow To Build A Bulk Email Sending Application In PHP
How To Build A Bulk Email Sending Application In PHPSudheer Satyanarayana
 
HTML email design and usability
HTML email design and usabilityHTML email design and usability
HTML email design and usabilityKeith Kmett
 
Email Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your Results
Email Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your ResultsEmail Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your Results
Email Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your ResultsShana Masterson
 
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and ExcelCOE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and ExcelRazorleaf Corporation
 
Parametrization using TruClient Protocol
Parametrization using TruClient ProtocolParametrization using TruClient Protocol
Parametrization using TruClient ProtocolKumar Gupta
 
SEO Tips from the Experts at LiveEdit
SEO Tips from the Experts at LiveEditSEO Tips from the Experts at LiveEdit
SEO Tips from the Experts at LiveEditLiveEdit
 
Machine Learning Fundamentals
Machine Learning FundamentalsMachine Learning Fundamentals
Machine Learning FundamentalsSigOpt
 
Query optimization-with-sql
Query optimization-with-sqlQuery optimization-with-sql
Query optimization-with-sqlraima sen
 
Deep Dive on Amazon SES What's New - AWS Online Tech Talks
Deep Dive on Amazon SES What's New - AWS Online Tech TalksDeep Dive on Amazon SES What's New - AWS Online Tech Talks
Deep Dive on Amazon SES What's New - AWS Online Tech TalksAmazon Web Services
 
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...Amazon Web Services
 

Similar to ExactTarget Training: Personalization & AMPscript (20)

EMarketing Techniques Conference_Emailmarketingessentials May2008
EMarketing Techniques Conference_Emailmarketingessentials May2008EMarketing Techniques Conference_Emailmarketingessentials May2008
EMarketing Techniques Conference_Emailmarketingessentials May2008
 
Transfer of Information: Configuring Optional Parameters in StoryPulse
Transfer of Information: Configuring Optional Parameters in StoryPulseTransfer of Information: Configuring Optional Parameters in StoryPulse
Transfer of Information: Configuring Optional Parameters in StoryPulse
 
CRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.doc
CRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.docCRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.doc
CRM Target Groups_C1B_CRM702_BB_ConfigGuide_EN_XX.doc
 
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
NEW LAUNCH! Integrating Amazon SageMaker into your Enterprise - MCL345 - re:I...
 
Mcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbangaMcl345 re invent_sagemaker_dmbanga
Mcl345 re invent_sagemaker_dmbanga
 
Mail SMTP and IMAP By Company All in One
Mail SMTP and IMAP By Company All in OneMail SMTP and IMAP By Company All in One
Mail SMTP and IMAP By Company All in One
 
How To Build A Bulk Email Sending Application In PHP
How To Build A Bulk Email Sending Application In PHPHow To Build A Bulk Email Sending Application In PHP
How To Build A Bulk Email Sending Application In PHP
 
HTML email design and usability
HTML email design and usabilityHTML email design and usability
HTML email design and usability
 
10 Email Etc
10 Email Etc10 Email Etc
10 Email Etc
 
Email Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your Results
Email Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your ResultsEmail Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your Results
Email Design Workshop - Don't Let Bad Email Code Ruin Your Day or Your Results
 
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and ExcelCOE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
COE2010 Razorleaf SmarTeam Attribute Mappings for Word and Excel
 
Parametrization using TruClient Protocol
Parametrization using TruClient ProtocolParametrization using TruClient Protocol
Parametrization using TruClient Protocol
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
SEO Tips from the Experts at LiveEdit
SEO Tips from the Experts at LiveEditSEO Tips from the Experts at LiveEdit
SEO Tips from the Experts at LiveEdit
 
Machine Learning Fundamentals
Machine Learning FundamentalsMachine Learning Fundamentals
Machine Learning Fundamentals
 
Query optimization-with-sql
Query optimization-with-sqlQuery optimization-with-sql
Query optimization-with-sql
 
Deep Dive on Amazon SES What's New - AWS Online Tech Talks
Deep Dive on Amazon SES What's New - AWS Online Tech TalksDeep Dive on Amazon SES What's New - AWS Online Tech Talks
Deep Dive on Amazon SES What's New - AWS Online Tech Talks
 
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
Building Content Recommendation Systems Using Apache MXNet and Gluon - MCL402...
 
AdvancedXPath
AdvancedXPathAdvancedXPath
AdvancedXPath
 

Recently uploaded

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 

Recently uploaded (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 

ExactTarget Training: Personalization & AMPscript

  • 1. ExactTarget Training Personalization & Basic AMPscript 21 November 2013
  • 2. Founded in 1999 in Overland Park, KS 100+ associates, strategists, designers & developers Significant work for significant clients
  • 3.
  • 4. Presenters Kevin Joseph Smith, Sr. Training Coordinator ksmith@DEGdigital.com 913.951.3124 ExactTarget Training :: Personalization & Basic AMPscript
  • 5. Agenda Personalization (not AMPscript) AMPscript Variables – Declare – Set – Output Common Functions – ProperCase – Lowercase – Uppercase – RedirectTo Commenting – Hide a Content Area with AMPscript ExactTarget Training :: Personalization & Basic AMPscript
  • 7. Lists - Personalization If your subscriber data is stored in Lists (segmented with Groups), then you can add personalization (mail merge) to the subject line, preheader, HTML version or text version by using the name of the Profile Attribute surrounded by double percent signs. For example, if you had the Profile Attribute of “First Name”, you would use %%First Name%% You must have data for a subscriber or a blank space will appear for the personalization. Several locations will provide a dropdown list of your account’s Profile Attributes. ExactTarget Training :: Personalization & Basic AMPscript
  • 8. Lists - Personalization An example of an email that has personalization of First Name. ExactTarget Training :: Personalization & Basic AMPscript
  • 9. Lists - Personalization This subscriber had a value for first name in ExactTarget. ExactTarget Training :: Personalization & Basic AMPscript
  • 10. Lists - Personalization This subscriber did not have a value for first name in ExactTarget. ExactTarget Training :: Personalization & Basic AMPscript
  • 11. Data Extensions - Personalization If your subscriber data is stored in Data Extensions (or segmented with Data Filters) then you can add personalization (mail merge) by using the name of the column heading (field) of the sending Data Extension surrounded by double percent signs. For example, if you had the column heading of “First_Name”, you would use %%First_Name%% You must have data for a subscriber or a blank space will appear for the personalization. ExactTarget Training :: Personalization & Basic AMPscript
  • 12. Data Extensions - Personalization An example of an email that has personalization of First Name. ExactTarget Training :: Personalization & Basic AMPscript
  • 13. Data Extensions - Personalization This subscriber had a value for first_name field in the Data Extension. ExactTarget Training :: Personalization & Basic AMPscript
  • 14. Data Extensions - Personalization This subscriber did not have a value for first_name field in the Data Extension. ExactTarget Training :: Personalization & Basic AMPscript
  • 16. AMPscript AMPscript requires Advanced Content Management (ACM) to be purchased and enabled in your account. It’s included with Enterprise 2.0 accounts. AMPscript is a scripting language that you can embed within emails (also Landing Pages (if enabled) and MobileConnect (if enabled)). Create highly personalized emails with AMPscript: – Define and set variables within the email – Format subscriber data – Dynamic emails (without using Dynamic Content Wizard) – Lookup relational/reference data from Data Extension ExactTarget Training :: Personalization & Basic AMPscript
  • 18. Personalization Recap You’ve seen that if subscriber data is stored in Lists or Data Extensions, you can personalize emails with variables associated with that subscriber (e.g. first name). With AMPscript, you have the ability to declare and set variables at the beginning of an email and then output those values (once or multiple times) throughout the email. A variable is a stored piece of data. ExactTarget Training :: Personalization & Basic AMPscript
  • 19. Variables What if you had a weekly email, which has a few values change from week to week, and you want the ability to quickly update them. ExactTarget Training :: Personalization & Basic AMPscript
  • 20. Variables You could utilize AMPscript! At the top of the email, you will declare and set the variables to be used within the rest of the email. ExactTarget Training :: Personalization & Basic AMPscript
  • 21. Variables You will always choose “HTML Only” Content Area when setting and declaring variables in a template-based email. AMPscript can be coded directly into Paste HTML emails or Paste HTML Templates. ExactTarget Training :: Personalization & Basic AMPscript
  • 22. Delimiters To alert ExactTarget that you are declaring and setting variables, you must add a opening block delimiter: %%[ To alert ExactTarget you have completed declaring and setting variables, you must add a closing block delimiter: ]%% Always declare and set a variables at the top of an email. ExactTarget Training :: Personalization & Basic AMPscript
  • 23. Declare Variables You will then declare to ExactTarget that you are creating variables inside of the email. You’ll accomplish this by adding the word VAR after the opening delimiter. Next choose what you would like each variable called. VAR @promotion, @promodate, @rep, @firstnam e Variable names must begin with the @ symbol and be followed by at least one other letter, number, or underscore. Spaces and commas are not allowed in variable names. The @ symbol and variable are called a Keyword. Variables are null until a value is SET. ExactTarget Training :: Personalization & Basic AMPscript
  • 24. SET Variables You will then set the value of each variable by typing SET followed by the variable name, an equal sign, opening parenthesis, typing the value for the variable, and closing parenthesis. SET @promotion = "Annual Fall Sale" SET @promodate = "31 October" SET @rep = "John Doe" You even have the ability to set Profile Attributes for Lists or column headings for Data Extension as a variable. SET @firstname = [First_Name] ExactTarget Training :: Personalization & Basic AMPscript
  • 25. SET String Constant Value String (or text) constant values must be quoted in double or single quotes. SET @promotion = "Annual Fall Sale" SET @promotion = 'Annual Fall Sale' String constants can escape the delimiting quote character if they appear within the text by doubling it. SET @promotion = "October's Annual Fall Sale" SET @promotion = 'October''s Annual Fall Sale' Alternative quote characters, such as smart quotes, are not recognized…so write your AMPscript in ExactTarget or a text editor! ExactTarget Training :: Personalization & Basic AMPscript
  • 26. SET Numeric Constant Value When setting a numeric variable, you do not need to use single quotes or double quotes: SET @price = 12 Numeric constant values can also include one decimal point and an introductory minus sign to indicate negative values. SET @expense = -12 SET @expense2 = -12.00 SET @expense3 = 12.00 Numeric constant values cannot contain commas. ExactTarget Training :: Personalization & Basic AMPscript
  • 27. Set Boolean Constant Values Boolean constant values must be true or false and are case insensitive. SET @preference1 = TRUE SET @preference2 = true SET @preference3 = FALSE SET @preference4 = false ExactTarget Training :: Personalization & Basic AMPscript
  • 28. Set Profile Attributes or Data Extension Fields You even have the ability to set Profile Attributes for Lists or column headings for Data Extension as a variable. If the Profile Attribute or Data Extension column heading contains a space, these values must be enclosed in brackets. SET @first = [First Name] SET @first = First_Name If the Profile Attribute or Data Extension column heading doesn’t contain space, you can still add brackets. SET @first = [First_Name] ExactTarget Training :: Personalization & Basic AMPscript
  • 29. Output Variables To output (or retrieve or print) a variable declared at the top of the email, you will add the inline delimiter of %%=v( followed by the keyword (e.g. @rep) and close with another inline delimiter of )=%% Dear %%=v(@firstname)=%%, We are celebrating our %%=v(@promotion)=%%! Join us %%=v(@promodate)=%% at your closest store for a free gift. Thanks! %%=v(@rep)=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 30. Completed Email Here’s what our completed email looks like: ExactTarget Training :: Personalization & Basic AMPscript
  • 31. Rendered Email When you test the email, all of the variables will be populated! ExactTarget Training :: Personalization & Basic AMPscript
  • 33. ProperCase What if your data is not clean and some subscribers have a first name in shouting caps or lowercase (e.g. JOHN or jill). ExactTarget Training :: Personalization & Basic AMPscript
  • 34. ProperCase You can add an AMPscript function called ProperCase to format all first names into the proper case. If you had a Profile Attribute or Data Extension field called First_Name (no space): %%=ProperCase(First_Name)=%% %%=ProperCase([First_Name])=%% If you had a Profile Attribute or Data Extension field called First Name (space), you must include brackets: %%=ProperCase([First Name])=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 35. ProperCase If you had a Profile Attribute or Data Extension field called First_Name (no space), you would use the ProperCase function. You could define and set the variable at the top of the email, rather than in the body of the email: %%[VAR @firstname SET @firstname = ProperCase(First_Name) ]%% You could render the ProperCase variable in the email: %%=v(@firstname)=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 36. Lowercase You can add an AMPscript function called Lowercase to format all first names into the proper case. If you had a Profile Attribute or Data Extension field called Interest (no space), you would use the Lowercase function: %%=Lowercase(Interest)=%% If you had an Attribute or Data Extension field called Primary Interest (with a space), you must include brackets: %%=Lowercase([Primary Interest ])=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 37. Lowercase If you had a Profile Attribute or Data Extension field called Interest (no space), you would use the Lowercase function. You could define and set the variable at the top of the email, rather than in the body of the email: %%[VAR @interest SET @interest = Lowercase (Interest) ]%% You could render the Lowercase variable in the email: %%=v(@interest)=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 38. Uppercase You can add an AMPscript function called Uppercase to format all first names into the proper case. If you had a Profile Attribute or Data Extension field called Interest (no space), you would use the Uppercase function: %%=Uppercase(Interest)=%% If you had an Attribute or Data Extension field called Primary Interest (with a space), must use brackets: %%=Uppercase([Primary Interest ])=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 39. Uppercase If you had a Profile Attribute or Data Extension field called Interest (no space), you would use the Uppercase function. You could define and set the variable at the top of the email, rather than in the body of the email: %%[ VAR @interest SET @interest = Uppercase (Interest) ]%% You could render the Uppercase variable in the email: %%=v(@interest)=%% ExactTarget Training :: Personalization & Basic AMPscript
  • 40. RedirectTo If you have a Profile Attribute or Data Extension column heading that contains a hyperlink, you can use personalization to populate the hyperlink in the email, including the href attribute. ExactTarget Training :: Personalization & Basic AMPscript
  • 41. RedirectTo However, when declaring and setting hyperlink variables at the top of the email, you must always use RedirectTo function to populate the href attribute in an anchor tag. For example if you declared a hyperlink at the top of the email, when you output the variable in the href, the hyperlink would not work: %%[ VAR @url set @url = "https://pages.exacttarget.com/northern_trail_outfitters/" ]%% <a href="%%=v(@url)=%%">click here</a> Nor can you use RedirectTo function when setting a variable: %%[ VAR @url set @url = RedirectTo("https://pages.exacttarget.com/northern_trail_outfitters/") ]%% ExactTarget Training :: Personalization & Basic AMPscript
  • 42. RedirectTo Instead, you would add the RedirectTo function in the href attribute of an anchor tag: <a href="%%=RedirectTo(@url)=%%">click here</a> ExactTarget Training :: Personalization & Basic AMPscript
  • 44. Commenting AMPscript may contain comments-or non-executed notes-that allow you, as the author, to document your code. You must open comments with the /* sequence and close comments with the */ sequence. Comments may span multiple lines. For example, if we had created this AMPscript: %%[ VAR SET SET SET SET ]%% @promotion, @promodate, @rep @promotion = "Annual Fall Sale" @promodate = "31 October" @rep = "John Doe" @firstname = ProperCase([First Name]) ExactTarget Training :: Personalization & Basic AMPscript
  • 45. Commenting We could mark it up with internal comments: %%[ /*variables we can use in the email*/ VAR @promotion, @promodate, @rep /*change the promotion!*/ SET @promotion = "Annual Fall Sale" /*change the promotion date!*/ SET @promodate = "31 October" /*if needed, change the rep's name!*/ SET @rep = "John Doe" /*this function makes the first name propercase*/ SET @firstname = ProperCase([First Name]) ]%% ExactTarget Training :: Personalization & Basic AMPscript
  • 46. Commenting ExactTarget Training :: Personalization & Basic AMPscript
  • 47. Hide a Content Area with AMPscript We can also hide a Content Area with AMPscript by adding <-- ! --> Hiding the Content Area will still execute the AMPscript. <!-%%[ /*variables we can use in the email*/ VAR @promotion, @promodate, @rep, @firstname /*change the promotion!*/ SET @promotion = "Annual Fall Sale" /*change the promotion date!*/ SET @promodate = "31 October" /*if needed, change the rep's name!*/ SET @rep = "John Doe" /*this function makes the first name propercase*/ SET @firstname = ProperCase([First Name]) ]%% --> ExactTarget Training :: Personalization & Basic AMPscript
  • 48. Hide a Content Area with AMPscript ExactTarget Training :: Personalization & Basic AMPscript
  • 50. Thank You! Kevin Joseph Smith, Sr. Training Coordinator ksmith@DEGdigital.com 913.951.3124 ExactTarget Training :: Personalization & Basic AMPscript
  • 51. Resources AMPscript Overview http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ AMPscript Syntax Guide http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/am pscript_syntax_guide/ AMPscript Functions http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/am pscript_functions/ ExactTarget Training :: Personalization & Basic AMPscript

Editor's Notes

  1. Presentation created by Kevin Joseph Smith (ksmith@DEGdigital.com).
  2. AMPscript is a scripting language that you can embed within HTML emails, text emails, landing pages, and SMS messages.AMPscript can also interact with your data extensions. You can use AMPscript to include information from your data extensions in your messages and to update data extensions with information from your landing pages.http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/
  3. Variable names must begin with the @ symbol and be followed by at least one other letter, number, or underscore. Spaces and commas are not allowed in variable names. http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ampscript_syntax_guide/
  4. String (or text) constant values must be quoted in double or single quotes. String constants can escape the delimiting quote character if they appear within the text by doubling it. Alternative quote characters, such as smart quotes, are not recognized.http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ampscript_syntax_guide/
  5. Numeric constant values consist of an unquoted set of numerals and can also include one decimal point and an introductory minus sign to indicate negative values. Numeric constant values cannot contain commas. Here are some examples:
  6. What if your data is not clean and some subscribers have a first name in shouting caps or lowercase (e.g. JOHN or jill).KJS Verbiage
  7. If you had an Attribute or Data Extension field called First Name (with a space), you must add brackets. %%[@firstname SET @firstname = ProperCase([First Name]) ]%%
  8. If you had an Attribute or Data Extension field called Primary Interest (with a space), you would use the Lowercase function and add brackets. You could define and set the variable at the top of the email, rather than in the body of the email:%%[VAR @interest SET @firstname = Lowercase([Primary Interest]) ]%%
  9. If you had an Attribute or Data Extension field called Primary Interest(with a space), you would use the Uppercase function and add brackets. You could define and set the variable at the top of the email, rather than in the body of the email:%%[ VAR @interest SET @interest = Uppercase([Primary Interest]) ]%%
  10. AMPscript may contain comments-or non-executed notes-that allow you, as the author, to document your code.  You must open comments with the /* sequence and close comments with the */ sequence.  Comments may span multiple lines.http://help.exacttarget.com/en/documentation/exacttarget/content/ampscript/ampscript_syntax_guide/