Setting autoreply based on a custom field [Solved]


#1

It doesn’t work and I can’t figure out why. Help debugging this or logs to check to help me debug very welcomed.

Condition: User Defined
Action: Autoreply to Requestors
Template: Custom Email Autoreply
Stage: TransactionCreate

Custom condition:
if ( $self->TransactionObj->Type == “Create” )
{
my $TicketSource = $self->TicketObj->FirstCustomFieldvalue( “Ticket Source” );
if ( $TicketSource != “Box Brought In” && $TicketSource != “Phone Message” && $TicketSource != “Phone Call” )
{
return 1;
}
else
{
return 0;
}
}
else
{
return 0;
}

Custom action preparation code:

Custom action cleanup code:


#2

For testing the equality of two numeric values, we use the comparison operator == . For testing the equality of two string values, we use the comparison operator eq (EQual).

You do not want to use == and != for string comparisons in Perl, instead you want eq and ne.


#3

It works. Thank you. I spent hours trying to fix this.