Question

How do I add the ticket ID to the ticket subject?

Answer

Use the {{ticket.id}} placeholder in business rules and macros to add the ticket ID to the email subject or the ticket title.

Trigger or automation

To add the ticket ID to email notifications that a trigger or an automation sends, add the placeholder {{ticket.id}} to the subject line field.

Although you can add the ticket ID to the subject line for emails sent through a trigger or an automation, you can't change the ticket subject or title with business rules. As a workaround, set up a custom workflow that uses webhooks and triggers. For details, see Support Tip: How to change the ticket Subject using a trigger.

Macro

Create a macro that lets agents add the ticket ID to the ticket subject in Support.

To add the ticket ID with a macro:

  1. Go to Admin Center and add a macro
  2. Enter the Macro name and Description
  3. Under Actions, add:
    • Set subject | {{ticket.id}} {{ticket.title}}
  4. Click Save

You can add the ticket ID placeholder before or after the title placeholder.

Powered by Zendesk