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?

1 Like

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?

1 Like

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?

1 Like

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?

1 Like

Thanks, Saif! Def been tryin :slight_smile:

I’ll get this into a production version soon and let you know if any change in update bubble behavior.

And yes, it’s the UX experience, which I feel like makes for a strong case in itself? When users are accustomed to a certain experience, they quickly write off anything that deviates from that.

2 Likes

Well I didn’t think I’d get one in that quick :slight_smile: But I did and no change, ie still no update bubble comes through after my code adds a note through API call. Page either needs to be refreshed or can add another random / bogus note and the note added from my code will pop in.

2 Likes

I will for now convert this topic as a feedback item. I will have it moved as a request for :freshdesk: to prioritise it.

1 Like

I wanted to add that this is not limited to freshdesk, the same lack of an update bubble happens in freshservice as well. The strange thing is that if you use the workflow automator in freshservice to trigger a webhook (hitting the same V2 api endpoint) to update a ticket or add a note, an update bubble or new conversation bubble will appear. It seems to be only an issue for installed applications that cause ticket updates that lack the “in browser” refresh to show the bubble.

2 Likes