Notifications help you build a tighter, more robust community. They drive users to your site by notifying them of a recent event, then directing them to the affected page.
Ektron's notification system creates and transmits a notification message to recipients through various agents, based on Ektronactivities. The activities may be performed by a community group, membership user, or an Ektron user. For example, a membership user wants to notify colleagues whenever a documented is uploaded to the profile page. When this occurs, an Ektron event is triggered, which causes a notification agent to send an email to the person's colleagues.
Users can decide:
NOTE: A user's profile Activities tab has a Community Groups subtab, which lets the user set notification preferences for all community groups. To refine preferences further, a user can access the profile of any community group and click Edit Group Notification Preferences to set preferences for that particular group.
NOTE: The above points regarding message recipients are general. For specific details about which recipients receive notification messages, see Notification Message Recipients
For example, Julia adds content to an Ektron folder for which her colleague, Tyler, does not have permission. Tyler is not notified when content is added, even though he signed up to be notified about colleagues’ activities.
However Kristin, another colleague who has permission to edit the folder’s content and who signed up to be notified about colleagues’ activities, does receive Notification of that event.
Similarly, private content is only viewable by authorized Ektron users or membership users with at least Read-Only permissions for its folder.
Activity Type that Triggers Message |
Colleague Action (available on Colleagues sub-tab) |
Community Group Action (available on Groups sub-tab) |
User Action to Notify Others about (available on My Activities sub-tab) |
Add Colleague— user adds a colleague |
|
|
|
Add/Edit Group Content—user uploads content to community group Workspace |
|
|
|
Add/Edit User Workspace Content—user uploads content to his profile |
|
|
|
Add Site Content—user adds content to Ektron |
|
|
|
Add/Update Site Calendar Event —event is added or changed on site Calendar | |||
Add/Update User Calendar Event —event is added or changed on user Web Calendar | |||
Add/Update Group Calendar Event—event is added or changed on Web Calendar | |||
Add User Workspace Content— user uploads content to his profile |
|
|
|
Blog Comment— user comments on a blog post |
|
|
|
Blog Post—user posts to his blog |
|
|
|
Community Group Forum Post—user posts to forum | |||
Community Group Forum Reply—user replies to forum post | |||
Content Messageboard Post—user posts to a message board associated with content |
|
|
|
Create Community Group—user creates a community group |
|
|
|
Edit Content—user edits content |
|
|
|
Forum Post—user posts to a Forum |
|
|
|
Forum Reply—user replies to a Forum post |
|
|
|
Group Blog Comment— user comments on a community group’s blog post |
|
|
|
Group Blog Post—user posts to community group blog |
|
|
|
Group Messageboard Post—user posts to a community group message board |
|
|
|
Join Community Group—user joins community group |
|
|
|
Micro-message—user posts micro-message |
|
|
|
User Messageboard Post—user posts to a message board associated with a user |
|
|
|
The following table connects Notification message activities with users who receive the notification.
Prerequisites:
Activity that Triggers Message |
Users who receive notification |
---|---|
Add Colleague—user adds a colleague |
|
Add Group Content— user uploads content to community group Workspace |
Community group members |
Add/Edit User Workspace Content— user uploads content to his profile |
Depends on folder’s share setting, which can be
|
Add Site Content— user adds content to Ektron |
User's colleagues |
Add/Update Site Calendar Event —event is added or changed on site Web calendar | User's colleagues |
Add/Update User Calendar Event —event is added or changed on site Web calendar | User's colleagues |
Add/Update Group Calendar Event —event is added or changed on site Web calendar | Community group members |
Blog Post— user posts to his blog |
User's colleagues |
Content Messageboard Post— user posts to a message board associated with content |
Users who have permission to view the content |
Create Community Group— user creates a community group |
Colleagues of user who creates group |
Edit Content—user edits content | User's colleagues |
Edit Group Content—user edits community group content | Community group members |
Forum Post— user posts to a Forum |
|
Forum Reply— user replies to a Forum post |
Posting user's colleagues |
Group Blog Comment— user comments on a community group’s blog post |
Community group members |
Group Blog Post— user posts to community group blog |
Community group members |
Group Messageboard Post— user posts to a community group message board |
Community group members |
Join Community Group— user joins community group |
|
Micro-message—user posts micro-message | User's colleagues |
User Messageboard Post— user posts to a message board associated with a user |
|
User or Community Blog Comment— user comments on a blog post |
Posting user's colleagues |
This section shows how to set up email notification to alert a user when someone uploads a document to the Workspace.
An Ektron Administrator performs these steps.
NOTE: For this example to work, Ektron must be set up to send emails. See Configuring email for Tasks and Content.
The document @Content.Title@ was added to @SubjectUser.UserName@’s Workspace
.
web.config
file. See Configuring SMSNOTE: For a summary on how to enable SMS, see "How to Enable SMS" on dev.ektron.com.
From now on, an email is sent whenever a user uploads a document to his Workspace to colleagues who signed up to receive them.
You must enable the Add User Workspace Content activity in your profile so that whenever you adds content to his Workspace, a notification is sent.
You must enable the receipt of notifications that are sent whenever colleagues upload an item to their Workspace.
NOTE: If you want to receive SMS messages, also check the box in the SMS column.
NOTE: The following procedure requires that your Web site has the template SMSAgentSettings.aspx
. If it does not, you may copy it from the Ektron Developer starter site, the Ektron eIntranet site, or download it from http://dev.ektron.com/codedetail.aspx?id=29600.
http://<host>/SMSAgentSettings.aspx
. Verification Code
field.Ektron provides a default set of Notifications that apply to all newly-created users. After a user is created, the use can change the preferences by editing the profile, selecting the Activities tab, and checking or unchecking activities and agents. Similarly, a community group member can access any community group profile and click Edit Group Notification Preferences to set the group's preferences. You can apply 3 types of default settings via screens on the Workarea Settings tab.
NOTE: The Community Groups subtab sets notification preferences for all community groups. To refine preferences further, a user can access the profile of any community group and click Edit Group Notification Preferences to set preferences for that particular group.
NOTE: The Activities tab appears only after the user is registered and if the Workarea > Settings > Community Management >Notifications > Settings > Publish Notification setting is checked.
NOTE: Activities are checked for the Activity Stream agent by default. No activities are checked for the other agents by default.
Ektron's Notification system lets you create and raise your own activity types. Custom activity types can generate notifications, just like standard activity types.
Ektron.Cms.Framework.Activity.Activity.Publish
method. The method takes an ActivityData
class. You supply the following:NOTE: Custom activity types cannot use Community Management messages as the standard Ektron activities do.
Here is an example of that method.
Activity activityApi = new Activity(); ActivityUserInfo user = new ActivityUserInfo() ; user.Id = activityApi.UserId; ActivityData activityData = new ActivityData(); activityData.ActionUser = user; activityData.ActivityTypeId = 1001; activityData.Message = "John Doe just rated Ektron a buy!"; activityData.LanguageId = 1033; activityApi.Publish(activityData);
When publish is called, the notification service notifies users who signed up to be notified of this activity.
A notification agent is a component that sends notification messages. Each Agent is responsible for sending notifications to users when Ektron activity occurs. How that notification is sent is up to the Notification Agent itself. When a Notification Agent is created and registered, users can begin setting up notification preferences that use it.
Ektron has predefined Notification agents, including email, SMS, and Activity Stream agents.
You can customize these providers or create your own using the extendable Notification agent architecture.
Ektron comes with several standard Notification Agents, including email, SMS, and Activity Stream. You can customize these agents or create your own using the extendable Notification Agent provider architecture. This section explains how to extend the object model to build a customized Notification Agent.
Each type of Notification Agent accepts configuration parameters. For example, email and SMS require an SMTP server, username, and password. These parameters can be specified in the web.config
file, and read when the Agent is initialized the first time.
Each agent may also require storing settings for each user receiving notifications. For example, the SMS agent requires the user’s cell phone number and carrier, which it stores as an SMS email address. To save these properties, each Notification Agent has an associated NotificatAgentSettingsData class. This class defines any properties needed to be supplied by the user. Ektron provides APIs for storing and retrieving this information, but the developer must create an interface for users to supply the information. The SMSAgentSettings.aspx page, supplied with the Developer and Intranet starter sites, provides a good example.
Object Model
The NotificationAgent is the abstract base class you must extend to implement your own notification agent. Details on the class, available properties, and methods you are required to implement are below.
Method |
Description |
---|---|
virtual void Initialize(string name, Amenable config); |
The initialize method comes from the ProviderBase base class. It supplies all name value pairs specified in the Providers If custom settings need to be provided to your agent, add them to your provider’s |
abstract NotificationAgentSettingsData GetAgentSettings(); |
This method should return a new instance of the NotificationAgentSettingsData class associated with your Agent. |
abstract void Send(NotificationMessageData message); |
This method should send the actual notification. It will be called by the notification engine for each user that needs to be notified. The NotificationMessageData has all the information you need for sending the notification, including
If your agent has a custom NotificationAgentSettingsData, you need to cast the supplied NotificationAgentSettingsData to the appropriate type so that you can access the appropriate properties. |
siteroot/web.config
file.
<notificationAgent> <providers> <add name="CustomAgent1" type="Ektron.Cms.Notifications.Providers.CustomAgent1, Ektron.Cms.Providers" setting1="" setting2=""/> <add name="EktronEmail" type="Ektron.Cms.Notifications.Agents.EktronEmailAgent, Ektron.Cms.BusinessObjects" useSystemSettings="false" smtpServer="amh010" smtpPort="25" userName="" password="" fromEmail="[email protected]"/> <add name="SMSAgent" type="Ektron.Cms.Notifications.Agents.SMSAgent, Ektron.Cms.BusinessObjects" smtpServer="amh010" smtpPort="25" fromEmail="[email protected]" validationRequired="true"/> <add name="ActivityFeed" type="Ektron.Cms.Notifications.Agents.ActivityFeedAgent, Ektron.Cms.BusinessObjects" validationRequired="false"/> </providers>
</notificationAgent>
After you add an agent to web.config
, it appears in the list of available agents in the Workarea.
NOTE: If you do not see the custom agent in the Namedrop-down, check theweb.config
file to verify it is listed between the <notificationAgent>
tags.
When you no longer need an agent, you can remove it. This can be a 2 step process, depending on the level of removal you are trying to achieve. First, remove the agent from the list of agents in the Workarea. At this time, you can easily return the agent to the list. In the second step, you remove the agent from the web.config
file.
NOTE: To completely remove the agent from Ektron, follow these additional steps.
web.config
file.<notificationagent>
’s <providers>
tags, remove the agent. The following example shows agents that might appear in the web.config
file.
<notificationAgent> <providers> <add name="CustomAgent1" type="Ektron.Cms.Notifications... <add name="EktronEmail" type="Ektron.Cms.Notifications... <add name="SMSAgent" type="Ektron.Cms.Notifications... <add name="ActivityFeed" type="Ektron.Cms.Notifications... </providers> </notificationAgent>
Messages are used by the notification system to communicate site activities. You can view each activity’s default message from the Workarea > Settings > Community Management > Notifications > Messages screen.
You can create an HTML-based and a plain text message for each activity. Typically, HTML messages are sent as email or to the ActivityStream server control, while plain text is used in SMS style messages. Messages typically combine text and tokens. See Also: Working with Tokens
WARNING! A message is limited to 3000 characters after its tokens are converted to text. After 3000, any remaining characters are removed.
NOTE: Most SMS systems impose a 160 character limit on messages. If you create a plain text message greater than 160 characters, Ektron divides it into several, smaller messages.
User and Community Group messages contains several sub types of messages. The sub type is the activity that triggers the message. For example, to edit the message that notifies colleagues when a user uploads a document to his Workspace, select User from the Typedrop-down andAddWorkspaceItem from the Sub Typedrop-down.
When you create a new message, you assign it to a type and sub type, such as User Activity > Blog Post. Only the default message is active for any combination of type and subtype. So, while creating a new message, you must make it the default (via the Add Notification Message screen’s Default check box) if you want it to be sent. When you do, if another message was the default for that type and sub type, it is no longer used. For a list of Sub types, see Triggering a Notification Message.
In a Multi-site environment, notifications stay within the site where the activity happened. For example, if there are 2 sites—an Intranet and Social Club site—when a user from the Intranet site performs an activity that generates a message, it does not trigger notifications on the Social Club site. Exception: A user’s colleagues receive notifications regardless of the site from which the message originated.
When a message type is created, it becomes the default message and is used by all sites. You can assign new messages of the same type to each site in your environment.
To view the messages assigned to each site, go to the View All Notification Messages screen, click the Site drop-down, and select the site.
When you create notification messages in a Multi-Site environment, you specify the site associated with message. This lets you create customized messages for each site. For example, you want a “Status Update” message targeted one way for an Intranet site and another way for your Social Club site. To accomplish this, create a 2 messages. The message for the Intranet site might state:
@SubjectUser.username@ has updated his status on Intranet with the following: @MicroMessage.Message@.
While your Social Club site might have a message that states:
@SubjectUser.username@ has updated his status on the Social Club with the following: @MicroMessage.Message@
If your site uses SSL, you need to update the link in the Ektron notification service configuration file with that information. The file is at: your-server\Program Files\Ektron\EktronNotificationService\Ektron.Notification.Service.exe.config.
Change the following tags.
<siteNotification>
<sites>
<add name="769723537" url="https://your server" connectionString="server=your server; database=Intranet2; Trusted_Connection=true; User ID=;Password=;" />
</sites>
</siteNotification>
You must restart the Ektron Notification Service to enable these changes.
When using eSync with Notifications, new agents are not synched. This means that you must manually add new agents to each server in your configuration.
When the agent exists on all servers in your configuration, eSync keeps them updated. For example, assume a membership user logs into the production server and updates his profile’s Activities tab by changing the activities a custom agent will perform. eSync will sync those changes with the staging server.
SMS sends community notification messages from the Ektron Web site to wireless devices such as a cell phone or PDA. To accomplish this, you must configure several items.
web.config
—Add SMS Agent information. For a complete Knowledge Base Article entitled "How to Enable SMS Notifications", go to the following page in the Ektron Developer Center: http://dev.ektron.com/kb_article.aspx?id=29586.
web.config
in your Web site root directory.SMSAgent
tag.smtpServer="EKMAIL291.intra.mycompany.com"
fromEmail = "[email protected]"
<add name="SMSAgent" type="Ektron.Cms.Notifications.Providers.SMSAgent,Ektron.Cms.Providers" smtpServer="EKMAIL291.intra.mycompany.com" smtpPort="25" fromEmail="[email protected]" validationRequired="true" />
To verify that you have made a proper connection to your cell phone, you must send a verification message from the Ektron Web site to your phone. To verify your phone, do the following steps.
NOTE: The following procedure requires that your Web site has the template SMSAgentSettings.aspx
. If it does not, you may copy it from the Ektron Developer starter site, the Ektron eIntranet site, or download it from http://dev.ektron.com/codedetail.aspx?id=29600.
http://<hostname>/SMSAgentSettings.aspx
. A screen appears that looks similar to the following:NOTE: When the phone number is verified, the Account Verified checkmark appears. This will not change unless you change the cell phone number or provider.
A token is an Ektron-defined variables surrounded by at signs (@). When a message is generated, tokens retrieve information about Ektron users, groups, and objects. For example, the following message:
@SubjectUser.FirstName@ added a new document, ‘@Content.title@’, to his profile page.
might look like this:
“Paul added a new document, ‘How to Write Code’, to his profile page.”
In this example, @SubjectUser.FirstName@
is the first name of the user performing the action. @Content.title@
is the title of the object that was uploaded.
A message can include several token types.
A message token represent Ektron users, groups, or content. It can become a link that, when clicked, brings the user to content, a user’s profile, or community group’s profile.
To make a token into a clickable link:
Make sure you include the QueryString parameter used to identify the object. The parameter should point to an ID token. For example, a message notifies your colleagues whenever you add a new colleague. The message might be:
@SubjectUser.UserName@ and @DirectObjectUser.UserName@ are now colleagues.
When creating a link for @SubjectUser.UserName@, insert the path to the user’s profile page into the URL field. It might look like this:
http://localhost/Intranet/UserProfile.aspx?id=@subjectUser.Id@
Note, the QueryString parameter (?id=)
points to a token that represents the logged-in user’s ID, @subjectUser.Id@
. See Also: Working with Tokens
For @DirectObjectUser.UserName@
, enter the same path and change the dynamic parameter token to [email protected]@
.
When hyperlinking content, use its QuickLink token in the path defined in the URL field. For example, a message that sends a Notification when a user adds content might look like:
@SubjectUser.username@ added new content, @Content.Title@.
Add Calendar Event and Update Calendar Event
AddColleague
AddContent
AddWorkspaceItem
BlogComment
BlogPost
CreateCommunityGroup
ContentMessageBoardPost
EditContent
EditWorkspaceItem
ForumReply
ForumPost
JoinCommunityGroup
MicroMessage
UserMessageboardPost
Add Calendar Event and Update Calendar Event
AddWorkspaceItem
BlogComment
BlogPost
CreateCommunityGroup
GroupMessageBoardPost
JoinCommunityGroup
UserMessageboardPost