Manage Notifications

OnApp introduces new notifications functionality that fully replaces the previous email notifications set up at the Configuration page in CP. You can manage the following elements of the notificatiosn system:

  • Gateways define what type of notifications will be send: SMTP/SENDMAIL emails or internal notifications in CP.
  • Notification templates determine the text of the messages your users will receive. 
  • External recipients are the contacts not registered in OnApp whom notification can be sent.
  • Recipients lists include users whom certain notifications will be addressed.
  • Subscriptions tie all your configurations together. After you set up subscriptions your users will start receiving notifications.

You can also disable notifications for your cloud and delete for a period of time.



Manage Gateways


Gateways are used when setting up a subscription and determine in what way users will be contacted: via email or internal notifications in CP. To view your gateways go to Control Panel > AdminNotifications > Gateways. The page that loads shows your gateways with their names and the types of the gateways: SMTP, SENDMAIL or INTERNAL.


Edit Gateway



To edit a gateway:

  1. Go to Control Panel > AdminNotifications > Gateways
  2. Click the Actions icon next to the required gateway and select Edit
  3. Depending on the gateway's delivery method edit the following details:

    For the SENDMAIL delivery method:

    • Label - the name for your new gateway. The name of the gateway should not contain any special characters.
    • From - the email address from which emails will be sent
    • Host - the server IP or URL

    For the INTERNAL delivery method:

    • Label - the name for your new gateway. The name of the gateway should not contain any special characters.

    For the SMTP delivery method:

    • Label - the name for your new gateway. The name of the gateway should not contain any special characters.
    • From - the email address from which emails will be sent
    • Host - the server IP or URL
    • Smtp address - address of the SMTP server
    • Smtp port - port of the SMTP server
    • Smtp domain - associated domain
    • Smtp user name - user name to login into SMTP server
    • Smtp password - password to login into SMTP server
    • Smtp authentication - select an authentication mechanism from a drop-down menu: plain, login or cram_md5
    • Smtp enable starttls auto - enable the STARTTLS extension
    • Verify certificate (if tls enalbled) - enable if you want to verify your certificates or leave disabled if you want to skip verification during notifications delivery
  4. Click Save to apply changes


Delete Gateway


To delete a gateway:

  1. Go to Control Panel > AdminNotifications > Gateways
  2. Click the Actions icon new to the gateway you want to edit and select Delete

A gateway that is associated with at least one subscription cannot be deleted.



Manage Notification Templates


Notification templates include message texts that will be sent to your users via email or internal notifications in CP. There are two types of notification templates: system templates that come pre-installed with OnApp and cannot be deleted but only edited, and custom templates which you add to your cloud. To view your notification templates go to Control Panel > AdminNotifications > Notification Templates. The page that loads shows your notification templates with their names, indicators whether this is a system or a custom template and the template's text. If a template contains a long message, only the beginning of the text will be displayed.


Edit Notification Template


To edit a notification template:

  1. Go to Control Panel > AdminNotifications > Notification Templates.
  2. Click the Actions icon next to the required template and select Edit.
  3. On the page that loads you can edit the name and the text of the template. The name of the template should not contain any special characters. After editing the text you can save the changes or restore it to the default.
    When editing a system template, you can configure if HTTP or HTTPS should used in the links sent in the notifications.
  4. Click Save for the changes to take effect.

To edit system notification templates you need to have the the Update notification template permission enabled. You can also restore the message of a system template to default at Control Panel > AdminNotifications > Templates > Actions icon > Restore to default.

If you add a '%{message}' text to the template, the notification will contain the full text of the event that is written into logs. If you add a '%{name}' text to the template, the notification will contain the name of the user who will receive the notification. You can set the %{message} and %{name} placeholders for almost any type of event, however, the following events will have the different placeholders avalable:

  • federation new announcement - {label} and {period_for_federation_announcement} placeholders.
  • federation templates changed - {label} placeholder.

For custom events you can only set the %{message} and %{name} placeholders. 



Delete Notification Template


To delete a notification template:

  1. Go to Control Panel > AdminNotifications > Notification Templates
  2. Click the Actions icon next to the required template and select Delete

