Hi All
Has anyone been able to find a way of listing all of the assets that a user has assigned to them, and report that back into a ticket.
Hi All
Has anyone been able to find a way of listing all of the assets that a user has assigned to them, and report that back into a ticket.
Not sure if what you’re after, but there is an app (Quick View Requester Assets) in the market place that adds the requesters assets list on the right hand panel for quick view.
Thanks for responding, what I am trying to do is have a list of the assets assigned to a user in the CMDB placed in the incident or request, so when HR notify us of a leaver, we know what equipment is coming back to us.
Hey Mikey,
Are your HR team using a Service Item to notify you of an leaver? In my business we have HR complete a service item which includes a lookup field to all users.
We then use a filtered API call to retrieve the assets assigned to the user and then parsing the results so that it can be presented it in the ticket as a public note.
This is my workflow:
This is the filtered API call I use:
I notice in the Aciton block, there is an option for ‘Trigger Webhook’ also, but I can see you’ve used a Web Request…?
The reason I use an API via Web Request over an Action is because with a Web Request you get the option to Parse the data and then add conditions based on those results. The API via an Action block is fine when using PUSH and PUT type events but doesn’t offer the same visibility of success that the Web Request offers, I preference Web Request so that I can use the API Header to determine the success of the API.
Currently the output lists all the asset names, and then all the asset tags, so for example:
Were you ever able to format yours more like: Headset: HDS0001 Laptop: LAP0001 Security Card: SEC0001? Marty
Hi
You can make for instance a bullet list with the asset names and tags, by using both object arrays from the Parser node. In this case I add the liquid filter code in a private note via the Action node:
{% assign name_array = {{P1.root.assets.assets_object.name}} %}
{% assign name_array = name_array | remove: ':' | remove: ']' | remove: '"' -%}
{% assign name_array = name_array | split: ',' %}
{% assign tags_array = {{P1.root.assets.assets_object.asset_tag}} %}
{% assign tags_array = tags_array | remove: 'e' | remove: ']' | remove: '"' -%}
{% assign tags_array = tags_array | split: ',' %}
{% for a in name_array %}
{% endfor %}
The result in the private note will look like this:
Kind regards,
Rutger Bockholts
Freshworks
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.