Hi,
We are developing a React sidebar app to display ticket/contact information from an API. However, we noticed that when navigating to the next or previous ticket/contact, the app does not reinitialize and continues to show the previous ticket/contact information.
Is there a way to resolve this issue? Your prompt response would be greatly appreciated, as we have a customer waiting.
Thanks,
Claret Ivin
Hi @Claret_Ivin,
Greetings!
You can bring all the logics to a single function to achive this
async function init() {
client = await app.initialized();
client.events.on('app.activated', ()=> onActivate());
client.events.on("ticket.nextTicketClick", ()=> onActivate());
client.events.on("ticket.previousTicketClick", ()=> onActivate());
}
onactivate => {
// API call
// UI update
}
Hope this helps!
Thank you.
Hi @Bene_Immanuel,
Thanks for your help! We’ve adjusted it to fit our requirements.
Additionally, we’ve raised a query regarding serverless events. Could you take a look when possible? We are analyzing a requirement.
Issue with Serverless Events: onTicketUpdate Not Returning Data, onConversationCreate Not Triggering - Product / Customize x Workflows - Freshworks Developer Community
Thanks,
Claret Ivin