Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Creating your assets field

Firstly, you need to either create a new custom field of type Assets objects or use the default Affected devices field.

Once you have your Assets field, navigate to the custom field and edit the contexts.

image-20240606-070657.png

Then, Edit Assets object/s field configuration

image-20240606-070730.png

Now, select your Object schema where all of your synced information is stored and add the query below to the Filter scope (AQL).

objecttype = "Devices"

Then, select which field you want users to be able to manually and also the attributes that display on the ticket when linked. It should look something like this:

image-20240606-071041.png

You can now save the contexts and prepare to create the automation.

Creating your automation

Create an automation rule within JSM which you are using as your ITSM project with the below steps to automatically assign a users device using your synced data.

Automation Step

Configuration

How it works

image-20240320-082343.png

 

image-20240320-082358.png

When a new issue is create, this will trigger the automation

image-20240606-071847.png

image-20240606-071908.png

We add a issue fields condition to add the request types where the device is captured. Use equals if you only have one Request Type to capture, if you have multiple, use is one of and then select the value(s).

image-20240606-072150.png

image-20240606-072205.png

Here we are looking at the schema for the requester, select the Schema you are importing the data into and then use one of the following queries, depending on whether you prefer to use the UPN or Mail attribute primarily for users.

objecttype = "Users" and "UPN" = "{{issue.reporter.emailAddress}}"

objecttype = "Users" and "Mail" = "{{issue.reporter.emailAddress}}"

image-20240320-083426.pngimage-20240320-083404.png

To ensure you only retrieve one record, you can check the previous lookup step to ensure it only has a size of 1.

First value:

{{lookupObjects.size}}

Second value:

1

image-20240606-072534.png

image-20240606-072546.png

Now we have found the User object within Assets, we now need to lookup the Device object, to do this we use the below query

objecttype = "Devices" and "Registered Owner" = "{{lookupObjects}}"

image-20240320-083426.pngimage-20240320-083404.png

Again, to ensure you only retrieve one record, you can check the previous lookup step to ensure it only has a size of 1.

First value:

{{lookupObjects.size}}

Second value:

1

image-20240606-072707.png

image-20240606-072718.png

Now we are adding an edit issue field which attaches the previously found Object to the issue. Select the Assets object field we create/edited earlier and add the query key = {{lookupObjects.key}}

Now, you can log a ticket and as long as the user and device have synced through with the application, it will attach to the ticket.

image-20240606-073230.png

Please note that this automation will only work if there is 1 user object and the user object is attached to 1 device. If you have an environment where users have multiple devices and this is an issue, please reach out to Support and we can help.

  • No labels