Logo: Relish

  1. Sign in

Project: My-project

provision_agency_template

The "default_templates" in Realm Template should contain:

  1. A template for each type of Role
  2. NotificationGroup, containing all the different events that should be notified when they occur.
  3. UserNotificationPreferences (one for each role), which contains the default notification settings depending on the role given to the user.

Note that the below is not a complete list of all the templates that should be added.
Please see spreadsheet for a full list of roles and notification events.

:default_templates => [
        [0] {
            :domain_spec_type => "Template",
                         :use => "Role",
                        :type => "Admin",
                     :default => "true",
                     :payload => {
                 :type => "Admin",
                :shell => {
                    :feature => "init",
                       :area => "shell",
                    :version => "1"
                }
            }
        },
        [1] {
            :domain_spec_type => "Template",
                         :use => "NotificationGroup",
                        :type => "NotificationGroup",
                     :default => "true",
                     :payload => {
                :domain_obj_label => "This is notification group"
            },
               :child_objects => [
                [0] {
                    :domain_spec_type => "EventNotification",
                          :event_name => "user_invited"
                },
                [1] {
                    :domain_spec_type => "EventNotification",
                          :event_name => "invitation_declined"
                },
                [2] {
                    :domain_spec_type => "EventNotification",
                          :event_name => "invitation_accepted"
                },
                [3] {
                    :domain_spec_type => "EventNotification",
                          :event_name => "user_logged_in"
                },
                [4] {
                    :domain_spec_type => "EventNotification",
                          :event_name => "user_suspended"
                }
            ]
        },
        [2] {
            :domain_spec_type => "Template",
                         :use => "Notification",
                        :type => "AcceptedInvitation",
                     :default => true,
                     :payload => {
                :email_subject => "Your account has been setup for $realm_name",
                :email_content => "Dear $user_name, Please click on the following $realm_url to go to the $realm_type."
            }
        },
        [3] {
            :domain_spec_type => "Template",
                         :use => "UserNotificationPreferences",
                        :type => "Admin",
                     :default => true,
                     :payload => {},
               :child_objects => [
                [0] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "user_invited",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                },
                [1] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "invitation_accepted",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                },
                [2] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "invitation_declined",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                },
                [3] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "user_suspended",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                }
            ]
        },
        [4] {
            :domain_spec_type => "Template",
                         :use => "UserNotificationPreferences",
                        :type => "PropertyManager",
                     :default => true,
                     :payload => {},
               :child_objects => [
                [0] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "user_invited",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                },
                [1] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "invitation_accepted",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                },
                [2] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "invitation_declined",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                },
                [3] {
                    :domain_spec_type => "UserNotificationPreferences",
                          :event_name => "user_suspended",
                    :domain_obj_state => "active",
                       :child_objects => [
                        [0] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "email",
                                          :on => "true"
                        },
                        [1] {
                            :domain_spec_type => "NotificationPreference",
                                        :type => "sms",
                                          :on => "false"
                        }
                    ]
                }
            ]
        }
    ]

Last published over 4 years ago by nbeagley.