View Categories

SmartCode In Editor of Email Templates

    Mainflow offers a powerful SmartCode feature that allows you to insert dynamic information into your email templates. With SmartCode, you can personalize emails by automatically pulling relevant details such as subscriber names, user data, and custom fields. This ensures a more engaging and tailored experience for your recipients.

    This guide will walk you through how to effectively use SmartCode in your email templates.

    Smartcode #

    Primary SmartCodes: This group stores the information regarding Contact and Mainflow general information. Such as Contacts, General, and WP User.

    To learn the process of smartcodes, follow the steps with screenshots below-

    First, go to the Email Templates from the Email section of mainflow Navbar, open one of your desired emails, and click the SmartCode button.

    Once you click the button, you will get all the available options for the Smartcodes.

    Primary Smartcodes #

    Contacts #

    CodeDescription
    {{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.company.name}}Company Name
    {{contact.company.industry}}Company Industry
    {{contact.company.address}}Company Address
    {{contact.created_at}}Time of Created Contact

    General #

    CodeDescription
    {{crm.business_name}}Business Name defined in Mainflow Settings
    {{crm.business_address}}Business Address defined in Mainflow Settings
    {{wp.admin_email}}Email Address defined in Mainflow settings
    {{wp.url}}Your Website URL
    {{other.date.+2 days}}Dynamic Date Field. You can replace +2 days with your own date strings. it will return the date (WP Date Format) when parsing the data.
    {{other.date_format.D, d M, Y}}Custom Date Format (Any PHP Date Format)
    {{other.latest_post.title}}Latest Post Tittle (Published)
    ##crm.unsubscribe_url##Web preview URL of an email
    ##crm.manage_subscription_url##Manage the Subscription page URL of the contact
    ##web_preview_url##Web preview URL of an email
    {{crm.unsubscribe_html|Unsubscribe}}This will return an unsubscribe link with HTML code and the link text will be Unsubscribe.
    ‘{{crm.manage_subscription_html|Manage Preference}}Manage Subscription Hyperlink HTML with the link text “Manage Preference”

    WP User #

    CodeDescription
    {{wp_user.display_name}}User’s display name
    {{wp_user.user_login}}User Login (username)
    ## wp_user.password_reset_url ##Password reset URL (as plain text)
    {{wp_user.password_reset_url}}Password reset url (as plain text)
    {{wp_user.meta.META_KEY}}User Meta Data

    Additional Smartcodes #

    Custom Fields #

    In this option, you will get all the SmartCodes based on your CustomFiels that you created in your mainflow.

    For example, here, I have the smartcodes for showcasing the users’ Number, Gender, Login Date, and Descriptions related information based on the Custom Fields i have created before.

    Integrations #

    In this option, you will get all the SmartCodes based on the Plugin Integrations that you integrated with your mainflow.

    Subscribe