Add Comments to a Service Request

I have created a simple Runbook to add a comment to a service request. This will be useful for the analyst to keep track of where an automated process is up to. The basic Runbook looks like the one below.

image

The steps are quite simple. The Initialize Data activity has two inputs – the GUID of the service request and a comment.

image

The next activity is a script activity which generates a new GUID and also gets the current date and time. When I was creating this Runbook I had a lot of failures because there was no GUID for the comment which is required to create the related object. So my script solves this and creates a GUID for me. It also formats the date and time into the format required by Service Manager.

image

The next activity creates the comment – it is a Create Related Object activity from the Service Manager integration pack. Fill out the main field as below.

image

The optional properties that we need to set are below.

  • Comment – use the comment property from the Initialize Data activity
  • Entered By – name for the user entering the comment. I use Orchestrator in this value
  • Entered Date – date published data from the Run .NET Script activity
  • ID – GUID published data from the Run .NET Script activity

When I call the Runbook from another Runbook this is the kind of entry I get in the service request log.

image

I need to play with the time and date – but I can experiment with this later.