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.
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?
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.