Skip to content

Threads

Threads: Built-In Messaging System Overview

The messaging system provides a way to manage discussions within the platform:

  • Create Threads: Initialize threads for any object in the system, allowing for structured conversations tied to specific items or topics.
  • Send Notifications: Automatically dispatch notifications to all thread subscribers whenever new activity occurs, keeping participants informed.
  • Manage Subscribers: Add or remove subscribers to threads, giving you control over who receives updates and participates in the discussion.

API

New message

authenticated

Data Objects:

  • [app].[comment_set]

Properties:

  • comment_status - optional status of comment
HTTP
POST {{host}}/api/core/comments
Authorization: Basic api:{{token}}

{
  "comment_text": "Hello World2!",
  "comment_status": "10",                                      
  "comment_remote_id": "4c89248b-abbc-ee11-8335-0690a1809de2" , 
  "comment_remote_source": "item",
  "comment_url": "/someurl/1",
  "comment_subject": "Notification2",
}

Notes:

  • comment_status,comment_url,comment_subject is optional
  • Warning comment_email_subject changed to comment_subject in v2260

Delete message

authenticated

Note

Only the author of the message can delete it.

HTTP
POST {{host}}/api/core/comments/remove/{{uuid}}
Authorization: Basic api:{{token}}

List messages in thread

sys_comments

Data objects:

  • [app].[comment] - data object
  • [app].[comment_list] - business object for comments
HTTP
GET {{host}}/api/core/comments/browse/{{uuid}}/{{source}}
Authorization: Basic api:{{token}}

Thread subscribers

sys_subscribers

Data object:

  • [app].[subscriber] - subscribers
HTTP
GET {{host}}/api/core/subscribers/browse/{{uuid}}/{{source}}
Authorization: Basic api:{{token}}

Thread subscriber create

sys_subscribers

Note

You can add only subscribers registered in the system.

Data object:

  • [app].[subscriber_set] - subscribers
HTTP
POST {{host}}/api/core/subscribers/create/{{uuid}}/{{source}}/{{email}}
Authorization: Basic api:{{token}}

Thread subscriber delete

sys_subscribers

HTTP
POST {{host}}/api/core/subscribers/delete/{{uuid}}/{{source}}/{{email}}
Authorization: Basic api:{{token}}

UI

  • v_comment.js - comment component

Settings

  • path for templates: www\templates\
  • default template: mail-template.md
  • Template variables:
    • [[kv.v.api.client]]
    • [[kv.v.owner.name]]
    • [[kv.v.****]]
    • [[username]]
    • [[comment_modified_by]]
    • [[comment_text]]
    • [[comment_url]]