Category

How to Create Multilingual Canned Responses Using Liquid Syntax

Updated:

By using Liquid conditional statements with ticket.requester.language, you can create multilingual canned responses that dynamically display language-specific content from a single template. This approach reduces template maintenance, improves consistency, and simplifies support for multilingual customers while still allowing full control over the content shown for each language.

BoldDesk supports Liquid syntax in canned responses, enabling dynamic content and conditional logic within a single template. By using Liquid control structures such as {% if %}, {% else %}, and {% endif %}, you can display different content based on the requester’s preferred language (ticket.requester.language).

Use Case: If your support team serves customers in multiple languages, you can use a single canned response to automatically display the appropriate language based on the requester’s profile. For example, a customer whose language is set to German can receive a German response, while an English-speaking customer receives the English version, helping agents provide localized support without maintaining separate canned response templates for each language.

Using a single canned response does not automatically translate the content. You must manually add and maintain the content for each supported language within the template.

Benefits of a Multilingual Canned Response

  • Maintain a single canned response for multiple languages.
  • Reduce template duplication and ongoing maintenance.
  • Ensure a consistent response structure across languages.
  • Simplify future updates by centralizing content management.
  • Automatically display the appropriate language based on the requester’s language setting.

Prerequisites

Before configuring a multilingual canned response:

How It Works

When a canned response is inserted into a ticket reply, BoldDesk evaluates the Liquid conditions and displays the content that matches the requester’s language.

Liquid Elements Used

Element Purpose
{{ }} Outputs dynamic values such as the requester’s name.
{% if %} Starts a conditional logic block.
{% else %} Defines fallback content when the condition is not met.
{% elsif %} Adds additional language conditions.
{% endif %} Ends the conditional block.

Language Detection

The requester’s language can be evaluated using:

ticket.requester.language

For example:

{% if ticket.requester.language == "German" %}

If the requester’s language is German, BoldDesk displays the German content. Otherwise, it displays the fallback content defined in the {% else %} block.

Configuring a Multilingual Canned Response

  1. Navigate to Settings > Canned Responses.

  2. Create a new canned response or edit an existing one.

  3. Add the appropriate Liquid conditions and language-specific content by using the Insert Liquid Template

    Example: German and English in a Single Canned Response

    {% if ticket.requester.language == "German" %}
    Hallo {{ticket.requester.displayname}},
    
    vielen Dank, dass Sie unser Support-Team kontaktiert haben. Wie können wir Ihnen helfen?
    
    Mit freundlichen Grüßen
    Support-Team
    
    {% else %}
    
    Hello {{ticket.requester.displayname}},
    
    Thank you for contacting our support team. How can we help you today?
    
    Best regards,
    Support Team
    
    {% endif %}
    
  4. Save the canned response after adding all required language blocks.

    German and English in a Single Canned Response.gif

  5. Test the Canned Response. Apply the canned response to tickets associated with contacts using different language settings and verify that the expected content is displayed.

    Canned Response Test.gif

Expected Behavior

If the Requester’s Language Is German:

Hallo John Doe,

vielen Dank, dass Sie unser Support-Team kontaktiert haben. Wie können wir Ihnen helfen?

Mit freundlichen Grüßen
Support-Team

If the Requester’s Language Is English:

Hello John Doe,

Thank you for contacting our support team. How can we help you today?

Best regards,

Support Team

Output Summary:

Requester Language Result
German German content is displayed.
English English content is displayed.
Any language not explicitly configured Content in the {% else %} block is displayed.

Supporting More Than Two Languages

You can support additional languages using an if / elsif / else structure.

Example: German, French, and English:

{% if ticket.requester.language == "German" %}

Hallo {{ticket.requester.displayname}}

{% elsif ticket.requester.language == "French" %}

Bonjour {{ticket.requester.displayname}}

{% else %}

Hello {{ticket.requester.displayname}}

{% endif %}

Rules and Considerations

Rule Description
Exact Match Required The language value must exactly match the value stored in ticket.requester.language.
Fallback Content Use {% else %} to provide a default language when no match is found.
Manual Language Content Every supported language must have its own manually maintained content block.
Required Closing Tags Every {% if %} statement must end with {% endif %}.
Multiple Languages Supported Use {% elsif %} to add additional language-specific conditions.

Best Practices

  • Always include a fallback language using {% else %}.
  • Keep the structure consistent across all language blocks.
  • Test the canned response using contacts with different language settings.
  • Maintain language content in the same template to simplify updates.
  • Use dynamic placeholders such as {{ticket.requester.displayname}} to personalize responses.

Common Use Cases

  • Use a single canned response to support customers who speak different languages, automatically displaying content based on the requester’s language.
  • Maintain consistent greetings, messaging, formatting, and branding across all supported languages.
  • Simplify template management by maintaining one multilingual canned response instead of separate templates for each language.
  • Reduce administrative effort by updating language-specific content from a single template location.
  • Improve agent efficiency by eliminating the need to manually select different canned responses for different languages.

Troubleshooting

The Wrong Language Is Displayed

Possible Cause: The language value does not exactly match the condition.

Example:

{% if ticket.requester.language == "German" %}

Verify that the contact’s language value is actually stored as German.

Liquid Content Is Not Rendering

Check the following:

  • All {% if %} statements have a matching {% endif %}.
  • Liquid syntax is correctly formatted.
  • No tags have been accidentally removed.

Only Part of the Response Is Displayed

Verify that:

  • The {% else %} block is correctly positioned.
  • There are no misplaced {% endif %} statements.
  • Nested conditions are properly closed.

Frequently Asked Questions

  1. Can BoldDesk automatically translate a canned response?
    No. Liquid only controls which text block is displayed. You must manually provide the content for each language.

  2. Which Liquid variable identifies the requester’s language?
    Use:

    ticket.requester.language
    
  3. What happens if the requester’s language does not match any condition?
    BoldDesk displays the content inside the {% else %} block.

  4. Can multilingual canned responses still include personalization?
    Yes. Use placeholders inside each language block, for example:

    Hello {{ticket.requester.displayname}}
    
  5. Can one canned response support more than two languages?
    Yes. Add additional languages using {% elsif %} and close with {% endif %}.

  6. Do I need Multi-Language enabled to use ticket.requester.language conditions?
    Multi-Language must be enabled for the portal, and the requester/contact must have a language value set that is available via ticket.requester.language.

  7. Is the language comparison case-sensitive or value-sensitive?
    The comparison requires an exact match to the stored value. Use the same value the contact record stores in ticket.requester.language.

Related Articles

  1. How to Use Liquid in BoldDesk to Build Dynamic Conditional Content
  2. Sample Liquid Template for If-Else If-Else Chain
  3. How to Create and Manage Canned Responses in BoldDesk
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found