FreshService Custom Data Source

This may be a little roundabout to get started, so thanks for the patience…

Use case is for FreshService laptop repair incident. The requester is an adult (overseeing a laptop repair) but I’m wanting to have a drop-down list of students where we can choose which student caused the damage.

Some options we’ve considered…

  • Could have a field with Student ID number, but not helpful to end user when viewing in FreshService web tool
  • Could have a text field with student name (but duplicate names, no ID number to easily search)
  • Really can’t add students as requesters, since it needs to be the adult overseeing the repair

I see the ability to create a custom dropdown field and a “select from data source”.
One other idea was to add students as requesters and use that additional custom field to link back to requesters, but I really don’t want 14,000 people in the drop down list…

Is there a provision to create a new data source (ie. students) and then select from the data source based on student ID?

My thought would be to then use the API to insert the student ID number (when ticket is created via the API) and the FreshService console would show the student name in the dropdown list.

Does that make sense? Thankful for any help, suggestions or alternatives! :slight_smile: Derry

HI @DerryLyons, welcome to the developer community. Sorry that you had to wait so long for a response.

Yes, this is the direction I would suggest to implement this use case.

You can write an app for Freshservice that stores the student id in a field on the ticket in the onTicketCreate event, and stores an internal mapping of the student id with details of the student. You can implement this internal mapping using entity storage. Then, add a frontend component that looks up entity storage for student details based on the student id and displays it in the ticket sidebar. This same app can use a scheduled event to periodically sync student profile data from a remote source.

If you need other apps to access this mapping of student id to ticket, or don’t need to fetch that information through the REST API, then you can also store the mapping entirely in the app’s data storage.

I have a sample app for Freshservice that implements a similar use case using entity storage: entity-storage-samples/freshservice/employee-sync at main · freshworks-developers/entity-storage-samples · GitHub.