[rt-users] OnCreateSetLanguage dependent on the Email "To" addr

Daniel Schwager Daniel.Schwager at dtnet.de
Thu Feb 17 17:33:01 EST 2011


Hi,

We would like to answer ticket in ONE
queue called "support" using different languages.

The language depends on the language of the requestor.

If the requestor has no language set, we have to set
the language automatically (scrip) dependent on the 
"To"-email-addr used for creating the ticket. 

Example: Sending an email to
a) support at example.com set "English" to the requestor language, 
b) support at example.de set "German" to the requestor language.

The "Correspondence-Template" checks the language of the requestor
and changes the language for the signature dynamically.


Scrip name: OnCreateSetLanguage
Precondition: ticket.isReceivedByEmail() && !requestor.isSetLanguage()
Action: requestor.setLanguage(<depend on "To"-emailaddr)

** Precondition:
# isReceivedByEmail()
my $inMessage = $self->TransactionObj->Attachments->First; 
return 0 if ( !$inMessage ); # if no message attachment - assume web UI 
return 0 if ( !$inMessage->GetHeader('Received') ); # exit if not email
message

# !requestor.isSetLanguage()
..

Can somebody help me to create the Precondition and Action ? Currently I
stuck... )-:
 
Kind regards
Danny




More information about the rt-users mailing list