Message Personalization

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

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

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

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

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"
  } 
}

Last updated