Documentation
APICreate a Ticket
  • πŸ“”Documentation Guide
  • πŸ“¨Data & Engagement Platform
    • Data Model
      • Customer Data
      • Product Catalogue
      • Events
        • Onsite Events
        • Outbound Events
        • Transactions
    • App User Management
      • User Roles
      • App Users
    • Data Management
      • Data Management with API
      • Data Management with Data Feeds
        • Users
          • Import Users
          • Update or Delete a User Trait via File Upload
          • List of Standard User Traits/Attributes
        • Products
        • Events
          • Import Orders
          • Import Events
          • List of Events and Properties
      • Data Export
    • Web Tracking
      • Web Tracking v1 (Legacy)
        • Setup
        • Set up business Units
        • Tracking User Behavior
          • Identify Method
          • Page Method
          • Track Method
          • Opt-Out from Tracking
        • Testing & Debugging
      • Web Tracking v2
        • Setup using Google Tag Manager
        • Setup without a Tag Manager
        • Configuration & Config Commands
        • Tracking User Behavior
          • Identify Method
          • Update Method
          • Page Method
          • Track Method
          • Opt-Out from Tracking
        • Testing & Debugging
      • Migrate Tracking SDK v1 -> v2
      • Mobile Web Tracking
    • User Segmentation
      • Creating a Segment
      • Conditions
      • Combining Segments
    • Messages
      • Frequency Capping
      • Templates
        • Template Builder
      • Integrations
        • Channels
          • SMS
            • Twilio
              • Set up a Twilio Account
              • Set up Twilio Integration
              • Create a Campaign Message
            • Link Mobility
              • Set Up Link Mobility Account
              • Set up Link Mobility Integration
              • Create a Campaign Message
          • SFTP
            • Set up SFTP Integration
            • Create a Campaign Message
          • Direct Mail
            • Optilyz
              • Set up Optilyz Integration
              • Create a Campaign Message
          • Webhooks
            • Single Webhook
              • Set up Webhook Integration
              • Create a Campaign Message
              • Response Data and Custom Events
            • Batch Webhook
              • Set up Batch Webhook Integration
              • Create a Campaign Message
            • Zenloop via CrossEngage Webhook
              • Set up Zenloop Integration (via CrossEngage Webhook)
              • Set up Zenloop Survey
              • Create a Campaign Message
              • Set up Zenloop Survey via ESP
              • Obtain Response Data
            • Google Analytics via Webhook
          • Segment Transfer
            • Facebook
              • Set up Facebook Developer Account
            • Optimizely
              • Set up Optimizely Account
            • Google Analytics
              • Set up Google Analytics Integration
              • Create a Campaign with Google Analytics
              • Using the Google Analytics Integration
            • Airship
              • Set up an Airship Account
              • Set up an Airship Integration
              • Create a Campaign Message with Airship
          • Onsite Display
            • Trbo
              • Set up Trbo Integration
              • Create a Campaign Message in CrossEngage
              • Configure Campaign Message in Trbo
              • Obtain Response Data
          • Email
            • Mailjet
              • Set up Mailjet Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Message
              • Personalize Preview Texts in Mailjet
            • Mandrill (by MailChimp)
              • Set up Mandrill Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Messege
            • Inxmail
              • Set up Inxmail Integration
              • Create a Campaign Message
            • Sendgrid (by Twilio)
              • Set up SendGrid Integration
              • Obtain Response Data via Webhook
              • Create a Campaign Message
            • Mailgun
              • Set up Mailgun Integration
              • Obtain Response Data via Webhooks
              • Create a Campaign Message with Mailgun
            • Episerver (Optimizely)
              • Set up Episerver Integration
              • Create a Campaign Message with Episerver
          • Push Notifications
            • Airship
              • Set up an Airship Account
              • Set up an Airship Integration
              • Create a Campaign Message with Airship
        • Attachments
        • Delete an Integration
      • Personalization
        • Import Data
          • User Profile Data
          • Campaign Data
          • Cart Data
        • Formatting Functions
          • Date Formatting
          • Number Formatting
          • String Formatting
          • Hash Functions
        • General Helper Functions
          • Conditional Functions
          • Filtering Arrays
        • Product Helper Functions
          • Fetch from Product Feed
          • Fetch from Tracking Event
          • Fetch from User Journey
        • Misc. Helper Functions
          • Voucher Helper Function
            • Vouchers: Use Case
          • Event Helper Functions
          • Opt Out Helper Functions
        • Operators
      • Vouchers
        • Creating Vouchers
        • Using Vouchers
    • Campaign Management
      • Campaigns
        • Create an Audience Campaign
        • Create a Real-Time Campaign
        • Control Group
      • Stories
        • Building a Story
        • Use Case: Welcome Story
      • Segment Transfer
        • Create a Segment Transfer Campaign
    • Consent Management
      • Subscription/Consent Management
      • System Opt-Out/Opt-In
      • System Blacklist/Whitelist
    • Prediction Models
      • Create a new Model
      • Feature Engineering
      • SQL Filter
    • System Monitoring
      • Dashboard
        • Segment Tracker
      • Events Overview
      • Activity Log
      • Slack Notifications
        • Setting up Slack Notifications
    • Help & Support
      • System Status
      • Reach out to Customer Support
      • Suggest an Improvement
      • Privacy Policy
    • Glossary - Data & Engagement
  • πŸ“ˆPredictions Platform
    • Data Model
      • Customer Data
      • Transactions
      • Activities
    • Overview
      • Data Tab
        • Data Tables in the Predictions Platform
      • Insights Tab
      • Model Builder Tab
        • Feature Engineering
        • Custom SQL Filter
        • Model Report
      • Prediction Tab
      • Selections Tab
    • Tutorials
      • Prepare and Validate Data
      • Analyze RFM Customers
      • Create a new Model
      • Predict Campaign Profit
    • Glossary - Predictions
