Freshdesk : automatically give a value to a custom field from another field

Hello!
I hope you are well

For a customer, I need to fill a company custom field value based on another. In the helpdesk, we have two custom field named “client code” (text field) and “numeric client code” (numeric field)

The “client code” is to be filled by the agent upon creating or updating a company. But afterwards, I need the “numeric client code” field to be automatically filled by the value of “client code”

image :

How can I do so?

Thanks

Hello @Andonirina,

You will have to build a custom app for this.

Use the onCompanyUpdate trigger and using Update Company API , update the value.

Custom App Trigger: https://developer.freshdesk.com/v2/docs/product-events/#oncompanyupdate
Update Company API: https://developer.freshdesk.com/api/#update_company

1 Like

Hello @adarsh ,

Thank you for your useful reply.
I just have a question : that custom app would be always running on background?
I already developed custom apps before but the app would only run when the app widget on ticket view is focused.
Do you have ressources on how can I build a custom app that is always running on the helpdesk?

Many thanks

@Andonirina

You can build serverless apps which run in the background. These apps do not have a UI.

Serverless Apps

1 Like

@Andonirina Do you want the Numeric Client Code custom field to be automatically filled up in the UI and let the agent update the values by clicking Create/Update Company button?
Or do you want to update it automatically in the portal without the agent’s action after the company is created/updated with only the Client Code custom field?

If in case of the first requirement, the app can be built with the “company_background” location on which page this change happens. So the app will be running by default on the page and update the value in the form.

If in case of the second requirement, the app can be a Serverless app as @adarsh has suggested. It will run only after the company is created/updated.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.