JRNI Developer Documentation

The JRNI Developer Hub

Welcome to the JRNI developer hub.

Drops Reference Guide

A guide to Liquid Drops

Welcome to the JRNI Liquid template reference docs.

JRNI Liquid Templates are based on Shopify's Liquid templating platform. They are a way of creating dynamic template contents that can be rendered into a number of different forms on the server.

We use these to create things such as:

  • Emails and SMS
  • PDFs
  • Custom web pages
  • Icals
  • Custom export web hook data
  • CSV Reports

They are extremely flexible, and all major JRNI data objects are represented, as well as most extensible properties. For a basic introduction to Liquid see these helpful guides:

🚧

These docs refer to JRNI Liquid Templates V4 and onwards

If you are not sure what version of Liquid Templates your platform is configured to - please contact your JRNI representative who can help configure this for you

Drop Types

Liquid templates work by using 'Drops' to represent different objects with properties in the system, One drop and link to another drop

There are many different types of Drops:

Using Drops in an email

There are certain standard fields that are generally available in emails. Although these do vary by email, the most common emails that customers need to customers relate to a booking, and as such the standard objects that are give in in the templates are:

  • total - A Representation of an Order Drop
  • company - The company the booking related to - as a Company Drop
  • extra_data - A set of useful extra data that will depend on the email type as an ExtraData Drop

It is then common to pull out some standard drop to make sure you get the right data for the email. For many customer who are just using single appointment and do not need the full complexity of baskets, it is useful to have the following at the top of your email or sms:

{% assign booking = total.printable_items[0].all_spaces.first %}
{% assign slot = space.slot %} 
{% assign client = total.client%}

This gives you:

New Triggers

Some clients may be using the newer more powerful 'triggers'. This comms allow a much more dynamic setup of emails, sms and other communcations methods for clients and staff. There is a new extra object here, because the emails are not always directed to the person who is the subect of the email (such as additonal staff, or additional attendees)

Other useful Tags

There are a few other useful tags that might help you

Getting the host name

If you need to know the host name, it's generally a bad idea to hard code it in your template. There are two ways to get it:

  • {{company.host}} - valid if you have have a company drop
  • {{get_domain}} - always returns the current host domain

Customer Filters

There are multiple custom filters that can help you, some are available in all templates

Date formatting

One of the most common question is how to best format dates. Most dates are formattable as standard strftime formatted strings, however some dates in the system are passed as proper dates, and some are passed as already rendered string - which means than re-parsing them back into a date format - may mean a loss of timezone and/or daylight saving, which can cause client confusing

{{slot.datetime | date:"%A %e %B %Y"}}
{{slot.datetime | date:"%I:%M%p"}} - {{slot.end_datetime | date:"%I:%M%p"}}

Updated 6 months ago

Drops Reference Guide


A guide to Liquid Drops

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.