Notify custom group when custom field is applied

Hello,
We have one queue for all our support, that can be AV, IT, Sales etc.
I have created custom fields (IT-team, AV-team etc.) and groups for every team handling our tickets.

We have one employee who assigns the ticket to a specific team based on the request and then we have custom searches that show only tickets that belong to your team.
(This way we can have only one support email to our customers that covers all our issues and requests)

What I want to do now, is generate a notification when the ticket is assigned to a team and send the notification only to that group of people. How can I do this?

I already have a custom condition:
return 0 unless $self->TransactionObj->Type eq ‘CustomField’;
return 1;

This works and sends the notification to all AdminCC:s watching the queue when the custom field is assigned.

How can I make a custom action code that reads the team that the ticket is assigned to, and sends the notification only to that group of people and not to all queue watchers.

Best Regards

Johannes Kullberg

Nobody has any idea on how to do this?

i have done something similar but for that i added an extra Ticket state in RT lifecycle like ‘assigned’
then you can do something like


my $txn = $self->TransactionObj;
my $type = $txn->Type;
my $field = $txn->Field;
my $newValue = $txn->NewValue;
my $assignedTeam= $self->TicketObj->FirstCustomFieldValue( “assigned Team” );
if ( ( $type eq “Status” || ( $type eq “Set” && $field eq “Status” ) ) && $newValue eq “assigned” && $assignedTeam eq “IT-Team” ) {
return 1;
} else {
return 0
};


i just found something in the Wiki maybe it helps

https://rt-wiki.bestpractical.com/wiki/WorkFlow#Action_Setup