diff --git a/src/app/core/header/header.spec.ts b/src/app/core/header/header.spec.ts
index 13f8b5b..eb236b1 100644
--- a/src/app/core/header/header.spec.ts
+++ b/src/app/core/header/header.spec.ts
@@ -51,11 +51,26 @@
 const infoNotification = {
   model: 'TestModel',
   msg: {
-    changed_fields: ['backend_status'],
+    changed_fields: ['backend_status', 'backend_code'],
     pk: 1,
     object: {
       name: 'TestName',
-      backend_status: '0 - In Progress'
+      backend_status: 'In Progress',
+      backend_code: 0
+    }
+  }
+};
+
+const noNotification = {
+  model: 'TestModel',
+  skip_notification: true,
+  msg: {
+    changed_fields: ['backend_status', 'backend_code'],
+    pk: 1,
+    object: {
+      name: 'TestName',
+      backend_status: 'In Progress',
+      backend_code: 0
     }
   }
 };
@@ -74,6 +89,9 @@
       .value('toastrConfig', MockToastrConfig)
       .value('AuthService', MockAuth)
       .value('XosNavigationService', {})
+      .value('ConfigHelpers', {
+        stateWithParamsForJs: () => null
+      })
       .value('XosKeyboardShortcut', MockXosKeyboardShortcut)
       .value('StyleConfig', {
         logo: 'cord-logo.png',
@@ -92,6 +110,7 @@
 
     // clear notifications
     isolatedScope.notifications = [];
+    MockToastr.info.calls.reset();
   }));
 
   it('should render the appropriate logo', () => {
@@ -116,6 +135,8 @@
   });
 
   it('should configure toastr', () => {
+    delete MockToastrConfig['onTap'];
+
     expect(MockToastrConfig).toEqual({
       newestOnTop: false,
       positionClass: 'toast-top-right',
@@ -129,7 +150,14 @@
     sendEvent(infoNotification);
     scope.$digest();
 
-    expect(MockToastr.info).toHaveBeenCalledWith('Synchronization started for: TestName', 'TestModel');
+    expect(MockToastr.info).toHaveBeenCalledWith('Synchronization started for: TestName', 'TestModel', {extraData: {dest: null}});
+  });
+
+  it('should not display a toastr for a new event that use skip_notification', () => {
+    sendEvent(noNotification);
+    scope.$digest();
+
+    expect(MockToastr.info).not.toHaveBeenCalled();
   });
 
   // TODO test error and success toaster call
diff --git a/src/app/core/header/header.ts b/src/app/core/header/header.ts
index a89199d..a465f8f 100644
--- a/src/app/core/header/header.ts
+++ b/src/app/core/header/header.ts
@@ -26,13 +26,29 @@
 import {IXosStyleConfig} from '../../../index';
 import {IXosSearchService, IXosSearchResult} from '../../datasources/helpers/search.service';
 import {IXosKeyboardShortcutService} from '../services/keyboard-shortcut';
+import {Subscription} from 'rxjs';
+import {IXosConfigHelpersService} from '../services/helpers/config.helpers';
 
 export interface INotification extends IWSEvent {
   viewed?: boolean;
 }
 
 class HeaderController {
-  static $inject = ['$scope', '$rootScope', '$state', 'AuthService', 'SynchronizerStore', 'toastr', 'toastrConfig', 'XosNavigationService', 'StyleConfig', 'SearchService', 'XosKeyboardShortcut'];
+  static $inject = [
+    '$log',
+    '$scope',
+    '$rootScope',
+    '$state',
+    'AuthService',
+    'SynchronizerStore',
+    'toastr',
+    'toastrConfig',
+    'XosNavigationService',
+    'StyleConfig',
+    'SearchService',
+    'XosKeyboardShortcut',
+    'ConfigHelpers'
+  ];
   public notifications: INotification[] = [];
   public newNotifications: INotification[] = [];
   public version: string;
@@ -42,7 +58,10 @@
   public query: string;
   public search: (query: string) => any[];
 
+  private syncStoreSubscription: Subscription;
+
   constructor(
+    private $log: ng.ILogService,
     private $scope: angular.IScope,
     private $rootScope: ng.IScope,
     private $state: IStateService,
@@ -53,8 +72,14 @@
     private NavigationService: IXosNavigationService,
     private StyleConfig: IXosStyleConfig,
     private SearchService: IXosSearchService,
-    private XosKeyboardShortcut: IXosKeyboardShortcutService
+    private XosKeyboardShortcut: IXosKeyboardShortcutService,
+    private ConfigHelpers: IXosConfigHelpersService
   ) {
+
+  }
+
+  $onInit() {
+    this.$log.info('[XosHeader] Setup');
     this.version = require('../../../../package.json').version;
     angular.extend(this.toastrConfig, {
       newestOnTop: false,
@@ -62,10 +87,9 @@
       preventDuplicates: false,
       preventOpenDuplicates: false,
       progressBar: true,
-      // autoDismiss: false,
-      // closeButton: false,
-      // timeOut: 0,
-      // tapToDismiss: false
+      onTap: (toast) => {
+        this.$state.go(toast.scope.extraData.dest.name, toast.scope.extraData.dest.params);
+      }
     });
 
     this.search = (query: string) => {
@@ -94,27 +118,43 @@
 
     this.userEmail = this.authService.getUser() ? this.authService.getUser().email : '';
 
-    this.syncStore.query()
+    this.syncStoreSubscription = this.syncStore.query()
       .subscribe(
         (event: IWSEvent) => {
-          $scope.$evalAsync(() => {
+          this.$scope.$evalAsync(() => {
+
+            if (event.model === 'Diag') {
+              // NOTE skip notifications for Diag model
+              return;
+            }
+
             let toastrMsg: string;
             let toastrLevel: string;
-            if (event.msg.object.backend_status.indexOf('0') > -1) {
+            if (event.msg.object.backend_code === 0) {
               toastrMsg = 'Synchronization started for:';
               toastrLevel = 'info';
             }
-            else if (event.msg.object.backend_status.indexOf('1') > -1) {
+            else if (event.msg.object.backend_code === 1) {
               toastrMsg = 'Synchronization succedeed for:';
               toastrLevel = 'success';
             }
-            else if (event.msg.object.backend_status.indexOf('2') > -1) {
+            else if (event.msg.object.backend_code === 2) {
               toastrMsg = 'Synchronization failed for:';
               toastrLevel = 'error';
             }
 
             if (toastrLevel && toastrMsg) {
-              this.toastr[toastrLevel](`${toastrMsg} ${event.msg.object.name}`, event.model);
+              let modelName = event.msg.object.name;
+              let modelClassName = event.model;
+              if (angular.isUndefined(event.msg.object.name) || event.msg.object.name === null) {
+                modelName = `${event.msg.object.leaf_model_name} [${event.msg.object.id}]`;
+              }
+
+              const dest = this.ConfigHelpers.stateWithParamsForJs(modelClassName, event.msg.object);
+
+              if (!event.skip_notification) {
+                this.toastr[toastrLevel](`${toastrMsg} ${modelName}`, modelClassName, {extraData: {dest: dest}});
+              }
             }
             // this.notifications.unshift(event);
             // this.newNotifications = this.getNewNotifications(this.notifications);
@@ -123,6 +163,11 @@
       );
   }
 
+  $onDestroy() {
+    this.$log.info('[XosHeader] Teardown');
+    this.syncStoreSubscription.unsubscribe();
+  }
+
   public getLogo(): string {
     return require(`../../images/brand/${this.StyleConfig.logo}`);
   }
