LiquidJS Template Variables

RCS Studio uses LiquidJS to make your messages dynamic. Any string input field in the builder supports Liquid syntax — that includes message text, card titles, descriptions, button labels, URLs, and more. Anywhere you can type, you can use template variables.

There are several types of variables available depending on how your agent is configured:

VariableWhat it gives youExample
paramsParameters you pass in via the API or postback data{{ params.firstName }}
dataResults from connector operations{{ data.orderLookup.status }}
inputThe user's most recent message or action{{ input.text }}
userInformation about the end user{{ user.msisdn }}

params

These are parameters you provide — either through an API request body or from a user's button tap postback data. They're the most common way to inject dynamic content into your templates.

Hello {{ params.firstName }}!

Your order #{{ params.orderId }} is {{ params.status }}.

You can also pass nested objects and access them with dot notation:

{{ params.address.city }}, {{ params.address.state }}

data

When your agent uses connectors to fetch external data (like looking up an order or calling a weather API), the results are stored in data under the context key you configure in the operation.

{% if data.orderLookup.status == "shipped" %}
  Your order shipped on {{ data.orderLookup.shipDate | date_format: "MMMM D, YYYY" }}.
{% else %}
  Your order is being prepared.
{% endif %}

input

This gives you access to whatever the user just sent — whether they typed a message, tapped a button, shared their location, or sent a file.

FieldWhat it contains
input.textWhat the user typed, or the label of the button they tapped
input.locationLocation coordinates if the user shared their location
input.fileFile metadata if the user sent a file
You said: {{ input.text }}

user

Information about the end user interacting with your agent.

FieldWhat it contains
user.msisdnThe user's phone number in E.164 format (e.g. +15551234567)

Examples

Personalized greeting

Hi {{ params.firstName }}, welcome to {{ params.brandName }}!

Conditional content based on connector data

{% if data.weather.temp > 80 %}
  It's {{ data.weather.temp }}°F — stay cool!
{% else %}
  It's {{ data.weather.temp }}°F — have a great day!
{% endif %}

Echoing user input

You said: {{ input.text }}. Let me look that up for you.