Question

Automatically raise a change

  • 5 April 2023
  • 2 replies
  • 153 views

Userlevel 1
Badge

Hi.  I’m still learning how to use FreshService, but I was wondering if you could help me please.  We have a third party supplier that emails us when they need us to approve a change.  This raises a ticket in FreshService.  I’d like to put some automation in place so that it will automatically raise a change request (preferably using the template I have created) and then close the incident that was raised through the email.  

I’m really struggling to work out how to do this.  I’ve managed to suss out that I perhaps need to use a Webhook, but I’ve tried creating one and it just errors.

Can anybody point me in the right direction please?


2 replies

Userlevel 7
Badge +16

Hello @lisa.price you are correct in that you would need to use a webhook. That webhook needs to reach out the freshservice API and use the Create Change endpoint where you then will populate the required fields of your change form. Unfortunately you can’t select a template in an automation but if you know what fields need filled in for that specific change you can just pass those values into the body of the request you make. You also can associate the ticket to the change using the API if that is something you want to do. Then you can add an action block that will interact with the ticket to close it and update any incident fields necessary.

You may need some examples on how to do this. Let me know and I can try and put something together to demo it.

Here is the API documentation I referenced:

https://api.freshservice.com/v2/#create_change

Hope that helps!

Userlevel 1
Badge +3

Hi @lisa.price 

 

Thank you for reaching out! 

 

We at the moment do not have an option to automatically create a change other than using webhook as an option. However, you can make the process easier by following the instructions below, 

 

In the ticket that was created for a change, please navigate to the Associations tab and choose the option “Change initiated by this ticket”.

While creating the change use the templates option and create it from the slider. 

As a third step, to close the associated ticket - Create an automation in the workflow automator as follows, 

  • Add Change via incident to the subject of the Change that you are creating
  • Automation to be applied on Change module.
  • Event - Change is created > Condition - Change Field.Subject is Change via incident > Action - Set status as Closed (Action to be performed on ticket)

Thanks! 

Reply