Notification Auto/time interval triggering
Service Studio Version
11.11.0 (Build 42743)

Hi All,

I would like to ask help concerning how to automatically or time interval way to trigger the execution of the notification widget?


We are using Traditional Web. 

I saw a post but i believe its for mobile application and not suitable to traditional web?
How to programmably auto refresh a mobile screen


mvp_badge
MVP
Solution

Hi d cabral,


Not having seen your code, I would say that you may be AJAX refreshing the WB pooling by including it inside the NotificationIcon.

Don't AJAX refresh WB_Pooling if that is the case.


Kind Regards,
João

mvp_badge
MVP
Solution

Hi d cabral,


This mechanism is called polling - to ping the server in a given interval of time.

I have created a sample which follows in attachment, showing how to do it in Traditional Web, hopefully it will help you understand and use the same logic for your use case.


Kind Regards,
João

TraditionalWebSandbox.oml

Thank you for the help Joao its working though to often even though i set it to trigger every 5 seconds.

May I know what will be the best practice for this approach as I have inserted the the WB_Pooling to the NotificationIcon Web Block and the every 5 second only works once.


here is my action flow that is being triggered bt the WB_Pooling

mvp_badge
MVP
Solution

Hi d cabral,


Not having seen your code, I would say that you may be AJAX refreshing the WB pooling by including it inside the NotificationIcon.

Don't AJAX refresh WB_Pooling if that is the case.


Kind Regards,
João

Thanks for the help really appreciate it. its working now as expected. 

Hi d Cabral,

you can use javascript to reload the page on a defined interval using this method. 5000 is for 5 seconds.

setTimeout(function(){
   window.location.reload(1);
}, 5000);

Hi Jose,

I was planning to refresh/automatic update the the web block notification only. We are hoping to have some kind of push notification but in the client side to re-check for new notification.

mvp_badge
MVP
Solution

Hi d cabral,


This mechanism is called polling - to ping the server in a given interval of time.

I have created a sample which follows in attachment, showing how to do it in Traditional Web, hopefully it will help you understand and use the same logic for your use case.


Kind Regards,
João

TraditionalWebSandbox.oml

Thank you for the help Joao its working though to often even though i set it to trigger every 5 seconds.

May I know what will be the best practice for this approach as I have inserted the the WB_Pooling to the NotificationIcon Web Block and the every 5 second only works once.


here is my action flow that is being triggered bt the WB_Pooling

mvp_badge
MVP
Solution

Hi d cabral,


Not having seen your code, I would say that you may be AJAX refreshing the WB pooling by including it inside the NotificationIcon.

Don't AJAX refresh WB_Pooling if that is the case.


Kind Regards,
João

Thanks for the help really appreciate it. its working now as expected. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.