Using Auxillary Data in Helpdesk to Store a Contact's Manager's Info from Asset Control to Facilitate Approval Routing
This example uses a few automation techniques available in Helpdesk to access data from Asset Control for the purpose of automating approvals on service requests.
At a high level the sequence of events is as follows:
- A service request is made by phone or internet.
- An Incident Rule runs a query that pulls the contact's manager's name and email address from Asset Control and passes it to the AuxData record for the request.
- An email is triggered that sends an approval request to the manager.
- The manager either rejects or approves the request.
Setup:
Figure 1: First, make sure that manager hierarchy is defined in Asset Control. Each user record has an association tab in which the manager can be selected.
If the manager does not exist, one can be manually added, or hierarchy data can be imported using Connector Solution (not covered in this article).
Figure 2: Next, you will need to create a new Incident Rule in Helpdesk to set the AuxData. You will set two properties – each of which is an AEXQUERY that will query the Notification Server database.
One query will populate AuxData with the manager's name and the other his/her email address. This example will not actually use the manager's name, but it is left in for "how to" value as it may come up frequently. Make this rule active whenever 'Status' is equal to 'Open'. This ensures that the data gets stored for every workitem you create, but you can choose to narrow down the criteria if you wish.
The query needed for the manager's name is as follows. You will need to "flatten", or remove line breaks from the queries in order to paste them into the value box for the AuxData property:
AEXQUERY[[SELECT ISNULL(child.[Name], 'No Association') AS [Manager] FROM vResourceEx parent INNER JOIN ResourceType rt ON parent.[ResourceTypeGuid] = rt.[Guid] LEFT OUTER JOIN ResourceAssociation ra ON parent.[Guid] = ra.[ParentResourceGuid] AND ra.[ResourceAssociationTypeGuid] = '049c633f-8413-42ae-93ea-f4eb7edafc65' LEFT OUTER JOIN vResourceEx child ON ra.[ChildResourceGuid] = child.[Guid] LEFT OUTER JOIN Inv_Global_User_General_Details t1 ON child.[Guid] = t1.[_ResourceGuid] WHERE parent.[ResourceTypeGuid] IN (SELECT ResourceTypeGuid FROM ResourceTypeHierarchy rth INNER JOIN ResourceType rt ON rth.[BaseResourceTypeGuid] = rt.[Guid] WHERE rt.[Name] = 'User') AND parent.[Name] like 'WORKITEM(contact_name)']]
*note: These queries were not manually constructed, but rather, were mostly derived by using the Resource Management Metadata report available in the Notification Server.
The second query is for the manager's email address.
AEXQUERY[[SELECT ISNULL(t1.[Email], 'N/A') AS [Email] FROM vResourceEx parent INNER JOIN ResourceType rt ON parent.[ResourceTypeGuid] = rt.[Guid] LEFT OUTER JOIN ResourceAssociation ra ON parent.[Guid] = ra.[ParentResourceGuid] AND ra.[ResourceAssociationTypeGuid] = '049c633f-8413-42ae-93ea-f4eb7edafc65' LEFT OUTER JOIN vResourceEx child ON ra.[ChildResourceGuid] = child.[Guid] LEFT OUTER JOIN Inv_Global_User_General_Details t1 ON child.[Guid] = t1.[_ResourceGuid] WHERE parent.[ResourceTypeGuid] IN (SELECT ResourceTypeGuid FROM ResourceTypeHierarchy rth INNER JOIN ResourceType rt ON rth.[BaseResourceTypeGuid] = rt.[Guid] WHERE rt.[Name] = 'User') AND parent.[Name] like 'WORKITEM(contact_name)']]
Figure 3: When setting Auxillary Data, you must provide a member and a name. This corresponds to a virtual table/column in the auxdata field that is stored for each workitem. The “to value” is where you paste in the query.
When setting Auxillary Data, you must provide a member and a name. This corresponds to a virtual table/column in the auxdata field that is stored for each workitem. The "to value" is where you paste in the query:
Figure 4: The actual AuxData field is just a long text field. The data is stored in properly formed XML which can then be easily called from AUXDATA macros.
You can clearly see from the resultset in Figure 4 that the values for the manager's name and email have been added to the XML in auxdata. However, you may not have access to Query Analyzer, or for that matter know how to find the data if you did.
Figure 5: Therefore, as a workaround, you can use a Helpdesk email template to display the AuxData using macros.
If you recall, our member/name set was set to Manager/Name and Manager/Email. This is like forming a virtual table called 'Manager' in AuxData with two columns called 'Name' and 'Email'. Therefore, in order to extract the data back out, we'll call it with the AUXDATA macro, which follows the following form:
WORKITEM_AUXDATA(member, name)
So in our case that's:
WORKITEM_AUXDATA(manager, manager_name)
And
WORKITEM_AUXDATA(manager_email)
Construct a simple (text-based) email template with the following syntax for the message body:
AuxData test for Workitem #WORKITEM(workitem_number)
Manager Name: WORKITEM_AUXDATA(manager, manager_name)
Manager Email: WORKITEM_AUXDATA(manager, manager_email)
Then test it with context by previewing with an incident number.
-----
So far we've created a rule to simply extract data from one database and add it to a record in another, then test that the data exists. Now we need to configure the actual approval routing automation. There are myriads of ways to generate routing automation from Helpdesk. For the purpose of this article, we'll choose a simple method of sending a nicely formatted HTML email to the approver, upon which he/she can link to the ticket and either set the status to 'Approved' or 'Rejected'. We'll stop after that because the process should become pretty conventional from there.
The first thing to configure is the Email Template. For simplicity, I have attached an export file that contains all of the necessary rules and templates mentioned in this article. You can simply import them into your Helpdesk and begin to use them. I've called the template "SR – Send approval to contact's manager". This HTML template extracts the workitem's number, title, and comments to display on the email, and then provides links for the approver to either reject or approve the request.
Figure 7: Next of course, you need a Notify Rule in order to utilize the Email Template.
Create a Notify Rule also called "SR – send approval request to contact's manager" and make sure you select the email template you created. In the 'To:' line, under "These addresses:" type the AUXDATA macro - WORKITEM_AUXDATA(manager, manager_email). That will ensure that the email gets routed to the appropriate manager. In my example, I have set the Routing Rule to execute anytime the Category field contains 'Service Request'. Therefore, although the manager's data is being stored for every ticket, it's only used for those that are categorized in a certain way.
Figure 8: The configuration is done and it's time to test. I've started by creating a service request for new hardware.
I've pasted some specs into the comment field and categorized it as Service Request/Add/New Hardware. Once saved, all the automation takes place resulting in an email to the manager. This is the upper page of the workitem.
To find out how to do this integration with an external data sources, refer to this article.
| License: | AJSL By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License |
| Support: | User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab. |
| Attachment | Size |
|---|---|
| auxdata_integration_with_asset_control.zip | 2.51 KB |
- Login or register to post comments
- 4552 reads
- Printer-friendly version

























