Use data of a ticket body to be shown on Email

Hello everyone

I am somehow new to Request Tracker. I want to show data of the ticket body in an Email that is going to send to ticket admincc. for example user has entered a date in ticket body. I want to send that date via Email to admincc. is this possible?

thanks in advance!

Yes, this should be possible if you install an extension called Extract Custom Field Values.

thanks a lot but I dont have any custom field. i want to extract some data from ticket body and show it on email. for example I have this message in my body:

username: dorix
password: 123

I want to show this on my email:
dorix-123

is it possible?

You’ll need to explain what you mean by ‘Ticket body’. Do you mean data within a field of a ticket in RT?

If so, you’ll need to create a scrip that is triggered by a Condition.
For example, a requestor setting a date within the RT Self Service portal requires a ‘User Defined’ ‘Condition’ set in the scrip with some perl script that detects the date field changing.

When this scrip condition is true, the specified action in the scrip is triggered.
For example, would then trigger the Action, Notify Admin CCs.

This Action then uses the Template associated with the scrip. Write your own Template which contains some perl script that references the value in the date field in your ticket.

Some links to get you started: -
https://rt-wiki.bestpractical.com/wiki/Condition
https://rt-wiki.bestpractical.com/wiki/WriteCustomCondition
https://rt-wiki.bestpractical.com/wiki/CustomConditionSnippets
https://rt-wiki.bestpractical.com/wiki/Template
https://docs.bestpractical.com/rt/4.2.13/customizing/templates.html

And finally, an example that has similar components to what you are doing.

There is a lot of information in the internet regarding RT Scrips, Conditions, Actions and Templates. Use the correct terms in your searches, and you should be able to find the info you need.

many thanks. Let me explain more clear. when I am creating a ticket for customers problem, I am entering some information like customer’s name and address.

customer name: edward bean
address: no.43, Elm street

I want to show these information on Email which is sent from request tracker to Owner in a table format. so I have to use some html tags and I have to fetch information from ticket body message. is it possible?

If these are structured data, could you use Custom Fields for them, rather than having them in the main text of the ticket? That may make it easier to break them out.

1 Like

Hi Dornaz

Where are you entering the initial information? In RT, a mail client?

regards
Garry

thats a very good idea!. thank you.

I did so and it works! but I want to know if there is another way (except custom fields) to extract data from ticket body message?

Hello

I enter information in RT.

Ah ok, in that case GreenJimll’s suggestion of custom fields makes a lot of sense if your sending the same type of data every time - you can then pick up the entries quite easily and enter them into your mail template, for sending on, if need be. Id avoid trying to parse the content of the ticket body, personally.

1 Like

I want ot ask that how can I extract the ticket body in the email and how to send the ticket of the tracker in the email. If the answer will not be provided then Quickbooks support will help.