We are facing a smaller issue with the text modules. We created a custom attribute on the user object (fieldname: salutation, type: select), with the choices ‘mr’ => “Herr”, ‘mrs’ => “Frau” etc.
In our text module we have “Guten Tag #{ticket.customer.salutation} #{ticket.customer.lastname},”
In general, this works, but it gives back the key of the custom field. (So the text module is transformed to “Guten Tag mrs Müller”.)
We would like to use the display information on the field though, instead of the key information. (So the value, which is also shown on the users profile, where ‘Frau’ is rendered as expected.)
I tried several ways to have the desired output:
#{ticket.customer.salutation.display}
#{ticket.customer.salutation.value}
#{ticket.customer.salutation_value}
#{ticket.customer.salutation_display}
But all of them break the text module.
Is anyone facing the same issue? Can anyone help?
I had a similar idea with the salutation, but I chose a different solution. I didn’t like the idea of storing the salutation in the user object because that would require manually editing the users and choosing the correct salutation before the text module works properly.
Instead I just created different text modules that already contain the salutation, e.g.:
::hf -> Hallo Frau #{ticket.customer.lastname},<2 new lines> ::hh -> Hallo Herr #{ticket.customer.lastname},<2 new lines> ::hv -> Hallo #{ticket.customer.firstname},<2 new lines>
Have you considered just using Herr, Frau etc. as keys? Using mrs and mr as keys doesn’t really seem advantageous in this situation, because there’s no way to specifiy different translations depending on the agent’s or user’s language anyway.
we are pushing the salutations out of a different system via API into Zammad. As the information is already existing, I would rather utilize them instead of creating more individual text blocks.
We changed the API and are now mapping the salutations from English to German. They are now existing in German in the Zammad Database and so the database value can be used with the placeholders.