How to get data fields

Moderator: crythias

Locked
sysiq
Znuny newbie
Posts: 6
Joined: 23 Dec 2010, 01:53
Znuny Version: 3.0.2

How to get data fields

Post by sysiq »

Does anybody know how I can get the Agent comment field and the customer phone number field from OTRS in the customer information bar on the right?
I tried $Env("UserComment"} but that doesn't work there.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to get data fields

Post by jojo »

Where do you want to use them?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
sysiq
Znuny newbie
Posts: 6
Joined: 23 Dec 2010, 01:53
Znuny Version: 3.0.2

Re: How to get data fields

Post by sysiq »

When I have a ticket open (Action=AgentTicketZoom) I want to use them from the Customer Information module on the right. I have a call-me-now php script on our PBX and want to able to click the customer phone number. I know how to make it an active link, but for that to work I need to complete the URI with the customer's phone number and the user's extension (which I have placed in the comment field of each agent).
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: How to get data fields

Post by jojo »

It should look like:


[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', 'http://someserver/call.php?=$Data{"UserComment"}', 0 ],


You need to use $Data or $QData
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
sysiq
Znuny newbie
Posts: 6
Joined: 23 Dec 2010, 01:53
Znuny Version: 3.0.2

Re: How to get data fields

Post by sysiq »

Thanks a lot, I finally got it working:

http://sip.informatique.nl/ps/call.php? ... rFirstname"} $Data{"UserLastname"}&dest=$Data{"UserPhone"}&shortname=iccbv&extension=$Env{"UserComment"}
Locked