fluentcrm merge codes
FluentCRM Merge Codes & Smart Codes
Section titled “FluentCRM Merge Codes & Smart Codes”Syntax
Section titled “Syntax”Merge codes follow this structure:
{{DataGroup.Property|FallbackValue|Transformer}}- DataGroup.Property — the dynamic value (e.g.,
contact.first_name) - FallbackValue — returned if the property is empty (e.g.,
Hi) - Transformer — optional formatting (e.g.,
ucfirst)
In the email editor, type @ to browse available codes.
Contact’s Default Merge Codes
Section titled “Contact’s Default Merge Codes”| Code | Description |
|---|---|
{{contact.full_name}} | Full name of the contact |
{{contact.prefix}} | Name Prefix of the contact |
{{contact.first_name}} | First Name of the contact |
{{contact.last_name}} | Last Name of the contact |
{{contact.email}} | Email address |
{{contact.id}} | Contact’s unique ID (Numeric) |
{{contact.user_id}} | Connected User ID of the contact |
{{contact.address_line_1}} | Address Line 1 |
{{contact.address_line_2}} | Address Line 2 |
{{contact.city}} | Address City |
{{contact.state}} | Address State |
{{contact.postal_code}} | Address Postal Code |
{{contact.country}} | Address Country |
{{contact.phone}} | Phone Number |
{{contact.status}} | Contact’s Status |
{{contact.date_of_birth}} | Date of Birth |
{{contact.custom.CUSTOM_FIELD_SLUG}} | Custom Field value — replace CUSTOM_FIELD_SLUG with your defined slug |
Other General Codes
Section titled “Other General Codes”| Code | Description |
|---|---|
{{crm.business_name}} | Business Name defined in FluentCRM Settings |
{{crm.business_address}} | Business Address defined in FluentCRM Settings |
{{wp.admin_email}} | Email Address defined in WordPress settings |
{{wp.url}} | Your Website URL |
{{other.date.+2 days}} | Dynamic Date Field — replace +2 days with your own date string; returns date in WP Date Format |
{{other.date_format.Y-m-d}} | Current date in a custom format — supports Y-m-d style date formats |
##crm.unsubscribe_url## | Unsubscribe URL of the contact |
##crm.manage_subscription_url## | Manage Subscription page URL of the contact |
##web_preview_url## | Web preview URL of an email |
HTML link codes (pipe separates the code from the link text):
| Code | Description |
|---|---|
{{crm.unsubscribe_html | Unsubscribe}} | Unsubscribe link as HTML — link text will be “Unsubscribe” |
{{crm.manage_subscription_html | Manage Preference}} | Manage Subscription hyperlink as HTML — link text “Manage Preference” |
WP User Codes
Section titled “WP User Codes”If the contact is also a WordPress user, you can use the following merge codes:
| Code | Description |
|---|---|
{{user.ANY_USER_PROPERTY}} | Get any user property from WP_User Class (e.g., user_login, user_first_name) |
{{user.meta.USER_META_KEY}} | Access meta value of a user |
{{user.password_reset_direct_link}} | Direct Password Reset link of a user |
Data Transformers
Section titled “Data Transformers”Using Data Transformers you can transform/format a dynamic value. Transformers are appended as the last segment of a merge code.
Structure: {{DataGroup.Property | FallbackValue | Transformer}}
| Transformer | Example | Description |
|---|---|---|
trim | {{contact.first_name | There | trim}} | Trims leading/trailing whitespace from the value |
ucfirst | {{contact.first_name | There | ucfirst}} | Makes the first letter uppercase |
strtolower | {{contact.first_name | There | strtolower}} | Makes all letters lowercase |
strtoupper | {{contact.first_name | There | strtoupper}} | Makes all letters uppercase |
ucwords | {{contact.full_name | There | ucwords}} | Makes the first letter of each word uppercase |
concat_first | {{contact.first_name | | concat_first | Hello}} | Prepends text — “John” becomes “Hello John” |
concat_last | {{contact.first_last | | concat_last | ,}} | Appends text if value exists — “John” becomes “John,” ; empty returns nothing |
show_if | {{contact.full_name | | show_if | Name exists}} | If the value exists, returns the provided text instead of the value itself |
Note: When no fallback is needed, use an empty value between the pipes:
{{contact.first_name| |ucfirst}}