# Unable to retrieve Ticket number from hook when creating a new ticket to inform customer

**URL:** https://community.zammad.org/t/unable-to-retrieve-ticket-number-from-hook-when-creating-a-new-ticket-to-inform-customer/14311
**Category:** Technical assistance
**Created:** [May 15, 2024, 2:37am UTC](https://community.zammad.org/t/unable-to-retrieve-ticket-number-from-hook-when-creating-a-new-ticket-to-inform-customer/14311 "2024-05-15T02:37:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Arjun.jay](https://community.zammad.org/letter_avatar_proxy/v4/letter/a/7c8e57/32.png) [@Arjun.jay](https://community.zammad.org/u/Arjun.jay)
#### Post date: [May 15, 2024, 2:37am UTC](https://community.zammad.org/t/unable-to-retrieve-ticket-number-from-hook-when-creating-a-new-ticket-to-inform-customer/14311/1 "2024-05-15T02:37:16Z")

</div>

### Infos:

- Used Zammad version: 6.2.0-1712931839.b27a0d24.jammy
- Used Zammad installation type: (source, package, docker-compose, …) Linux
- Operating system: ubuntu 22.04
- Browser + version: Chrome 124.0.6367.158

### Expected behavior:

- When creating a new ticket via email, when i email the client to inform him of ticket creation, we want the ticket number to show within the body of the email. I am using a text module to retrieve the ticket number via a ticket hook.

### Actual behavior:

- The ticket number comes out as tsd#24- after using the tag #{config.ticket\_hook}#{ticket.number}.  
but my subject of the email i send to the customer has the full ticket number

(for example  
To: Client  
Subject: TSD#24301234 _subject_

```auto
Dear Mr/Ms client,

We refer to your [request/issue] and have logged your case under reference number #TSD24-

)

> Therefore, there is a valid ticket number in the subject of the email but the body of the email displays an incomplete ticket number.

### Steps to reproduce the behavior:

this is my text module>>

* Dear [Mr./Ms.] #{ticket.customer.firstname} #{ticket.customer.lastname}, 

We refer to your [request/issue] and have logged your case under reference number #{config.ticket_hook}#{ticket.number}.

```

---

<div class="post-metadata">

### Author: ![richie\_77](https://community.zammad.org/user_avatar/community.zammad.org/richie_77/32/5964_2.png) [@richie\_77](https://community.zammad.org/u/richie_77)
#### Post date: [May 15, 2024, 7:30am UTC](https://community.zammad.org/t/unable-to-retrieve-ticket-number-from-hook-when-creating-a-new-ticket-to-inform-customer/14311/2 "2024-05-15T07:30:40Z")

</div>

This is how it’s working for me:

 ![Ticket-Reply](https://community.zammad.org/uploads/default/original/2X/c/c9dc4b65d56486db88d7bb35c7338e86372957fa.png)

---

<div class="post-metadata">

### Author: ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)
#### Post date: [May 10, 2025, 7:30am UTC](https://community.zammad.org/t/unable-to-retrieve-ticket-number-from-hook-when-creating-a-new-ticket-to-inform-customer/14311/3 "2025-05-10T07:30:53Z")

</div>

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.