A notification template that is associated with at least one subscription cannot be deleted.

System notification templates for the reset password, account lock and transaction approval cannot be deleted.



Manage External Recipients


If you want to send notifications to emails that are not registered in your OnApp cloud you can add them to your External Recipients. Later these contacts can be added to recipients lists of users who will receive notifications about certain events.

To view the list of external recipients go to Control Panel > AdminNotifications > External Recipients. The page that loads shows the added external contacts with their name and email.


Edit External Recipients


To edit an external recipient: 

  1. Go to Control Panel > AdminNotifications > External Recipients
  2. Click the Actions icon next to the recipient you want to edit and select Edit.
  3. On the page that loads, edit the recipient's name and email. The name of the recipient should not contain any special characters.
  4. Click Submit to save changes


Delete External Recipients


To delete an external recipient:

  1. Go to Control Panel > AdminNotifications > External Recipients.
  2. Click the Actions icon next to the recipient you want to edit and select Delete. If you are attempting to delete an external recipient who is included into a recipients list, a confirmation window will appear.


Manage Recipients Lists


Recipients lists include the users whom you want to notify about certain events. To view your recipients lists go to Control Panel > AdminNotifications > Recipients Lists. The page that loads shows all your recipients lists. 

Click the name of the recipient list to view its list of users with their emails.


Edit Recipients List


To edit a recipients list:

  1. Go to Control Panel > AdminNotifications > Recipients Lists
  2. Click the Actions icon new to the list you want to edit and select Edit. Or just click the name of the required list.
  3. On the page that loads you can change the name of the list and add new recipients. The name of the list should not contain any special characters. External recipients will also appear in the drop-down list. The page also shows the recipients that are already in the list at the top of the screen. You can delete recipients from the list by clicking the  icon next to the required recipient.
  4. Click Update to save changes


Delete Recipients List


To delete a recipients list:

  1. Go to Control Panel > Notifications > Recipients Lists
  2. Click the Actions icon new to the list you want to edit and select Delete

A recipients list that is associated with at least one subscription cannot be deleted.



Manage Subscriptions


Using the Subscriptions section you determine who of your users are notified about which events. A subscription is the final step of a notifications configuration which ties together a recipients list, a gateway and a notification template. To view the list of subscriptions go to Control Panel > Admin > Notifications > Subscriptions

Click the name of the subscription to view the gateways, recipients lists, events and templates associated with it.


Edit Subscriptions


To edit a subscription:

  1. Go to Control Panel > AdminNotifications > Subscriptions.
  2. Click the name of the subscription you want to edit.
  3. Click the Edit Subscription button.
  4. On the page that loads you can change the name of the subscription and add new recipients lists, events and gateways. You can add events by clinking  the  button and delete events from the list by clicking the  icon next to the required event.
  5. Click Update to save changes.


Delete Subscriptions


Subscriptions determine who of your users are notified about which events and the type of the notification: email or internal notification in CP.

To delete a subscription:

  1. Go to Control Panel > AdminNotifications > Subscriptions
  2. Click the Actions icon next to the required subscription and select Delete


Delete Notification Data


You can delete notification data, including events, deliveries and notifications for a particular period of time. To delete all notification data, you need to run the following command from the onapp user: 

cd /onapp/interface
RAILS_ENV=production rake messaging:clean_notification_elements[2016-09-20,2016-09-23]

Change the dates in the example above to the ones you require and separate them by comma. The notification data is deleted for the period from the first date up to and including the second date you specify.

If the deletion of notification data fails, you can run the followig command:

cd /onapp/interface
RAILS_ENV=production rake messaging:fix_events_data

After running this command, you can repeat the previous step to delete notification data.



Disable Notifications


If required, you can switch off notifications for your cloud. In this case all your configurations will be preserved but notifications will not be sent to users. You can switch notifications back on at any time.

To enable/disable notifications for your cloud:

  1. Go to Control Panel > AdminNotifications > Configuration
  2. Move the Enable notifications slider to enable/disable notifications. By default, this option is disabled.
  3. Click the Save Configuration button