Snippets for Fast Responses and Templating


Follow

Overview

Snippets can be used in any text field in a case, but they are most useful for replying to emails.

In this article, we will exclusively discuss the functionality and usage of snippets as well as cover the following:


Information


About Snippets


For example., you have a snippet, called upgrade:

Hi {firstname},

Thanks for reporting this bug! Fortunately, we’ve already fixed it in the most recent version of the software, Frogger [[version]].

If there’s anything else we can do for you, or if upgrading doesn’t fix the issue, please just reply to this email and we’ll figure out what’s going on.

{myfirstname} – Frogger Software

 

  • To activate it, you can either type the snippet name and then the snippet activation key: upgrade`
    mceclip0.png

    • Or you can type the snippet activation key twice, which will bring up a snippet search box.
  • Typing in the search box filters the list of snippets to those that contain the text you have typed, as you type.
  • The snippet activation key defaults to `. It is configurable on a per-user basis by heading to the Avatar menu > User Options > Legacy Settings.
  • If you have a non-English keyboard layout, you might find the regular snippet key does not work. If so, just change to one of the other keys.
  • The text from the upgrade snippet will be inserted where the cursor is.
  • Snippets can also contain placeholders, surrounded by curly braces, which will be replaced with text from case attributes or the current user’s profile (see below for more details).
  • Additionally, you can include one text symbol like [[version]] in each snippet. When the snippet is inserted, that portion of the text will be highlighted so the next thing you type will replace that text.

Back to top


Snippet Placeholders

There are also many placeholders you can put in snippets that will be replaced automatically. All these are available for mailbox auto-replies too:

  • {case} for the case ID.
  • {sender_firstname} (previously {firstname}) for the sender’s first name.
  • {sender} for the sender’s email address.
  • {subject} for the subject of the message.
  • {ticket} for the external ticket ID (will also display other cases submitted by the same person).
  • {ticket_singlecase} for the external ticket ID that only has access to the current case (will not display other cases submitted by the same person).
  • {url} for the URL of this FogBugz site.
  • {ticketurl} for a link to the external case (e.g., http://try.fogbugz.com/default.asp?[ticket]).
  • {ticketurl_singlecase} for a link to the external case without public list view (e.g., http://try.fogbugz.com/default.asp?[ticket_singlecase]).
  • {userfirstname} (previously {myfirstname}) for the logged-on user’s first name.
  • {userlastname} (previously {mylastname}) for the logged-on user’s last name.
  • {username} for the name of the logged-on user.
  • {useremail} for the email of the logged-on user.

 

NOTE:
  • The difference when using {ticket} versus {ticket_singlecase} is the same as in {ticketurl} versus {ticketurl_singlecase}.
  • If you want the recipient to see a list of all submitted cases from the same account then use {ticket}.
  • However, if you want to limit the public view only to the case in question, then use {ticket_singlecase} instead.

Back to top


Snippet Administration

  • Snippets can either be personal to the user or global (available to all users).
    • Both types are configured on the same page, accessed via the Avatar menu.
  • All site administrators see the global snippets available for management at the top of that page, before their own personal snippets.
  • If a non-site-admin such as a Project Manager or a Customer Service Lead needs access to creating, editing and removing global snippets, then have a site administrator add them to the allowed list using the Edit Permissions control at the top of the snippet page.

 snippet-permissions.png

Back to top


Pro Tip!

When you have a lot of snippets and they fall into different categories or pertain to different projects, the list can become overwhelming.

If you use a standard naming system for the global snippets when you search for that code in the search box, the user will see the full list of snippets shrink to just that subset. For instance, the code KLN/ could be used as a preface to all Kiln snippets, and the code FGB/ to preface all FogBugz snippets to allow for easy filtering to just Kiln or FogBugz snippets.

Back to top