Question

Automated Change Tickets

  • 9 November 2022
  • 5 replies
  • 61 views

Userlevel 1
Badge +1

Is there a way to schedule an automated change ticket to be created at the beginning of every year?

Took a look at the Scheduler in FreshService, but it looks like it only incident tickets can automatically be created.


5 replies

Userlevel 2
Badge

Hi atexeira,

At this moment we can't schedule a workflow yet, so the workaround at this moment could be made van the Scheduler. You're right we can raise Incident or Service request tickets here only, however, we can use a scheduled incident ticket, to trigger a workflow that will create a Change ticket via the API / Web request node.

Create your Scheduled ticket and use something unique in i.e. the ticket Subject. Maybe a special code that will never be entered by an agent or requester.

Set the interval to Monthly with January as month, at a certain time (in this example I've set it to weekly):

 

Go to your workflow automator and create a new Ticket workflow.

Event: Incident is raised

Condition: Subject is (or contains) <your subject from the scheduled ticket>

For the Web Request node you need to read the information about how to create a Change ticket via API: https://api.freshservice.com/v2/#create_change

Request Type = Post

Url: https://example.freshservice.com/api/v2/changes

Body:

{
  "description": "<div>Hi Team, <br/><br/>This is a Change ticket created via a Scheduled ticket</div>",
  "subject": "Change ticket test",
  "email": "test@test.com",
  "priority": 1,
  "status": 1,
  "risk": 1,
  "impact": 1,
  "change_type": 1,
  "planned_start_date": "2023-01-01T08:30:00Z",
  "planned_end_date": "2023-01-05T08:30:00Z"
}

 

So the Scheduler is raising the Incident ticket:

 

The ticket workflow is triggered by the Incident ticket, that is raising the Change ticket:

 

As last step in the ticket workflow, could be an Action node where you set the Status of the scheduled ticket to Closed (or delete the ticket).

 

Let me know your thoughts and results.

 

Kind regards,

 

Rutger Bockholts

Freshworks

Userlevel 1
Badge +1

Thanks @Rutger Bockholts! The steps you provided didn’t work exactly the way as expected, but it definitely helped! 

Instead of using a Web Request Note, I ended up using a “Trigger Webhook” action item in the Workflow Automator.  So I was able to get the change ticket automatically created after an scheduled incident ticket is opened automatically.

The next thing I’m running into is that it creates the change ticket without any of the planning details, but requests for approval. Any thoughts of either:

  1. Having the planning details populated during the automation (for this particular change ticket, it will be the same every time) and then requesting for approval; OR
  2. Having the automated ticket not request for approval upon automated creation?
Userlevel 6
Badge +10

Thanks @Rutger Bockholts! The steps you provided didn’t work exactly the way as expected, but it definitely helped! 

Instead of using a Web Request Note, I ended up using a “Trigger Webhook” action item in the Workflow Automator.  So I was able to get the change ticket automatically created after an scheduled incident ticket is opened automatically.

The next thing I’m running into is that it creates the change ticket without any of the planning details, but requests for approval. Any thoughts of either:

  1. Having the planning details populated during the automation (for this particular change ticket, it will be the same every time) and then requesting for approval; OR
  2. Having the automated ticket not request for approval upon automated creation?

Downside of the webhooks is that you don’t get anything back and can’t act on it just so you know. 
Other then that they should work the same. 

Userlevel 1
Badge +1

Downside of the webhooks is that you don’t get anything back and can’t act on it just so you know. 
Other then that they should work the same. 

Thanks for the tip @daniel.soderlund!

I’ll keep that in mind as we start to do more in our portal using these other options in Workflow Automator. 

Userlevel 2
Badge

Downside of the webhooks is that you don’t get anything back and can’t act on it just so you know. 
Other then that they should work the same. 

 

Instead of using the Webhook, use the Web Request node instead. With this you can Parse the header data (instead of the response body) from the Web Request node, as well as using the statuscode (200, etc) as a condition to verify if the request is done right.

 

Reply