This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | %%=TreatAsContent(ContentBlockByKey('DynamicFromName'))=%% | |
| %%=TreatAsContent(ContentBlockByKey('DynamicFromEmail'))=%% | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | %%[ | |
| /** | |
| * Dynamic From Email Logic | |
| * Use subscribers [language] preference from the entry DE to pull back dynamic fromEmail from the content DE. | |
| */ | |
| SET @language = AttributeValue("language") | |
| SET @fromEmail = Lookup("ENT.04_DynamicSenderProfile_Content","fromEmail","language", @language) | |
| ]%%%%=v(@fromEmail)=%% | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | %%[ | |
| /** | |
| * Dynamic From Name Logic | |
| * Use subscribers [language] preference from the entry DE to pull back dynamic fromName from the content DE. | |
| */ | |
| SET @language = AttributeValue("language") | |
| SET @fromName = Lookup("ENT.04_DynamicSenderProfile_Content","fromName","language", @language) | |
| ]%%%%=v(@fromName)=%% | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?xml version='1.0' encoding='UTF-8'?> | |
| <catalog> | |
| <book> | |
| <id>001</id> | |
| <author>Liu Cixin</author> | |
| <title>The Three-Body Problem</title> | |
| <genre>Science Fiction</genre> | |
| </book> | |
| <book> | |
| <id>002</id> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Looping Through XML Payload Data Demo | |
| * This example consumes the XML payload that's stored in the [XML] field. | |
| * This example loops through all <book> nodes and renders book details in the email. | |
| * This example uses RaiseError() when there is no xml payload data to parse. | |
| * This example uses RaiseError() when there are no <book> in the xml payload. | |
| */ | |
| SET @XML = [XML] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Basic Subscriber Variables | |
| * Subscriber details from the sendable DE. | |
| */ | |
| SET @email_address = [email_address] | |
| SET @language = [language] | |
| SET @first_name = AttributeValue("first_name") | |
| IF EMPTY(@first_name) THEN | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Format Number Logic | |
| * Formats a specified string as a number value for a specified format or locale. | |
| */ | |
| VAR @number, @currency_english, @currency_french, @decimal, @fixed, @percent, @general | |
| SET @number = "199" | |
| SET @currency_english = FormatNumber(@number, "C", "en-us") | |
| SET @currency_french = FormatNumber(@number, "C", "fr-fr") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Format Date Logic | |
| * Formats a specified string as a date value for a specified format and locale. | |
| */ | |
| VAR @date, @date_english, @date_spanish, @date_french, @date_chinese | |
| SET @date = "2012-10-05 03:30:34.567890" | |
| SET @date_english = FormatDate(@date, "l", "HH:MM tt", "en-us") | |
| SET @date_spanish = FormatDate(@date, "l", "HH:MM tt", "es-mx") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Format Currency Logic | |
| * Formats a specified string as a currency value for a specified format and locale. | |
| */ | |
| VAR @price, @price_usa, @price_mexico, @price_france, @price_canada, @price_china | |
| SET @price = "199.99" | |
| SET @price_usa = FormatCurrency(@price, "en-us") | |
| SET @price_mexico = FormatCurrency(@price, "es-mx") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!-- Example Code --> | |
| %%[ | |
| /** | |
| * Format Logic | |
| * This function formats a string into a specified format pattern and locale. | |
| * Use this function for date and time formatting that requires a locale. | |
| */ | |
| VAR @date, @long_date_english, @long_date_spanish, @short_date_english, @short_date_spanish, @full_long_date_english, @full_long_date_spanish, @full_short_date_english, @full_short_date_spanish, @general_long_date_english, @general_long_date_spanish, @general_short_date_english, @general_short_date_spanish | |
| SET @date = "2012-10-05 03:30:34.567890" | |
| SET @long_date_english = Format(@date,"D", "Date", "en-us") | 
NewerOlder