Documentation
Website
  • Getting Started
  • Customer Journey
    • Creating a Customer Journey
    • Understanding the Journey
    • Performance Dashboard
    • Pre-built Templates
  • Cross-Channel Messages
    • Mobile Push
    • Web Push
    • In-App Message
    • SMS/LMS
    • Webhook
  • Data Integration
    • User ID
    • Events
    • Tags
    • Integrating Amplitude
    • Integrating Mixpanel
  • Audience
    • Segments
    • Device Management
  • Engagement Tools
    • Message Personalization
    • Template
  • Analytics & Insights
    • Dashboard
    • Real-time Analytics
  • Guide for Developers
    • Mobile SDK Setup
      • Android SDK Setup
      • iOS SDK Setup
      • React Native SDK Setup
      • Flutter SDK Setup
      • Additional Setup
        • Android: FCM Setup (v1)
        • Android: Notification Icons
        • iOS: APNS Setup
        • iOS: Disable Swizzling
    • Web SDK Setup
    • REST API Reference
    • Mobile SDK Reference
    • Web SDK Reference
Powered by GitBook
On this page
  • Message Personalization using Variables
  • Using Variables
  • Assigning User ID as a Variable
  • Assigning Tags as Variables
  • Assigning External Data as Variables
  1. Engagement Tools

Message Personalization

PreviousEngagement ToolsNextTemplate

Last updated 9 months ago

Personalized messages have higher click rates than general messages. A common example is inserting a customer's name in the message.

Message Personalization using Variables

Variables allow you to personalize messages by automatically replacing it with specific data for each customer.

For example, if you include {{ userName }}in your text message, the customer's name will be substituted when the message is sent.

Make sure to Integrate Custom Data in collaboration with developers before you begin personalizing the messages.

Using Variables

You can insert variables in between a pair of curly brackets {{ }}. You can add a default value, which will be used in case the variable is unknown. Separate the variable and the default value by using two vertical lines ||.

If you assign userName as the variable and there as the default value, it will look like this:

Hey {{ userName || there }}

In case the variable is known ("Monica"), actual message will look like this:

Hey Monica

In case the variable is unknown, actual message will look like this:

Hey there

Assigning User ID as a Variable

Assign userID as the variable and the device's User ID will be automatically matched.

Input

Hey {{ userId || there }}, the product you ordered has been shipped.

Output

Hey flare112, the product you ordered has been shipped.

Assigning Tags as Variables

Assign the variable that begins with tag. and the device's tag will be automatically matched.

Input

The {{ tags.productName || product }} you ordered has been shipped.

Output

The air purifier for home you ordered has been shipped.

Assigning External Data as Variables

If you haven't implemented custom data but still want to personalize the message, you can use FlareLane API to send the message.

Simply add a data parameter in the API when sending the message, and the recipient will receive a personalized message with relevant information.

You will need the assistance of developers for this.

POST https://api.flarelane.com/v1/projects/<project-id>/notifications
{
  targetType: userId,
  targetIds: "USER_ID",
  body: "{{ writerName || Other customer }} likes your posting."
  data: {
    writerName: "Monica"
  } 
}

is an unique identifier you have assigned to your app or website users.

are a form of metadata that you can add to your customers, such as name, gender or VIP status.

User ID
Tags