Jump to content
kostam

Create internal comments to Manage tickets from Automate

Recommended Posts

Hi everyone,

I'm rather new to Automate, but over the last 2 months I've spent almost all my time learning it's functions.

I'm currently at a stage where I have a script in Automate that creates a ticket, which then transfers over to Manage using the ConnectWise Manage plugin. Now, this works perfectly. I can even have the script make additional comments on the ticket, however, I'd like the script to make internal comments on the ticket too. At this stage, I can't figure out how to do this, or find out if it's even possible.

The 'Ticket Comment' script step only creates a public facing comment which is visible to the client. There doesn't seem to be any option to make this an internal / private comment.

I had a look at the 'Ticket Reading View' script step, noting the 'For Customer' part of the step which states "Hide internal Ticketing information", but when adding this to my preexisting script and changing the option to 'No', it does not resolve the issue (nor does 'Yes').

Can Automate create internal comments into Manage tickets via a script?

Any help would be greatly appreciated. Thanks for taking the time to read this.automate1.thumb.PNG.cac2b7ab36b55647996e5ecf4d6c6634.PNG 

automate2.PNG

Edited by kostam

Share this post


Link to post
Share on other sites

Yikes... I don't think ticket comments in Automate have any awareness of the idea of internal notes on the Manage side, I'm afraid. I'd be glad to be proved wrong though.

  • Like 1

Share this post


Link to post
Share on other sites

With the help of a colleague, I got this working. That said, it's a bit of an out-of-the-box workaround.

So as a bit of background, I've got my Automate script that kicks off a PowerShell script that does things, then upon running, it creates a ticket in Automate, which flows through to Manage. That worked fine, and I could add comments via the script as well, which would appear under the "Discussion" comments in Manage. But I needed a way to add internal comments / notes to Manage.

I'd read about Email connector tags when first learning about Manage, but had forgotten all about them until a colleague sent me a link to the ConnectWise University page on them. Basically, using the tags in an email reply to a Manage ticket, you can do a number of things, including adding an internal comment using !!AddInternal: text here!! in the body of the email. Great find, I thought as I added the 'Send Email' function into my Automate script with the internal comment tags. But upon running the script, I found that it wasn't adding new comments to my existing ticket, but instead adding entirely new tickets. Upon a closer look, I saw that these new Manage tickets had strange ticket numbers in their 'Summary' field (which would read: "RE: Ticket#123456" - which is what I had intended as it is required by the tags to work - see the doco under Email Subject Line). I opened the same ticket in Automate and found that ticket number in the 'Summary' field was actually the Automate ticket number, not the Manage ticket number. My script was told to pass the %ticketid% variable into the 'Subject/Summary' field of the email/ticket, but since it was passing the Automate number instead of the Manage number, upon receiving the email, Manage had no idea what ticket number that was or what to do with it, so instead of adding a comment, it simply created a new ticket.

That was annoying, and it took a while to work out a solution. Simply changing the 'Subject/Summary' field to the same Manage ticket ID wasn't an option, as I need to be able to deploy this script to different clients, on the fly. So I needed something that knew the Manage ticket ID and passed that into the same field, and once received, Manage would know what to do with it.

It took me a little while to consider how I could grab this ID. I considered writing a Python script to grab the Manage ticket ID from the Manage server, but then how would I know which ID to grab? Then I realized that I could simply create a new Automate script, which grabs the Automate ticket ID (%tickekid%) from my original script and runs an SQL query on my Automate server, using that ticket ID to find the associated Manage ticket ID, followed by passing that value into a variable, and then kicking off the email to Manage.

This worked. As I said, it's a bit of an out-of-the-box workaround. I'm sure someone will post a reply stating that you can simply make internal comments by doing X - which is much easier 😂

TL;DR: Using the email connector tags I could add internal comments to Manage tickets. However, I first needed to pass the correct ticket ID into the subject line of the email to Manage. Initially this was passing the Automate ID, but I needed the Manage ID. I made a separate script that kicked off an SQL query on my Automate server, querying the Automate ID, returning the Manage ID of the associated ticket. I then stuck that Manage ID into the subject of the ticket and bingo!

Sorry about the wall of text. Maybe it'll help someone else.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...