Liquid Object Reference (Report 'globals' but for themes & email templates)

Requesting a list of liquid objects that can be used within Manager, in the varying situations that liquid syntax is available to us.

The Problem

It is unclear which liquid objects are available, particularly for email templates.

For an invoice template (theme), we can check the example theme for a list of variables:

  • fields
  • business
  • recipient
  • etc.

For an email template, it is complete guesswork and likely different for each email template.

Sales Invoice email template:

  • reference
  • recipient
  • … anything else?

Customer Statement email template:

  • recipient
  • … anything else?

The Solution

I would like to request - as an idea/feature - some way for us to see a list of all top-level liquid objects that can be used in a theme or template. This could be solved in one of many ways:

  • A list of all current objects on a guide page or in a forum post (which can quickly be outdated)
  • An API endpoint which lists all currently-available objects (theoretically this would always be accurate as it’s generated directly from the code)
  • Have a top-level liquid object (e.g. ‘objects’ or ‘liquid’) that is an array of available objects. This way we can do a {% for object in objects %} to discover what is available for use.

The last two options above are self-documenting, but require a code change to implement. The first option is simpler to do short-term, but could become outdated with application updates. Any of them would be useful, however.

Why is this useful?

  • Those of us that are creating invoice themes or email templates know what tools are at our disposal when trying to achieve a certain result.
  • Those of us assisting others in this forum can more readily provide a solution that works (for themes/templates), or at the very least clearly state that something is not yet possible… with confidence that there isn’t a hidden liquid object we don’t know about that would help.
1 Like

You have been away just a bit too long to miss this :grin:

Using report transformations, {{ globals }} should list most objects

and this

{% for i in arr_globals %}
{% unless i contains "business" or contains "report" %}
{{ [i] | first | fields }}
{% endunless %}
{% endfor %}

Should give all fields for most objects

1 Like

That looks amazing, and potentially a path towards a solution!

However, it looks like this is not currently available for invoice themes or email templates. It’s only working as part of the Report Transformations feature.

Having {{ globals }} also work for themes and email templates will definitely solve this issue.

I have added to the topic title, so that it is more descriptive and takes into account that this feature currently exists for report transformations only.

I tried to create a new report transformation and added {{ globals }} as in screenshot below, but it does not list anything in view, what am I missing here?

Report Transformations was changed from a purely script based platform to a no-code platform.
{{ globals }} used to work in the script based platform.

I haven’t looked but this type of access is likely to require an “Extension” in Manager’s current implementation.

Oh yes, I had forgotten about that. So how do we get the global variables and detailed ones if this is no longer a possibility?

at present I do not know an alternate way to get them.

Any news on email templates guides or field references…

This is a huge part of the system not having a “Documented” way to reference fields on emails is frustrating…

We are not Software engineers we are bussiness owners and accountants and clerks, using this software…

The fact that this topic is still in ideas means nothing has happened. Any change will be announced here.

1 Like

Not a very a helpfull answer… But thanks.

You asked if there was any news. I answered your question and provided additional information on where you could find future updates. If you have further questions, please ask; I’m sure someone will try to help. But if you don’t tell us what you want to know, no one can.

I would like to once again reiterate my strong interest in this feature.

Currently attempting to edit an email template and I have no idea what fields are available to me. It’s complete guesswork.

Some kind of reference, whether it be directly on the page when editing an email template, or if it’s a variable that we can iterate over, would be immensely useful.

5 Likes