Agent specific signatures
Nils Leideck05. Sep 2011 | Modifications & Packages
Disclaimer:
The practical examples presented in our technical blog (blog.otrs.com) and now in the expert category in our FAQ blog section serve as a source of ideas and documentation to show what is theoretically possible with OTRS in concrete scenarios or sometimes even for more exotic configurations. All configurations presented here were developed under laboratory conditions as a proof of concept.
We can only guarantee testing and implementation of these concepts to be error-free and productive if implemented in a workshop with one of our OTRS consultants. Without this, the responsibility lies with the customer himself. Please note that configurations from older OTRS versions may not work in the newer ones.
To define signatures with agent specific details like role title or mobile number, an OTRS administrator can just add a few lines of SysConfig to provide a new agent preference that can be filled with values by the particular agent or the administrator.
The easiest way is to setup a new own configuration in Kernel/Config/Files/
For my example I will use the filename MyConfig.xml
The content of this file is simple:
<?xml version="1.0" encoding="utf-8" ?> <otrs_config version="1.0" init="Framework"> <ConfigItem Name="PreferencesGroups###PersonalPhoneNumber" Required="0" Valid="0"> <Description Translatable="1">Defines the config parameters of this item, to be shown in the preferences view.</Description> <Group>Framework</Group> <SubGroup>Frontend::Agent::Preferences</SubGroup> <Setting> <Hash> <Item Key="Module">Kernel::Output::HTML::PreferencesGeneric</Item> <Item Key="Column">Other Settings</Item> <Item Key="Label" Translatable="1">Example for agent phone number</Item> <Item Key="Key" Translatable="1">Example for agent phone number</Item> <Item Key="Block">Input</Item> <Item Key="Data">$Env{"UserPhoneNumber"}</Item> <Item Key="PrefKey">UserPhoneNumber</Item> <Item Key="Prio">7000</Item> <Item Key="Active">1</Item> </Hash> </Setting> </ConfigItem> </otrs_config>
Rebuilding the SysConfig (just open the SysConfig using the admin area) generates a new SysConfig entry in Framework -> Frontend::Agent::Preferences calles PersonalPhoneNumber.
This field needs to be activated and adds a new preference item to the agent preferences page.
The value will be stored in the table user_preferences and is available in signatures with the common OTRS tags like .
Enjoy!
Cheers, Nils
Mahdieh at 09.07.2019, 11:09
OTRS 6.x - It may be helpful for someone (Add agent specific Job Title) - create a .xml file to the following Path: /opt/otrs/Kernel/Config/Files/XML/AgentPrefsODNfield.xml - fill it with following entries up: Job Title of an agent Frontend::Agent::View::Preferences Kernel::Output::HTML::Preferences::Generic Miscellaneous UserJobTitle Job title of an agent. UserJobTitle Input [% Env("UserJobTitle") %] UserJobTitle 9004 1 - Rebuild the Configuration: su -c "/opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild" -s /bin/bash otrs
Diego at 08.01.2019, 17:29
This Work for me under OTRS6.x (to install in ~otrs/Kernel/Config/Files/XML/zzz_AgentExtraAttributes.xml) Defines the config parameters of this item, to be shown in the preferences view. Frontend::Agent::View::Preferences Kernel::Output::HTML::Preferences::Generic UserProfile Example for agent phone number Example for agent phone number Input $Env{"UserPhoneNumber"} UserPhoneNumber 7000 1
Robert Ullrich at 19.07.2018, 08:46
Hi Snowman, because of code changes etc. etc. this will not work in OTRS6. Cheers Robert
Snowman at 10.07.2018, 12:26
Anyone know if this works also in OTRS6 ? I can't get it working. Thanks
Timo at 01.06.2016, 20:10
Hi, for anyone who is interested. This line has to be corrected since OTRS 5: Kernel::Output::HTML::PreferencesGeneric The correct value needs to be Kernel::Output::HTML::Preferences::Generic This is due to the fact that the kernel module folder structure has changed a little
Adam at 31.08.2015, 13:03
In the Agent setup/configuration screen there is a Title field. It is only visible to admin. How do I add this field as I did with dynamic ones to the user/agent preferences screen so Agents can edit this field on their own? Kind regards
Mario at 20.01.2015, 11:45
Thanks a lot. You don't forget to put the user and group authoritations in order ( PUT SIMILARS) with the others in the path.
Jens at 17.06.2014, 21:28
The Tag depends on the one you used in the config
Klaus at 02.06.2014, 18:11
Hi, you tell me what is the tag?
marco at 12.09.2011, 15:38
Thank you Nils !