====== How can elements of an email be personalized? ====== **Placeholders** are available for commonly used personalization like salutations. They can be easily selected by means of a button. Personalizations that will only be used once can also be integrated via **XML**. We recommend this option in cases where defining a new placeholder would not be worthwhile or if you want to replace entire sections of your source code. ===== Placeholders ===== Pre-defined placeholders are available to integrate personalized content, such as a salutation or a current date, into an email message. Placeholders always begin with a dollar sign $. A placeholder must be followed by a space or punctuation mark (e.g., comma, full stop, question mark, exclamation point) to be parsed correctly. There are three types of placeholders. ==== Placeholder types ==== === Functions === These placeholders are generally defined by complex functions with a fallback. For example, this is the case with all salutation placeholders, ensuring that recipients whose names are not known are also addressed properly. Some examples of globally available function placeholders: * **$current_weekday_en**: Current weekday, e.g., "Tuesday" * **$salutation_en_formal**: Male: Dear Mr. NAME, Female: Dear Ms. NAME, Fallback: Dear Sir or Madam, * **$salutation_en_firstname**: Dear VORNAME, Fallback: Dear Reader, * **$salutation_en_firstname_name**: Dear VORNAME NAME, Fallback: Dear Reader, Haven’t found any that fulfill your requirements? If you need placeholders with specific functions, please contact our support team. We will set them up according to your needs. === Fields === These placeholders are the names of the master data fields available in your client. For example, you can use your recipients’ mailing data as a means of personalization: //$mail, $name, $plz, $ort// === Statistics === These placeholders are frequently used, predefined blocks of text. With these, you can insert a reference to the online version (//$htmlVersion//) or a link to Facebook (//$socialLinkFacebook//) in the header of your email or elsewhere. ==== Where can I find the placeholders? ==== You can select all placeholders via a drop-down menu. Depending on the editor/email template you’re using, you can find the placeholders here in your email’s editing view: === In an individually defined template or E-Mail Builder, you can find them when editing single lines of text === {{:en:personalisation_editornew_singleline.png?nolink&400|}} === In an individually defined template or E-Mail Builder, you can find them when editing sections of text === {{:en:personalisation_editornew_multiline.png?nolink&400|}} === In the default editor (HTML/Text multipart or Text) === {{:en:delivery_drafts_creatives_placeholder_multi.png?nolink&400|}} ==== Other variables ==== Other variable content that can be used in emails - according to the "possible applications" mentioned further below: | $from_address | Sender’s address | | $redirect_domain | Redirect your sender’s domain | | $newsletterName | Name of the newsletter the message is associated with | | $newsletterId | ID of the newsletter the message is associated with | | $campaignId (in links only: $camp_id) | ID of the campaign the message is set up in | | $lid | ID of message | | $id (or: $user_id) | unique ID of recipient | ===== XML Syntax ===== Using XML syntax, you can integrate personalized elements directly into an email’s source code. In addition to personalized salutations, this allows you to replace entire sections of the source code, meaning you can, for example, display different articles depending on the recipients’ age. ==== Short documentation ==== {!-- : Beginning of personalized content //--} : End of personalized content ... : if loop ... : else/if loop ... : fallback ... : definition of condition ... : output All master data fields defined in your client can be used as a - for example, mail, vorname (first name), name, gender, birthday. All of the usual comparison operators are allowed. You cannot nest multiple loops using this code. Instead, a placeholder should be defined for more complex tasks. ==== Examples ==== {!--name!="" AND gender=2Dear Ms $name!name!="" AND gender=1Dear Mr $name!Dear ABC Newsletter readers!//--} {!--gender=2 AND name!=""Dear Ms $name - have you bought any jewelery today?gender=1 AND name!=""Dear Mr $name - have you bought any watches today?Dear readers - have you seen our top offer of the day?//--} Do not use line breaks in XML, especially not in subject lines! Line breaks are displayed as spaces. ===== Possible applications ===== Placeholders and XML syntax can be used in the following sections of an email: * HTML source code * TXT section * Template editors [change into source code view when using XML!] Depending on the placeholder’s type, you can also use personalization in subject lines, sender names, and inside links: | Subject line | Functions, fields, variables, and XML (not in network campaigns!) | | Links | Fields, $newsletterId, $camp_id, $salutation_de_gender, $date_de, $date_en | | Sender name | Functions, fields, and variables | Placeholders in links are replaced by the actual content at the moment of clicking. This allows security-relevant data to be "hidden", e.g., to pre-fill forms on landing pages or connect with a website tracking software. We recommend testing your email’s personalization by sending test emails! For technical reasons, some variables are not visible in the promio.connect preview. {{tag>emails personalizations placeholders }}