Powered by GitBook
On this page
  • With CrossEngage Templates
  • With External Templates
  • Which data can be accessed with Handlebars?
  • Helper Functions
  1. Data & Engagement Platform
  2. Messages

Personalization

PreviousDelete an IntegrationNextImport Data

Last updated 3 months ago

Handlebars is a popular Javascript framkework for personalising content and building reusable HTML template blocks. CrossEngage uses HandleBars to allow you to easily personalise content by allowing you to access user attributes, event data, voucher data or product information within messages.

Read more about the HandleBars framework and its built-in helpers .

With CrossEngage Templates

When creating a template in CrossEngage, you can type HandleBars syntax directly within your template and CrossEngage will render it upon dispatch. For example:

Hello {{user.[traits.firstName]}}, how are you doing today?

This will render the template upon message dispatch as follows:

Hello Sarah, how are you doing today?

Please note that all attributes/properties in Handlebars are written in camelCase. This means that the first word is written entirely lowercase, while subsequent words start with an Uppercase character, without any space or separator e.g 'firstName' or 'optOutLink'.

During message dispatch, CrossEngage will now automatically render the first name of each user that will receive the message.

Handlebars HTML-escapes the equals sign. If your Handlebar includes an equals sign, use three curly brackets on each side to prevent escape. For emaple, if β€˜traits.favouriteProduct' has a value of "123cacdsf=asd", you can use it as {{{traits.favouriteProduct}}}

With External Templates

When using Third-Party Integrations for your messages, it is often possible to use Templates from the Integration Provider, such as Mailjet or SendGrid. To use an External Template, you can add Placeholders to the Template and fill in the value later, using Handlebars or Value Mapping.

The syntax for placeholders is defined by each integration. For example, in SendGrid, the placeholder can be used by wrapping it in % sign:

<div>
    <p>Hi %FIRSTNAME%.</p>
</div>

Always use descriptive names for placeholders, as it will make it easier to recognise and use the correct Handlebars for the placeholders.

For External Templates, CrossEngage allows you to map Values on Placeholders, with or without Handlebars.

To use a Handlebar expression for Value Mapping, select the "Handlebars" option, write the Handlebar expression, and provide the Placeholder.

To use an Attribute for Value Mapping, select the "Attributes" option, choose the attribute from the list and provide the Placeholder.

Which data can be accessed with Handlebars?

Handlebars can pull data from Users, Events and Products. You can find more details in each relevent section, under Helper Functions.

Helper Functions

Vouchers can also be used in CrossEngage using Handlebars. For more details, please click .

Helper Functions are simple Javascript functions, that can be used inside Handlebars. They can retrieve and process data from the databases, and format it for messages. Helper functions can also perform some specialized tasks, for example, you can add an "Unsubscribe" link in your messages using the .

πŸ“¨
here
here
Opt Out Helper Function