Skip to content

Ticket Variables ​

You can use variables in ticket channel names and in every ticket message: the panel message, and the Initial Message, Close DM and Send Message automations of a ticket template. Variables are replaced with the correct information when the message is sent, in the text message as well as in every part of an embed.

Ticket variables are written between curly brackets, like {ticket.user.mention}. They are different from the %member% style variables used in join, leave and join DM messages, which don't work in tickets.

TIP

Type { in any ticket message box on the dashboard to get a list of matching variables.

Keep in mind where each variable is usable. The Where to use column uses these names:

NameMessage
PANELThe panel message posted above the ticket buttons or select menu
INITIALThe template's Initial Message, posted when the ticket opens
CLOSE DMThe template's Close DM, sent to the ticket owner when the ticket closes
AUTOMATIONThe message of a Send Message automation

A variable that isn't available in a message is left as plain text.

Channel Name Variables ​

These variables are used in the Naming Pattern of a template, and in the Claim Name used while a ticket is claimed.

VariableDescriptionWhere to use
{counter}The ticket number, counted per template. Ex: 12Naming Pattern, Claim Name
{counter:04}The ticket number padded with zeros to 4 digits. Ex: 0012. Change the number to pick another length, up to 7 digitsNaming Pattern, Claim Name
{username}The member's username. In the naming pattern, this is the ticket owner. In the claim name, this is the member who claimed the ticketNaming Pattern, Claim Name
{user_id}The member's Discord ID. In the naming pattern, this is the ticket owner. In the claim name, this is the member who claimed the ticketNaming Pattern, Claim Name
{template}The template's nameNaming Pattern, Claim Name

INFO

Discord channel names are lowercase and can't contain spaces or special characters. Spaces and underscores become - and other special characters are removed, so a template named Billing Help! becomes billing-help. Channel names are cut off at 90 characters.

The default naming pattern is ticket-{counter:04}, and the default claim name is claimed-{username}.

Server and Panel Variables ​

VariableDescriptionWhere to use
{server.name}Server's namePANEL, INITIAL, CLOSE DM, AUTOMATION
{server.id}Server's Discord IDPANEL, INITIAL, CLOSE DM, AUTOMATION
{server.icon}Server's icon URLPANEL, INITIAL, CLOSE DM, AUTOMATION
{server.banner}Server's banner URL (empty if the server has no banner)PANEL, INITIAL, CLOSE DM, AUTOMATION
{bot.avatar}Invite Tracker's profile picture URL (or your Custom Bot's)PANEL, INITIAL, CLOSE DM, AUTOMATION
{panel.name}The panel's name. In ticket messages, this is the panel the ticket was opened fromPANEL, INITIAL, CLOSE DM, AUTOMATION
{schedule.timezone}The time zone of the panel's opening hours. Ex: Europe/Amsterdam (UTC if not set)PANEL, INITIAL, CLOSE DM, AUTOMATION
{specialchars}Inserts a backtick (`)PANEL, INITIAL, CLOSE DM, AUTOMATION

Ticket Owner Variables ​

These variables show the member who opened the ticket.

VariableDescriptionWhere to use
{ticket.user}Ticket owner's usernameINITIAL, CLOSE DM, AUTOMATION
{ticket.user.name}Ticket owner's display name, or their username if they have no display nameINITIAL, CLOSE DM, AUTOMATION
{ticket.user.id}Ticket owner's Discord IDINITIAL, CLOSE DM, AUTOMATION
{ticket.user.mention}Mention the ticket ownerINITIAL, CLOSE DM, AUTOMATION
{ticket.user.avatar}Ticket owner's Discord profile picture URLINITIAL, CLOSE DM, AUTOMATION
{user}Same as {ticket.user}INITIAL, CLOSE DM, AUTOMATION
{user.name}Same as {ticket.user.name}INITIAL, CLOSE DM, AUTOMATION
{user_id}Same as {ticket.user.id}INITIAL, CLOSE DM, AUTOMATION
{user_mention}Same as {ticket.user.mention}INITIAL, CLOSE DM, AUTOMATION
{user.avatar}Same as {ticket.user.avatar}INITIAL, CLOSE DM, AUTOMATION

TIP

Prefer the {ticket.user...} variables and {ticket.id}. If Invite Tracker can't find the ticket owner anymore, for example after they left the server, these still show a fallback such as Unknown user, while {user}, {user_id}, {user_mention} and {ticket_id} are left as plain text.

Ticket Variables ​

VariableDescriptionWhere to use
{ticket}Mention the ticket channelINITIAL, CLOSE DM, AUTOMATION
{ticket.channel_mention}Mention the ticket channelINITIAL, CLOSE DM, AUTOMATION
{ticket.channel.id}Ticket channel's Discord IDINITIAL, CLOSE DM, AUTOMATION
{ticket.channel.name}Ticket channel's name. Ex: ticket-0012INITIAL, CLOSE DM, AUTOMATION
{ticket.name}Same as {ticket.channel.name}INITIAL, CLOSE DM, AUTOMATION
{channel.mention}Same as {ticket.channel_mention}INITIAL, CLOSE DM, AUTOMATION
{channel.id}Same as {ticket.channel.id}INITIAL, CLOSE DM, AUTOMATION
{channel.name}Same as {ticket.channel.name}INITIAL, CLOSE DM, AUTOMATION
{panel.count}The ticket number, counted per template. This is the same number as {counter} and the # number on the History page. Ex: 12INITIAL, CLOSE DM, AUTOMATION
{ticket.id}The ticket's internal ID. This is not the ticket number, use {panel.count} for thatINITIAL, CLOSE DM, AUTOMATION
{ticket_id}Same as {ticket.id}INITIAL, CLOSE DM, AUTOMATION
{ticket.createdAt}When the ticket was opened. Ex: 17 May 2026 22:57INITIAL, CLOSE DM, AUTOMATION
{ticket.createdAgo}How long ago the ticket was opened. Ex: 2 hours agoINITIAL, CLOSE DM, AUTOMATION
{ticket.closedAt}When the ticket was closed. Ex: 18 May 2026 00:57CLOSE DM
{ticket.closedAgo}How long ago the ticket was closed. Ex: a few seconds agoCLOSE DM
{ticket.duration}How long the ticket was open. Ex: 1d 4h 12mCLOSE DM

INFO

{ticket.closedAt}, {ticket.closedAgo} and {ticket.duration} show Unknown while the ticket is still open.

Template Variables ​

VariableDescriptionWhere to use
{template.name}The template's nameINITIAL, CLOSE DM, AUTOMATION
{template.id}The template's internal IDINITIAL, CLOSE DM, AUTOMATION
{template.ticketLimit}The template's Tickets Per User limit (0 means no limit)INITIAL, CLOSE DM, AUTOMATION

Author Variables ​

The author is the member who caused the message to be sent.

VariableDescriptionWhere to use
{author}Author's usernameINITIAL, CLOSE DM, AUTOMATION
{author.id}Author's Discord IDINITIAL, CLOSE DM, AUTOMATION
{author.mention}Mention the authorINITIAL, CLOSE DM, AUTOMATION
{author.avatar}Author's Discord profile picture URLINITIAL, CLOSE DM, AUTOMATION

INFO

In the initial message, the author is the member who opened the ticket. When the initial message is sent because of an escalation, the author is the member who escalated the ticket.

Close DMs and automation messages are sent by Invite Tracker itself, so {author} and {author.mention} show System, and {author.id} and {author.avatar} are empty.

Form Variables ​

These variables show the answers to the template's form. Replace N with the question number: numbers match the question order and start at 1, so the first question is {form.answer.1}.

VariableDescriptionWhere to use
{form.results}All questions with their answers, each question in bold with its answer below itINITIAL, CLOSE DM, AUTOMATION
{form.answer.N}The answer to question N (1 to 5). Ex: {form.answer.1}INITIAL, CLOSE DM, AUTOMATION
{form.answer.N.question}The title of question N (1 to 5). Ex: {form.answer.1.question}INITIAL, CLOSE DM, AUTOMATION

INFO

Older templates may use {create.form}, {create.form.N} and {create.form.N.question}. These still work and are the same as {form.results}, {form.answer.N} and {form.answer.N.question}.

Transcript Variables ​

These variables show the transcript saved when the ticket closed.

VariableDescriptionWhere to use
{transcript.url}Link to open the transcriptCLOSE DM
{transcript.id}The transcript's IDCLOSE DM
{transcript.createdAt}When the transcript was saved. Ex: 18 May 2026 00:57CLOSE DM
{transcript.createdAgo}How long ago the transcript was saved. Ex: a few seconds agoCLOSE DM

INFO

Transcript variables are empty when no transcript was saved for the ticket, for example when Enable Transcript is off.

Escalation Variables ​

When a ticket is escalated with Send Target Template Message turned on, Invite Tracker sends the target template's initial message, where these extra variables are available.

VariableDescriptionWhere to use
{escalate.reason}The reason given with /ticket-escalate (No reason provided if none was given)INITIAL (when escalated)
{escalate.template}The name of the template the ticket was escalated toINITIAL (when escalated)

Embed-Specific Variables ​

VariableDescriptionWhere to use
%random_color%Picks a new random color for the embed every time a message is sentPANEL, INITIAL, CLOSE DM (embed color only)

TIP

You don't need to type %random_color% yourself: click the color rail on the left of the embed editor and enable Random color.

INFO

Embed links and picture fields (author icon, thumbnail, image and footer icon) must be a valid http:// or https:// link once variables are filled in, otherwise they are left out of the message. Variables that give a link, such as {ticket.user.avatar}, {author.avatar}, {server.icon}, {server.banner}, {bot.avatar} and {transcript.url}, can be used there.

Timestamps ​

{ticket.createdAt}, {ticket.createdAgo}, {ticket.closedAt}, {ticket.closedAgo}, {transcript.createdAt} and {transcript.createdAgo} use Discord timestamps, which every reader sees in their own time zone and language.

WARNING

Discord timestamps only display correctly in message text, embed descriptions and embed field values. In other places (embed titles, author names and footers), they show up as raw text like <t:1779058678:f>.

Invite Tracker Documentation