Personalizing your emails significantly increases engagement. In Webmecanik Automation, you can dynamically customize your content by automatically inserting contact or company details (first name, last name, city, etc.) directly into the body of your messages.
π οΈ Understanding Basic Syntax
Variables follow a standard format:
{contactfield=alias}. Replace alias with the actual alias of your contact or company field.To find a field's alias:
- Click the gear icon in the top right corner.
- Go to Custom Fields.
- Check the right column next to the field name to find its alias (note that an alias can only be customized when creating a new field).
π Inserting a Variable into Your Email
Adding a variable is simple and supported by built-in autocompletion:
- Go to Channels > Emails and create or edit an email.
- Open the Builder.
- Edit a text section and type an opening curly bracket
{followed by the field alias (e.g.,{contactfield=firstname}). - The autocompletion dropdown menu will appear automatically. Select the variable you want to insert.
π‘οΈ Handling Empty Fields (Default Text)
If a contact is missing information for a specific field (e.g., no first name on record), you have two options:
- Leave it as is: The variable will simply disappear upon sending, leaving no blank space.
- Add default fallback text: You can define default text using the pipe symbol
|.
π Example:
{contactfield=firstname|Valued Customer} displays the contact's first name if available, or "Valued Customer" if the field is empty in your database.π Select Lists and Booleans: Technical Values vs. Labels
Sometimes, raw database values for select list or boolean fields are technical codes that are not suitable for end customers. In Webmecanik Automation, you can choose to display either the field value or its human-readable label.
Contact Fields
- Display technical value:
{contactfield=select_alias}or{contactfield=bool_alias} - Display user-friendly label:
{contactfield=select_alias|label}or{contactfield=bool_alias|label}
Company Fields
- Display technical value:
{contactfield=company_select_alias}or{contactfield=company_bool_alias} - Display user-friendly label:
{contactfield=company_select_alias|label}or{contactfield=company_bool_alias|label}
π Linking to Landing Pages and Downloadable Assets
Variables can also generate dynamic links to your hosted content. Autocompletion helps you pick from available items:
- Landing Pages: Use
{pagelink=ID}(replaceIDwith your page ID). You can insert it as plain text (it converts into the page title) or place it directly into the Link setting of a button. - Assets: Use
{assetlink=ID}(replaceIDwith your asset ID) to link to uploaded files. In the variable selection menu, asset links are prefixed witha:.
ποΈ Testing Your Variables Before Sending
To make sure your variables render correctly before launching a campaign:
- Open the preview section of your email.
- Search for a specific contact using the Show preview for contact search bar located under the preview area.
- Select the contact. The preview URL updates dynamically with the contact's ID (e.g.,
?contactId=110), allowing you to inspect the exact rendered email your recipient will receive.
Comments
0 comments
Please sign in to leave a comment.