Skip to main content

Hi,

We have created an optional custom field on our service desk ticket form to record who was at fault (if anyone) for a particular ticket to monitor the levels of errors made by staff to help with training.

We already have the Requester field which automatically populates the Dept field based on the Requester’s set Dept.

I have now created a second field which is using the Dept data which I want to automatically populate if the user at fault field is filled in, based on their dept and not that of the Requester field as this can often be a different person.

Is this possible?

Thanks,

Stephen.

Hi ​@sjgibb 

 

You want to record the username in a custom field when the “reason” field is user error?

Which user are you auto populating? If it’s not always the fault of the requestor,  how do you know who’s at fauit?

 


Hi,

 

For this use case we will be making corrections on our CMS and we can see who created the error from the data stored on the CMS.

So the field we have is called “Caused By”. It is optional as for most tickets this isn’t relevant. Caused by is linked to our list of users on the system, to which we already have their Dept stored noted. 

I have now added a new “Caused By Dept” field linked to our list of stored Depts in FreshService. 

I’m hoping we can have it so if and when the Caused By field is completed, the Caused By Dept field automatically picks up the Dept for the person selected in the “Caused By” field.

I added this new Dept field to make it easier to create reports on this for the Dept team leaders. 

 

Does that make sense?

Thanks. 


Hi.

If I understood correctly your inquiry / use case, then this can be done, by using web hooks / API calls.

You need to get the requester ID (which I understand you already have)

Service Desk API for Developers | Freshservice

Get his/her department.

Then, get department data:

Service Desk API for Developers | Freshservice

Then populate your new custom department field with a PUT call.

 

Here is some additional reference:

How can I get the ticket fields using APIs? : Freshservice

Setup application callbacks from your service desk | Freshservice Observer with Webhooks : Freshservice

 

Regards,


Hi,

Thanks for the info and links. I’ll have a look over that and see what I can do.

 

Much appreciated.

Stephen.