My goal is to have an automation that will run in a JSM project when a ticket is made that will look at current objects in Assets and either create an object if a field is not found or update an already existing object if the field is found.
I currently have an automation rule that:
Right now, that automation is very simple and just makes an object. What I'd like it to do is include a check against current objects by looking at the serial number field and if that serial number exists I want it to edit an object instead of creating an object. Finally, if the serial number does not exist, then it just creates the object.
This is my current create object automation, which is running on issue creation. I want to add the Lookup objects action and look at all current object's Serial Number's and if it matches, I update the object with the matching serial number otherwise i create a new object.
Here you can see kind of where I'm trying to go.
On issue creation, I want to look at all objects in the Schema A S Equipment and I put Serial Number = {{issue.description}}
The ticket that is created in this project contains the Serial Number in the issue description area (not sure if this is how to achieve this)
I then added an if/else condition:
If the description field of the issue contains a serial number found in the Schema then it will update the Branch and User Assigned fields of that given object in a Then:Edit object attributes action.
Else it will create the object. Is this correct? I'm having issues when trying to run this currently.
When the issue is created, the issue's description contains the serial number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.