Inbox Data Model
Learn more about the data model used for Inbox feature that enables sending notifications to the portal.
UML Diagram
To support this feature, the existing model of the Notification Framework has been extended with extra item types: FSSiteMessageTemplate and FSSiteMessageGroup, as well as with extra attributes.
As messages can be of different nature, you may want to organize them in distinct groups. Each group is then displayed on the UI as a separate tab.
The grouping of messages is done with the help of the FSSiteMessageGroup item type. For better usability, you may add a media file to the specific message group. Message groups also have the visibility attribute. For example, in the current implementation, tabs for groups that do not have any messages have the visible attribute set to false.
For different message types, you may also define custom templates (FSSiteMessageTemplate). Each message template has a rendererTemplate associated with it that specifies how a message should be rendered (a velocity file and Context class). In vm files, you can have various media types, such as jpeg, png, svgs. Messages are then dynamically created based on the templates when the message creation process is triggered.
Site message context accepts externalItem that can be seen and maintained in Backoffice. For example, for order confirmation, the external item is OrderModel.
To enable rich styling with HTML tags, SiteMessage has been extended with two attributes: richTitle and richContent.
The readDate property of SiteMessageForCustomer is used to define the "read / unread" status of messages.