Skip to main content
A Notification tells one User that something in an Organization needs their attention. Each User has their own Notifications in each Organization they belong to. The app shows them in the Bandeja, a page of the Organization below Chat in the sidebar, with a badge that counts the unread ones. The sidebar offers Chat and Bandeja both in an Entity and in Grupo. A Notification has one of four kinds: More kinds may come later, so read kind before you read the rest of a Notification. Every Role can use the routes on this page, viewer included. Only staff and client Members are assigned Tasks, so only they get the two Task kinds. Each route reads or marks only the caller’s own Notifications: the User of the session or of the API key.
Open in the app. This resource has a page in the Sintropix web app at https://app.sintropix.com/organizations/{organizationId}/notifications, where each id in braces is the same UUID as in the API route or response. It shows the signed-in User's Notifications in the Organization. Opening a Notification marks it read and opens its target: the Chat on that message's ERP Thread, or the Task in Tareas. The old /{entityId}/notifications and /{entityId}/chat URLs no longer open. When you mention a record to a user, include that link. See Link to the App for the full URL grammar.

Mention a Member

To mention a Member, write the token <@userId> in the text of a message you send with POST /organizations/:organizationId/chat/messages. The app writes the same token when you pick a name after typing @, and draws it as the Member’s name.
When the message is saved, each User it mentions gets one mention Notification, even when the message names them more than once. These rules apply:
  • Mention only other Members of the Organization. You can’t mention yourself.
  • A message that breaks a rule is refused with 422 and saves nothing, neither the message nor any Notification.
In the app, type @ and pick a name, or type the name in full: @erwin, a Member’s full name, or their first name. Case and accents don’t matter. The typed name becomes the mention when a space or punctuation follows it, or when you send, as long as exactly one Member answers to it. A name that several Members share stays plain text.

GET /api/organizations/:organizationId/chat/members

List the Members a message can mention, ordered by name. Leave yourself out when you offer the list to the author. Response 200: an array of { userId, name }.

Follow the ERP Threads you take part in

When someone replies in an ERP Thread, its Participants get a thread_reply Notification, even when nobody tagged them. It works like following a thread in Slack. You don’t follow a thread by hand: you become a Participant by taking part. The Participants of an ERP Thread are:
  • The author of its first message.
  • Everyone who has replied in it.
  • Everyone mentioned in any of its messages.
Only current Members of the Organization count. These rules apply when a reply is sent:
  • The author of the reply gets no Notification.
  • A Participant the reply mentions gets only the mention, not a second Notification.
  • Each User gets at most one Notification per message.
  • Erwin is never a Participant. His answer in an ERP Thread notifies its Participants once, when his text arrives, not while he shows his progress. A later edit of his answer doesn’t notify again.

Talk about a record in its ERP Thread

An Invoice, a Bank Movement, or a Ledger Entry has at most one ERP Thread: the conversation about that record. It’s an ordinary ERP Thread of the Organization’s Chat, so mentions, thread_reply Notifications, and tagging Erwin work in it as anywhere else in the Chat. In the app, open the panel of an Invoice or a Bank Movement and click its Hilo tab, or scroll to the Hilo section of a Ledger Entry’s page. The first message about the record starts its ERP Thread, and later messages reply in it. In the Chat, the first message of a record’s ERP Thread shows a card with the record, and the card opens it. To write about a record through the API, send record instead of a parentMessageId in POST /organizations/:organizationId/chat/messages. You name the record, never the first message: when the record has no ERP Thread yet, the message starts it, and otherwise it becomes a reply in it.
Response (201): the ERP Message. The first message of a record’s ERP Thread carries the record in entityId and in one of invoiceId, bankMovementId, or ledgerEntryId, and its parentMessageId is null. A reply carries the first message’s id in parentMessageId, and its record fields are null. Deleting a record deletes its ERP Thread with it. The Invoice and Bank Movement listings filter by erpThread: with keeps only the records that have an ERP Thread, and without only those with none. Each row carries hasErpThread. See GET /invoices/pages and GET /movements.

Task Notifications

Tasks notify their assignee:
  • Assigned. Assigning a Task to another staff or client Member sends them a task_assigned Notification that names who assigned it. Assigning yourself, saving the same assignee again, or unassigning notifies nobody.
  • Overdue. Just after midnight in Santiago (Chile) time, Sintropix sends a task_overdue Notification for each assigned Task whose due date has passed and that isn’t completed. Each Task notifies once per due date. If you move the due date and the new one passes too, the assignee is notified again. A change of assignee doesn’t send a new overdue Notification.
Opening a Task Notification in the app marks it read and opens the Task in Tareas. Deleting the Task deletes its Notifications.

The Notification object

The message object carries:
A Task Notification carries the Task instead of a message:

GET /api/organizations/:organizationId/notifications

List your Notifications in the Organization, newest first, one page at a time. Query parameters Response 200: { notifications, nextCursor }. notifications is an array of Notification objects. nextCursor is the id to pass as cursor for the next page, or null on the last page. A cursor that isn’t one of your Notifications returns 404 with NOTIFICATION_NOT_FOUND_ERROR.

GET /api/organizations/:organizationId/notifications/unread-count

Count your unread Notifications in the Organization. Response 200: { "unreadCount": integer }.

POST /api/organizations/:organizationId/notifications/:notificationId/read

Mark one of your Notifications read. Marking it again keeps the first readAt. Response 200: the Notification object. A Notification that doesn’t exist, or that belongs to another User, returns 404 with NOTIFICATION_NOT_FOUND_ERROR.

POST /api/organizations/:organizationId/notifications/read-all

Mark every unread Notification of yours in the Organization read. This is Marcar todo como leído in the app. Response 200: an array of the Notification objects this call marked read, newest first. It is empty when nothing was unread.

Errors

Status codes