Comments allow users to provide feedback or collaborate on objects. There are two main areas for comment customization: categories and workflows.

  • Comment types: Create a new comment category to define different types of comments.
    • Default categories: Question, Issue, Comment.
    • Custom categories: For our app, we will create the following types: Comment, Suggestion, and Question.
  • Comment workflows: Assign workflows to comments to manage their lifecycle.
    • Define both workflow states (e.g., comment status can be changed from New to Answered) and transitions, including any restrictions.
      • Restriction example: Only an Admin can mark a comment as Answered. Let’s see how to configure custom comments.
Tip

Download the full example package here: Recipe Manager (Custom Comments and Comment Workflows).json

1. Create a Comment Type Category

First, create a comment type category asset and define the comment types it includes. Let’s start with a blank template:

"commentTypeCategories": [
    {
        "key": "",
        "name": "",
        "defaultCommentTypeKey": "",
        "isVisible": true,
        "commentTypes": [
            {
                "key": "",
                "name": "",
                "colorKey": "",
                //"workflowKey": "",
                "isVisible": true,
                //"isRemovable": true
            }
        ]
    }
],
PropertyPurpose
keyUnique key of the comment type category. This is needed to assign the category to an application.
nameDisplay name for the comment category in Dawiso’s UI.
defaultCommentTypeKeyKey of the comment type selected by default when you add a new comment.
isVisibleDetermines whether the comment category is visible.
commentTypesDefines individual comment types within this category.
Each comment type has the following properties:
PropertyPurpose
keyUnique key of the comment type. At least one must be assigned as the default (defaultCommentTypeKey).
nameDisplay name for the comment type in Dawiso’s UI.
colorKeyComment color in Dawiso’s UI. Choose a predefined color from Settings > Configuration > Colors.
workflowKeyKey of a workflow (optional). Used if we want to track comment resolution status.
isVisibleDetermines whether the comment type is visible.
isRemovableIndicates whether the comment type tag can be removed from a comment.

Example: Recipe Manager Comment Type Category

For the Recipe Manager app, there are three comment types in the Feedback comment type category: Comment, Suggestion, Question. Click here to hide the example.

”commentTypeCategories”: [
{
“key”: “feedback”,
“name”: “Feedback”,
“defaultCommentTypeKey”: “comment”,
“isVisible”: true,
“commentTypes”: [
{
“key”: “comment”,
“name”: “Comment”,
“colorKey”: “core_app_light_blue”,
“isVisible”: true,
“isRemovable”: true
},
{
“key”: “suggestion”,
“name”: “Suggestion”,
“colorKey”: “avatar_green”,
“workflowKey”: “feedback_workflow”,
“isVisible”: true,
“isRemovable”: true
},
{
“key”: “question”,
“name”: “Question”,
“colorKey”: “avatar_orange”,
“workflowKey”: “feedback_workflow”,
“isVisible”: true,
“isRemovable”: true
}

}

],

2. Assign the Comment Category to an Application

Now that the comment category and comment types are created, we need to assign the category to an application.

To do this, create a commentTypeCategoryApplications asset using the blank template below:

"commentTypeCategoryApplications": [
    {
        "applicationKey": "",
        "commentTypeCategoryKey": ""
    }
],
PropertyPurpose
applicationKeyKey of the application that can use this comment type category.
commentTypeCategoryKeyKey of the assigned comment type category.
This can be done in a separate package if you want to:
  • Define the category independently.
  • Assign the category to multiple applications.

Example: Recipe Manager Assigning Comment Type Category

For the recipe manager, we assigned the category in the following way: Click here to hide the example.

”commentTypeCategoryApplications”: [
{
“applicationKey”: “app”,
“commentTypeCategoryKey”: “feedback”
}
],

3. [Optional] Define Comment Workflow

Finally, you can define a workflow for comment types that require resolution tracking. This is useful for handling issues or questions that need a clear Unresolved → Resolved workflow.

To set up a comment workflow:

  1. Create workflow states.
  2. Define workflow transitions.
  3. Assign the workflow to specific comment types.

For more information on workflows, refer to our basic application tutorial.

Example: Recipe Manager App Comment Workflow

In our example application, workflow is available for the Suggestion and Question comment types to mark which have been resolved. Click here to hide the example.

”workflowStates”: [
…
{
“key”: “new”,
“name”: “New”,
“iconKey”: “core_draft”,
“colorKey”: “core_status_empty”
},
{
“key”: “answered”,
“name”: “Answered”,
“iconKey”: “core_draft”,
“colorKey”: “core_status_approved”
}
],
“workflows”: [
…
{
“key”: “feedback_workflow”,
“name”: “Feedback Workflow”,
“initStateKey”: “new”,
“isSelectable”: false,
“transitions”: [
{
“fromStateKey”: “new”,
“toStateKey”: “answered”
},
{
“fromStateKey”: “answered”,
“toStateKey”: “new”
}

}

], … “commentTypeCategories”: [ { “key”: “feedback”, … “commentTypes”: [ { “key”: “comment”, … }, { “key”: “suggestion”, … “workflowKey”: “feedback_workflow”, … }, { “key”: “question”, … “workflowKey”: “feedback_workflow”, … }

}

],