We have a public app called Hide Fields App, this app runs in background on following locations
New Ticket Page
Ticket Details Page
New Email Page
On the appActivate function we have configured to listen for the following events:
ticket.customFieldChanged
ticket.statusChanged
ticket.priorityChanged
ticket.groupChanged
ticket.agentChanged
ticket.typeChanged
ticket.nextTicketClick
ticket.previousTicketClick
ticket.productChanged
ticket.propertiesUpdated
The platform is not triggering any of the events mentioned above during the initial load of New Ticket Page.
We can set rules in the app settings and make some fields hidden, even though the rules are matched in the initial load in New Ticket Page the fields are not hidden since the event itself is not triggered.
Kindly let us know if you had faced similar challenges and if possible solution/workaround for this.
@Saif yes, it happens on an initial load/refresh of the New Ticket page. The event will only get triggered once the user changes the ticket properties.
await client.events.on("app.activated", configureEvents) // configureEvents is dev defined logic
Well, #1 invokes your JS code when the browser loads the entire Freshdesk Page. However, #2 invokes your JS only when the user action associated to the placeholder is performed.
We tried app.initialized() option as well, but it didn’t help.
I spoke with the engineering team. Right now, the change events are not triggered in the new ticket and new email page load, it only triggers when the value gets changed either by a user or template.
We did a workaround to set the status and priority values with default values on the app.activated() to forcefully trigger the property change events on the new ticket and new email page.
This approach seems to be working properly as of now.