For the complete documentation index, see llms.txt. This page is also available as Markdown.

ESL (UbiQuity's Scripting Language)

Guide to our scripting language to enable you to customise UbiQuity

Introduction to ESL

The ESL (Scripting Language) is a dynamic scripting language designed to make it easy to customise UbiQuity. You can add ESL pretty much anywhere: email templates, layouts, forms, surveys and events.

  • Reference and re-format fields and questions, write if/then statements, loops and create and reference your own functions - it's a full development language.

This help section is part resource and part tutorial and will help you get started quickly with ESL. The examples below are focused around email but ESL can be used throughout Engage.

Please don't hesitate to contact us for help or to give us feedback and ideas.

An understanding of what comprises ESL

When ESL is used in UbiQuity it lets UbiQuity know that it should process the code on the server and return the correct value before the HTML page is rendered.

The syntax to use will change depending upon what you want UbiQuity to do, but will ultimately fall back to one of the following code examples.

Merge Fields

Merge fields can be inserted throughout UbiQuity and will pull in data specific to each contact. If the field has no value it will return as Null. An example of this is:

Hi [Database.Name], this is an email just for you!

You can learn more about data types and how to format merge fields for more info.

Directives

Double curly braces {{ will represent the opening of a logic sequence, or this is the start of an operation that will determine what will happen next.

Usually these are used for creating different results for different contacts based on a value from a merge field.

Check out our directives documentation for more info.

Functions

A pipe | represents a function in ESL. Functions are pre-rolled sequences of code that make repetitive tasks easier. They are often used for transforming data, such as making text uppercase, or adding two numbers together.

You can use functions inside directives (e.g. in an if statement):

If not used in a directive you can merge the result of a function out onto your page. To do this you'll need to wrap the function in square brackets.

Some ESL options are available as both directives and functions. The benefit of using a function is that they can be nested inside each other, allowing you to perform complex actions. When nesting functions you only need to use the pipes around the outermost function.

In this example the cast function is nested inside the format function so that we can cast a text field as a mobile number field, then format this in a nice way. The result will be merged onto the page.

Check out our functions documentation for more info.

ESL Comments

These are viewable within HTML source code and when in designers (e.g. when creating an email template), but anywhere that creates a personalised version such as in previewing as a contact or in live versions they will be removed.

They are not used very often but allow you to leave notes to users on the UbiQuity interface that will be removed for the version that the user actually sees.

Last updated

Was this helpful?