Trigger for Ticket Body

I am trying to create a trigger where when a ticket is created and has the word Costco in the email body it activates my trigger.

I have set it up with the following:

[Ticket.Body] contains ‘Costco’
[Ticket.Body] contains 'costco

but whenever I send a test email with the word Costco or costco to the helpdesk, the trigger never runs and gives me the following error:

8/24/2018, 10:33:00 AM started on ticket #1504

Resolved condition values: {
“Ticket.Title”: “TESTING”,
“contains”: “False”,
“Ticket.Body”: “”
}

Condition result: false

I figure this is something really simple that I need to tweak but can’t crack it. Any ideas?

1 Like

Hello @alexdev50,

If you want to check if there is a specific word in a ticket’s comment, you should create a ticket which might look like this:

Hi Oleg_Tsurkan,

Thank you for your answer but unfortunately it doesn’t help (we’re not talking about comments). Like alexdev50 I’d like to assign a ticket once it is created to agents depending on keywords within the ticket body.

However, ‘Ticket.Body’ always results in an empty string and never contains the text of the ticket.

So it’s either a bug or ‘ticket.Body’ does not mean the text of a ticket.

How can we solve this?

Hi,
I have a similar trigger, and Oleg is correct, you want to use the comment body fields, even though that seems counter intuitive.
Here's what I have setup that is working

1 Like

Thank you! At least they should update the documentation then :slight_smile:

So what is the function of Ticket.Body?

It is a temporary storage of comment before finalizing its processing by HelpDesk. Once processed, the field is cleared.