Skip to navigation

Dynamic Content

Dynamic content lets you personalize your notifications with data that changes for each recipient. The left panel of the template editor has four sources of dynamic content.

SourceUse it to
PlaceholdersInsert values from the data payload you send when you trigger a notification.
HandlebarsTransform values and add logic, such as conditions, loops, and date or number formatting.
System VariablesInsert values Fyno already has, such as digest data, user properties, subscription links and Verify OTPs.
ComponentsReuse building blocks, such as headers, footers and PDF attachments, across templates.

Placeholders

Placeholders are replaced with the dynamic data sent in the data payload. Placeholders are denoted by {{ }}.

1

Open the placeholder editor

Click + or Add next to Placeholders in the left panel. The Template Placeholders pop-up opens.

2

Add keys and sample values

In the Form tab, enter a Key and a Sample value for each placeholder. Click Add Key for more rows, or use the delete icon to remove one. Use Search Key to find a placeholder.

You can also switch to the JSON tab and enter all the keys and sample values as JSON.

3

Save

Click Done to save, Cancel to discard your changes, or Reset to start over. Sample values are only used for the preview and for test sends.

4

Use the placeholder in your content

Type the key inside double curly braces wherever you need it, for example Hi {{name}}.

Placeholders are detected automatically

When you add a placeholder in your content using {{ }} and open the placeholder editor, Fyno shows New placeholders detected. Add them here? Click Yes to add them automatically.

To shorten and track URLs in your placeholders, click Configure on the Shorten and track URLs with Fyno Shorty banner. See Fyno Shorty.

Handlebars

Handlebars is a JavaScript library for creating dynamic templates. Handlebars in Fyno support conditional operations, loops, date and time formatting, partial searches and custom helpers.

See Handlebars for the helpers, with examples.

Build Your Own

Under Build Your Own, you can create dynamic logic with custom conditions and loops in two ways:

System Variables

System Variables are pre-defined values in Fyno, so you don’t need to send them in your payload. There are four groups.

If you use the Digest action in your workflow, three variables are available:

VariableWhat it gives you
headThe top 5 payloads in the digest.
tailThe bottom 5 payloads in the digest.
countThe total count of payloads in the digest.

Learn more in Creating a workflow with Digest.

If you use Fyno’s user profiles, all the user properties linked to a user profile are listed here. Learn how to create user properties in Adding a new user property.

To use a user property, add it in this format:

Property typeFormatExample
Built-in property{{$user.$<property>}}{{$user.$name}}
Custom property{{$user.<property>}}{{$user.loyalty_tier}}

Use these variables to let users opt in, opt out or unsubscribe from your notifications.

VariableUse it to
Opt-in/Opt-outAdd to the button payload in WhatsApp templates, so users can opt in to or out of your WhatsApp notifications.
UnsubscribeAdd a clickable unsubscribe link to your notification, usually in the footer of email templates.

Fyno Verify is a fully managed API for multichannel user verification by OTP or link. To set it up, click Configure under Verify.

VariableUse it to
OTPGenerate and verify an OTP.
LinkVerify an email address or mobile number using a link.

Components

Components are modular, reusable elements, such as headers, footers and PDF attachments. Create them once, then add them to any template. Click + next to Components to create one, or select an existing one to insert it.

Components are currently available only for email templates.

Learn more in Components.