Multiple asset names into a single new ticket creation script

Im rather novice in terms of Syncro scripting. I was wondering if there was a way to run a script from the Assets page (after selecting say SERVER1, SERVER2 and SERVER3 assets) then running a new ticket creation script for the customer in question that would pull in the 3 assets hostnames somehow into the new ticket body text. I thought I was on to something but it made single ticket for each asset selected instead of just one.

Thank you in advance for suggestions!

Edit, I looked into the canned responses feature but didnt see a way to put custom fields in there, am I overlooking something?

1 Like

I don’t believe there is an easy way to accomplish this. Scripts run independently on each device you select, (hence the 3 tickets) as I assume you called the Create-Syncro-Ticket function in your script. There is an update function, but it doesn’t appear to allow anything other that status updates and custom field changes.

You can you the API to create a ticket, but I still don’t think that really would accomplish what you’re trying to do, unless you aggregate your results yourself to an external source and then read that source when creating the ticket using the API, but that seems like a lot of workaround type stuff.

Why do you have the need to dynamically grab the hostname instead of just creating one ticket and manually adding the hostnames (since you clearly know them if you’re selecting them from the asset list)?

1 Like

I do monthly work on 100+ customers sets of servers. In the ticket body I write (er, copy/paste) the same thing every time aside from 2 variables - the server os version and the hostname(s). I was looking for a way to make this ticket generation easier/faster/more fluid. I found an undocumented secret with the canned responses that allows {{custom_fields}} within the canned response ( @Andy can this be added to the Canned Response documentation at Canned Responses ? )
I may just hack and slash something together with this, I suppose I could add a custom field to customers, something like {{server_hostname_list}} and {{server_versions}}. Thank you for getting back to me on this idea, really just trying to avoid repetitive copying and pasting for ticket generation.

@canden.hicks can you make a note on the comment above about documenting this please?

1 Like

I could see this being painful lol.

And yea, if you do the same thing to all servers at each customer, perhaps as you mentioned, maintaining a custom field that lists all servers and the OS version would be a way to accomplish what you want to do. Still sucks you’d have to set them up manually at first, but would save time moving forward.

Only other thing I can think of, I kind of touched on it, is if these customers have a DC and all servers have access to DC, you could then create a script, run it against all servers to update their name and OS to a single file on the DC, then run your script that creates the ticket and reads the file contents to populate the body. Still work but blah lol.

1 Like

Thanks Mark! For now, Ill probably just add the customer custom fields and use those tags in the canned response on ticket generation. As odd is this sounds, I know all of the hostnames/os versions for these clients from memory. They’re all HOSTS and VMs I named, configured and maintain regularly. None of our clients are so big they have more than 6 servers fortunately.

I know its a feature request already submitted, but having flexible bulk ticket creation would be a huge improvement to Syncro.

1 Like

Hi @ethan, sent your secret hack over to the knowledge base team to be added to the documentation, they will review the request and make the call on adding it.