Why no update bubble?

You know this little bubble you get when a ticket updates -

image

What could I have done in my app that would block that?

A note gets added to the ticket through an API call in my code but no update bubble. I have to refresh the page :frowning:

Any ideas please?

1 Like

After you refresh the page, Does the update bubble appear? or is it just that the note gets added?

Hey Saif,

Thank you for your reply. After the refresh, still no update bubble, yes note just gets added in. It will also get added in / spontaneously appear if I add another note.

Also, it only applies to the notes my code adds. Still get update bubbles on everything else.

My intuition has me thinking it has something to do with the way the app is initialized/activated? I basically kept what came in the default fdk create app.js, and called a function in init to wait on the events I was looking for -

document.onreadystatechange = function () {
  if (document.readyState === 'interactive') renderApp();

  function renderApp() {
    var onInit = app.initialized();

    onInit.then(getClient).catch(handleErr);

    function getClient(_client) {
      client = _client;
      client.events.on('app.activated', onAppActivate);
	  awaitEvents();
	} // end function getClient
  }
};

function onAppActivate() {
  /*var textElement = document.getElementById('apptext');
  var getContact = client.data.get('contact');
  getContact.then(showContact).catch(handleErr);

  function showContact(payload) {
    console.log('here');
  }*/
  console.log('happy');
}
/*
function handleErr(err) {
  console.error(`Error occured. Details:`, err);
}
*/
function awaitEvents() {
	
	var eventCallback1 = function (event) {
		console.log(event.type + " event occurred");
		setup();
	};
	client.events.on("ticket.sendReply", eventCallback1);

Or when my code then finishes on what I have it do after that event occurs, should I have some call at the end of that or?

I looked into this more, still no update bubble. Could you please let me know what I’m missing / if you have any suggestions?

I found in the documentation - App Lifecycle Events - that “the core logic of the app should not be within the app.initialized() callback. It should be within the app.activated() callback” so I restructured my code like so -

document.onreadystatechange = function () {
  if (document.readyState === 'interactive') renderApp();

  function renderApp() {
    var onInit = app.initialized();

    onInit.then(getClient).catch(handleErr);

    function getClient(_client) {
      client = _client;
	  console.log('INITIALIZED');
      client.events.on('app.activated', onAppActivate);
	} // end function getClient
  }
};

function onAppActivate() {
	console.log('ACTIVATED');
	var eventCallback1 = function (event) {
		console.log(event.type + " event occurred");
		setup();
	};
	client.events.on("ticket.sendReply", eventCallback1);
	
	var eventCallback2 = function (event) {
		console.log(event.type + " event occurred");
		setup();
	};
	client.events.on("ticket.addNote", eventCallback2);
}

function handleErr(err) {
  console.error(`Error occured. Details:`, err);
}

… but as I say, still no update bubble when my code adds in a note. Any idea what I’m missing?

Just wanted to appreciate what you’ve tried :slight_smile:

It might be possible that Freshdesk brings in notification bubble only when observed within product. Also, updates bought in via APIs and Apps may have been missed out.

Just to help me channel your feedback to product team better, Apart from UX problem this brings to the table, is there anything else pertaining to your app or the use case which makes ‘updating bubble’ as important?