We are looking to develop a feature whereby we can display for support staff, a list of products that a customer has, what type of support plan they are on, etc. So that when the staff pull up a ticket it can influence what kind of support to give them.
What I need to figure out is: How can I take custom field values that I store in an RT user, and display those when rendering either the ticket display or update pages.
Or more specifically right now, I am struggling to figure out how to access the TicketObj or TransactionObj from the Ticket/Update.html/BeforeMessageBox callback.
We already have a mechanism whereby each customer is a user in RT, and we can store customer-wide data in there. And we already have a mechanism whereby there is a “Customer” custom field on ticket transactions that link the ticket to the relevant customer user. I am just not sure how to go about using that relationship to display info on the pages.
I think that using a Callback is my preferred approach, but I’ve tried using them and I’m not sure how to get started to access a user object via a callback.
Another approach idea I had was to simply add a read-only custom field to the ticket, and use a scrip to find the related customer, pull the info, and populate it in the field on ticket creation/update. And just rely on these read-only fields. But that seems overly clunky, and I’d really like to leverage callbacks so I can do custom formatting of the fields, add colour, etc.