Interesting article
Great write up Sean. The Auxdata field is extremely useful and rather neglected in the documentation.
Thanks
Thanks John,
I've found auxdata to be one of the most versatile features we have in HD.
Very interesting...
Thanks Sean. I already forgot about the Auxdata field. This article opened my eyes for the possibilities.
Great write up
Agreed, great article. I too have neglected the AUXDATA data field and honestly have not paid much attention to its value. Will definitely be trying this out!
Minor warning on data normalization
Bear in mind that the integration uses data values as they are expected in a normal Asset Control/Helpdesk synchronization. If there are any cases where the format of names may differ between the two (e.g. Sean Yarger vs. Yarger, Sean), it will present a data normalization issue in which a match can't be made and you may not end up with the desired result. We've run into a little of this already, but it was easily fixed with some SQL modifications.
Thanks for all the feedback guys!
Nice Work!
Nice Work Sean, as always. Maybe you can convince the documentation team to get some of your concepts into the standard documentation guides. I am sure there are lots of people who read the documentation and don't understand this fully and are not aware of Juice as a resource for this type of info.
Keep up the good work!
James "Scott" Hardie
Vice President of Technology Services
shardie@xcendgroup.com
http://www.xcendgroup.com
Thanks
Thanks Scott, good to hear from you! I see you're quite active yourself on the Juice!
Great!
This looks like it is easy to implement and gives a huge return! Will meet a big business need in our environment.
Thanks!
Maybe possible solution
Hello All,
Nice solution!
Is the following statement a right one?
Can I create an automation rule that creates a linked incident (child incident) with the manager as contact and that he sends the approval towards this managers contact.
Then, with a post method (in a form) so without consuming a license can this (business user) approve the request and the parent incident can be setup approved...
Thx for you reply
Steve
Consuming a license?
Did you ever get this working? Where a business user can approve the request without consuming a license?
Import from .xml files?
Can import/reads be done from an xml file? If so, how would it work?
Looks nice
Thanks for that post, it looks pretty usfull, but for me it's not working , the auxdata test email template returns blank fields for the maanger, even if the manager is define in the ressource of the user ( based on active directory )
MaYeu