I don’t know if an elegant solution using X-RT-Interface is possible, but I
can give a workaround. This is the custom condition we use to separate
ticket creation from web and mail:
# Custom condition to notify when a ticket is created from e-mail
# Based on "OnCreateFromEmail"
my $trans = $self->TransactionObj;
return 0 unless $trans->Type eq "Create";
my $msgattr = $trans->Message->First;
return 0 unless $msgattr;
return 0 unless $msgattr->GetHeader('Received');
I hope it helps.2015-07-07 3:16 GMT+02:00 Russell Jones firstname.lastname@example.org:
I am trying to access the new X-RT-Interface header in order to determine
within a Scrip if a ticket was created via Email or Web. However whenever I
try to create a new ticket and use an On Create scrip to read this header,
I get errors saying “Can’t call method “GetHeader” on an undefined value”.
Can anyone please provide an example of how to properly access this header?