Identifying a file's Client Template in Liquid


I’d like to show some conditional questions within a custom Liquid Template, that is dependent on the Client Template selected within Edit Client > Configuration.

Is it possible to report on this value within liquid? Alternatively, is it possible to report on what workflows exist within a client file in liquid?

Many thanks

Hi Joe,

Thanks for your question.

You may find this link useful: company

Could you please give me a use case example of the value you are trying to report on to help me understand your question a little better?

Thanks! :slight_smile:

Hi @Kalpna_Dhokia,

Thanks for your response. I’ve checked the provided resource, though unfortunately I can’t see this listed as an option, but it would be good to clarify if this is possible or not!

An example use-case is having a checklist liquid template with a question regarding the completeness of our corporation tax work or a director’s loan account schedule. If the Client Template = Sole Trader, we wouldn’t want to ask this question, since the sole trader would not be chargeable to corporation tax and would not have a director’s loan account.

Another example use-case is linking the user to the General Settings document within the accounts production workflow. There are multiple versions of the General Settings document, so the code we would want to provide for redirection would be dependent on which General Settings document is in use - FRS105, FRS102, Unincorporated…

All of our Client Templates reflect the entity type to help determine how to treat these redirects & questions, so I’m hoping we can return this in liquid for an {% if company.client_template == "Sole Trader" %}-style statement.

If we can’t return the Client Template, I think we could fall-back to returning the existence of a workflow because i.e. if we know the client is using the FRS102 Accounts Production workflow, then we know they must be incorporated…

Hopefully this helps with understanding the question a little more!

Kind regards

Hi @jhanley

It is possible to check, which templates are added to the Company (currently, we cannot check added workflows).

Below code checks which “General Settings” template is in use & set of accounts applicable, and redirects to “General Settings” template:

{% if period.reconciliations.soletrader_general_settings != blank %}
  {% assign general_info_handle = "soletrader_general_settings" %}
  {% comment %}Unincorporated sets{% endcomment %}
  {% assign unincorporated_set = true %}
  {% comment %}Sole Trader accounts{% endcomment %}
  {% if period.reconciliations.soletrader_general_settings.results.legal_form == "soletrader" %}
    {% assign soletrader = true %}
  {% endif %}
  {% comment %}Partnership accounts{% endcomment %}
  {% if period.reconciliations.soletrader_general_settings.results.legal_form == "partnership" %}
    {% assign partnership = true %}
  {% endif %}

{% elsif period.reconciliations.general_info != blank %}
  {% assign general_info_handle = "general_info" %}
  {% comment %}applicable for llp / frs102 1a / frs102 sets{% endcomment %}
  {% if period.reconciliations.general_info.results.package == "llp" %}
    {% assign llp_set = true %}
  {% endif %}

  {% if period.reconciliations.general_info.results.package == "frs102" %}
    {% assign frs102_set = true %}
  {% endif %}
  {% if period.reconciliations.general_info.results.selected_type_of_accounts == "frs102" %}
    {% assign frs102_applicable = true %}
  {% endif %}
  {% if period.reconciliations.general_info.results.selected_type_of_accounts == "frs102_1a" %}
    {% assign frs102_1a_applicable = true %}
  {% endif %}
{% elsif period.reconciliations.frs105_general_info != blank %}
  {% assign general_info_handle = "frs105_general_info" %}
  {% comment %}frs105 set only{% endcomment %}
  {% assign frs105_set = true %}

{% endif %}

**Redirection to "General settings template"**

{% linkto period.reconciliations.[general_info_handle] %}aaa{{ period.reconciliations.[general_info_handle].name }}{% endlinkto %}

Please let us know if above code helps.

Kind regards

Hi @Jelena_Sutova

Thank you for this detailed response. I can see the way the logic is working here, and this was able to provide a redirect onto the appropriate General Settings as expected.

Kind regards

Hi @Jelena_Sutova,

Thanks for your support in providing a solution to this query. I’ve since been able to follow a similar approach to navigate users onto the Accounts Overview document!

Since using this in live, we’ve noticed that the code will redirect the user onto archived unincorporated workflows if one exists, instead of the ‘live’ FRS102 workflow. Is there any way the code can be adapted to ignore archived workflows?

Many thanks

Hi @jhanley

Currently, it cannot be checked if the template belongs to an archived workflow.

Please let me know the reason why one workflow is archived. If workflow was not in use for any of the periods, archived workflow can be deleted.