(SOLVED) Select correct gender salutation in response?

Moderator: crythias

Locked
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

(SOLVED) Select correct gender salutation in response?

Post by morecw »

Hi all,

has anyone ever found a solution to the problem of gender selection in a resppnse? At the moment for our German customers we use "Sehr geehrte(r) <OTRS_CUSTOMER_DATA_UserFirstname> <OTRS_CUSTOMER_DATA_UserLastname>," then the agent has to edit it appropriately afterwards.

Yes we could add the title field inbetween but there's still the problem of "geehrte" or "geehrter"

Any know the answer to this?
Last edited by morecw on 12 Dec 2012, 18:51, edited 2 times in total.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Select correct gender salutation in response?

Post by crythias »

You could make the salutation part of the customer config and pull that instead of fixed typing, similar to how you pull the Customer Name
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Select correct gender salutation in response?

Post by morecw »

I reached a solution with this addition to: Kernel\System\TemplateGenerator.pm

Code: Select all

	my $Tag3 =  'OTRS_CUSTOMER_DATA_ANREDE';
	my $Tag4 =  'OTRS_CUSTOMER_DATA_UserFirstname';


	if ( $CustomerUser{UserTitle} =~ /Frau/i ) {
	    $Param{Text} =~ s/$Start$Tag3$End/geehrte/gi;
            $Param{Text} =~ s/$Start$Tag4$End//gi;
	} elsif ( $CustomerUser{UserTitle} =~ /Herr/i ) {
	    $Param{Text} =~ s/$Start$Tag3$End/geehrter/gi;
            $Param{Text} =~ s/$Start$Tag4$End//gi;
	} else {
	    $Param{Text} =~ s/$Start$Tag3$End/geehrte(r)/gi;
	}
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Select correct gender salutation in response?

Post by morecw »

Responses now begin with:

Code: Select all

Sehr <OTRS_CUSTOMER_DATA_ANREDE> <OTRS_CUSTOMER_DATA_UserTitle><OTRS_CUSTOMER_DATA_UserFirstname> <OTRS_CUSTOMER_DATA_UserLastname>,
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
Locked