Introducing a new way to review your PRs.

Read the announcement

frappe / crm

Fully featured, open source CRM

View on GitHub

24 documents · Updated Nov 23, 2026

docs / activities-and-notifications

Activities and notifications

Activities and notifications give CRM users a shared view of customer work and the signals that need attention. The system records communication on leads and deals, presents that history as a timeline, and sends user or event reminders through the CRM interface. Read this page with Customer communications for the wider communication model, Telephony integrations for call-specific behavior, and Record productivity workflows for related CRM work.

Communication record

Communication records connect customer contact with CRM follow-up. A lead or deal can show its current communication state while preserving the messages, comments, and related work that explain that state.

Communication status

Communication status is a short state on a CRM lead or deal that shows whether the record is open for a response or has received a reply. The standard status set is Open and Replied; teams can also use the status records when they configure service-level response priorities. CRM Communication Status is defined in crm/…/crm_communication_status.json, and installation creates the two default values in crm/install.py.

New email communication can also affect the record. Settings control whether a received communication reopens the record and whether a sent communication marks it as replied. The update applies only when the communication is linked to a lead or deal and is the latest communication for that record. The same settings can update the record's modified time so recent customer contact remains visible in CRM work lists.

References: crm/…/crm_communication_status.json• L8-27 crm/install.py• L150-159 crm/…/__init__.py• L157-191 crm/…/__init__.py• L255-290

Comments

Comments are internal discussion attached to a lead or deal. They keep team context beside the customer record and can include file attachments. A comment may mention CRM users; each mention creates a targeted CRM notification that links back to the comment and the related lead or deal.

Users add comments from the record communication area. The comment owner can edit or delete the comment, while other users can only read it. The comment service accepts HTML content and attachments, and the timeline renders the content as a comment activity. The client sanitizes displayed content before it is shown.

References: crm/…/comment.py• L12-67 crm/…/comment.py• L70-128 frontend/…/CommunicationArea.vue• L60-85 frontend/…/CommentArea.vue• L1-65 frontend/…/CommentArea.vue• L77-145 frontend/…/Activities.vue• L93-117

Email communication

Email communication records the customer exchange on the linked CRM record. The email view shows sender, recipients, subject, delivery state, message content, and attachments. It also supports reply and reply-all actions so a user can continue the same exchange from the record.

The compose area keeps a draft for the current user and record. It adds the user's signature to a new draft, sends the message through the shared communication service, and reloads the activity data after the send completes. Incoming email can create a lead when the email has no existing CRM link and the email account allows that behavior; the new lead then becomes the email's reference.

References: frontend/…/CommunicationArea.vue• L89-228 frontend/…/CommunicationArea.vue• L267-312 frontend/…/EmailArea.vue• L1-72 crm/…/__init__.py• L194-234

Event reminders

Events provide scheduled CRM work with reminders for owners and participants. An event may use its own reminder rules or inherit default rules from CRM settings, which lets teams set a common reminder policy without configuring every event.

Reminder sources

Event reminders come from two sources:

  • Custom reminders belong to the event and take precedence for that event.
  • Default reminders in CRM settings apply when the event has no custom reminders. Regular and all-day events use their matching default lists.

The system considers events that are about to start or are already in progress. It ignores cancelled events and only considers events for the current owner or a participant. Reminder timing supports minutes, hours, days, and weeks before the event. All-day reminders can use a specific time of day.

References: crm/…/event.py• L4-15 crm/…/event.py• L52-95 crm/…/event.py• L139-218 crm/…/fcrm_settings.json• L139-159 frontend/…/event.js• L30-66

Reminder delivery

The reminder type determines the delivery path. Email reminders go to the event owner and participants. In-app reminders use a real-time event and appear as a local alert for the relevant user. The client groups active event alerts as starting now, ongoing, or upcoming, and removes or completes alerts after the event ends.

The event notification panel is separate from the lead or deal activity timeline. Selecting an event reminder opens the calendar at the event, while selecting an event in a record's Events view opens the event details in that record context.

References: crm/…/event.py• L97-130 crm/…/event.py• L300-372 frontend/…/notifications.js• L11-22 frontend/…/notifications.js• L24-156 frontend/…/EventNotificationsArea.vue• L1-111 frontend/…/CalendarEventPanel.vue• L84-101

Event presentation

The event editor is the user-facing control for scheduled CRM work. It shows the event time, visibility, location, description, attendees, and reminder rules. It can create, edit, duplicate, or delete an event and can link the event to a lead or deal.

The calendar panel also shows attendee response states and lets the current user answer Yes, No, or Maybe. Event owners can edit the event; other participants can view its details and update their own attendance. The event modal provides the same core event fields in a larger form, then reloads the event list after a successful create or update.

This diagram illustrates how an event moves from record work to a reminder and then back to the related CRM context.

flowchart LR
    A[Lead or deal work] --> B[Create or edit event]
    B --> C[Link record and participants]
    C --> D[Set reminder rules]
    D --> E[Email or in-app reminder]
    E --> F[Calendar event details]
    F --> G[Related lead or deal]

References: frontend/…/CalendarEventPanel.vue• L45-125 frontend/…/CalendarEventPanel.vue• L263-494 frontend/…/CalendarEventPanel.vue• L660-699 frontend/…/EventModal.vue• L39-227 frontend/…/EventModal.vue• L372-451

Notification delivery

The notification system separates durable user notices from short-lived event alerts. CRM notifications are stored for a user and remain available until read; event alerts arrive in real time and are tracked as reminders for that user's browser and settings.

Notification records

CRM Notification is the durable record for user-directed notices. It identifies the sender and recipient, stores the notice type, keeps read state, and carries links to both the source document and the CRM record that the user should open. Supported CRM notice types include mentions, task activity, assignments, WhatsApp activity, automation, replies, reminders, and bookings.

The server restricts normal users to notices addressed to them. It avoids creating a notice when the sender and recipient are the same and avoids duplicate notices with the same values. When a new notice is saved, the server emits a real-time signal so an open client can refresh its list. The feed returns the latest 50 notices, while the unread count is queried separately so the badge can represent unread notices outside that visible set.

References: crm/…/crm_notification.json• L25-110 crm/…/crm_notification.py• L30-92 crm/…/notifications.py• L4-67

Frappe notification logs can point users to the CRM interface instead of a Desk form. Lead and deal logs use their CRM record routes. Task logs resolve through the task's parent lead or deal and open the Tasks view because tasks do not have a standalone CRM page. Non-CRM documents keep their normal link behavior.

This link rule matters for email notices as well as in-app navigation. A missing task parent means the system cannot build the CRM route, so the notification log keeps no CRM-specific link.

References: crm/…/notification_log.py• L1-49 crm/hooks.py• L163-181 crm/…/test_notification_log.py• L9-58

In-app notification presentation

The desktop notification panel and the mobile notification page use the same user notification resource. They show unread state, sender or channel identity, relative time, and sanitized message text. A user can open the linked lead, deal, comment, or task view, mark one notice as read, or mark all notices as read.

The visible feed is limited to the latest 50 notices. The unread badge uses a separate count, so it can include unread notices that are not in the visible feed. Opening one notice marks matching unread records as read; marking all notices uses one update and then refreshes the feed. A real-time crm_notification signal reloads the list, so the panel can update without a full page refresh. Event reminders use a separate Events tab and real-time event_notification signal; they do not add durable CRM notification rows.

This diagram illustrates how a durable notice moves from a server update to the user interface and read state.

flowchart LR
    A[CRM action] --> B[CRM Notification]
    B --> C[Real-time signal]
    C --> D[Latest visible notices]
    B --> E[Unread count]
    D --> F[Open notice]
    F --> G[Mark matching notices read]
    G --> D

References: crm/…/notifications.py• L9-107 frontend/…/notifications.js• L6-51 frontend/…/Notifications.vue• L29-147 frontend/…/MobileNotification.vue• L20-109

Activity timeline

The activity timeline is the record-level history for a lead or deal. It combines changes made to the CRM record with customer contact and team actions, then presents the result in time order so an engineer or sales user can understand what happened and what work remains.

Timeline composition

The activity service returns one activity payload for a CRM lead or deal. Its main timeline contains:

  • Record creation and meaningful field changes.
  • Comments and their attachments.
  • Email and automated communication with delivery information.
  • Attachment add and remove history.
  • Linked calls in the combined Activity view.

It also returns linked notes, tasks, calls, and record attachments as separate collections. A deal includes the lead's prior activity when the deal came from a lead, then adds the deal creation or conversion entry. If the user cannot read the source lead, the deal history still loads without that lead history. Field changes made by the same user close together can appear as one expandable group.

The service checks read permission before returning activity data. It sorts timeline entries by creation time and leaves notes, tasks, and attachments to their own views, where the client sorts them by their most recent change.

References: crm/…/activities.py• L13-20 crm/…/activities.py• L23-67 crm/…/activities.py• L124-177 crm/…/activities.py• L180-318 crm/…/activities.py• L342-367

Timeline views

Lead and deal pages share the Activities component. The Activity view combines the main timeline with calls, while dedicated tabs focus on Emails, Comments, Events, Tasks, Notes, Attachments, Data, and optional WhatsApp messages. Each tab keeps the same record context but uses the view that best fits the kind of work.

Each standard tab exposes the action that fits its work. Users can start an email or comment, log or make a call when telephony is available, create a note or task, upload an attachment, or open WhatsApp when that channel is enabled. The shared New menu supplies these actions when a tab does not have its own header action. Custom panes can own their content and omit the header action, while WhatsApp composes from its message input and Quotations remains read-only.

Record actions use the current lead or deal as their reference. Creating or updating a task, note, or call log reloads the activity data and returns the user to the matching tab; event editing uses the event modal and its own event state. The client also listens for document updates while the record is open. A new comment or email change reloads the activity data, and hash links can scroll to a matching activity without remounting the page. Timeline order can be newest first or oldest first through the user's timeline preference. Calls use creation time, while tasks, notes, and attachments use their most recent change in their dedicated views. Event records open in the event view rather than becoming ordinary timeline entries.

References: frontend/…/Activities.vue• L21-122 frontend/…/Activities.vue• L123-245 frontend/…/Activities.vue• L703-812 frontend/…/Activities.vue• L831-898 frontend/…/ActivityHeader.vue• L1-77 frontend/…/ActivityHeader.vue• L111-187 frontend/…/AllModals.vue• L30-150

Data fields

The Data view exposes the record fields that support CRM work without mixing field editing into the activity history. It loads the configured data-field layout for the record type and keeps the selected layout section for the current record in the browser session.

Users with manager access can change the field layout. A record with unsaved field changes shows a Not Saved state, and the Save action sends only the fields that differ from the original record. The parent record view can inspect those changes before and after save when it owns the save flow.

References: frontend/…/Activities.vue• L385-393 frontend/…/DataFields.vue• L1-57 frontend/…/DataFields.vue• L71-162

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep communication status values aligned with the SLA priority choices and with the lead and deal fields that link to CRM Communication Status.
  • If a new CRM notification type is added, update the stored type contract, the route or hash mapping, the unread/read behavior, and the desktop and mobile presentations together.
  • If notification feed limits or read operations change, keep the visible latest-notice list, separate unread count, real-time refresh, and bulk read behavior aligned.
  • If a notification points to a new CRM document type, add its CRM route mapping and confirm that notification email links do not fall back to a Desk-only URL.
  • If event reminder fields or intervals change, update custom event reminders, global CRM settings, trigger schedules, recipient selection, and the in-app alert grouping as one contract.
  • If event fields change, keep the calendar panel and event modal aligned for links, attendees, visibility, descriptions, and reminder rules.
  • If an activity type changes, update the server payload, timeline ordering and grouping, icon mapping, and the dedicated view selection.
  • If an activity tab or action changes, keep the record context, capability checks, custom-pane ownership, and header action behavior aligned.
  • If comment or email refresh behavior changes, preserve the link between the record reference, the document update signal, and the activity reload.
  • If Data field layout or save behavior changes, keep manager access, dirty-state handling, parent save hooks, and the per-record selected layout section aligned.

Important failure modes

TriggerConsequenceGuard
A communication has no lead or deal referenceIt cannot change a CRM communication status or appear in that record's timelinePreserve the reference when creating or importing communication; incoming-email lead creation supplies one when enabled
A newer communication already exists when an older message is updatedThe older message does not change the lead or deal statusTreat status changes as a latest-communication decision rather than a generic update
A comment mention targets the comment authorNo self-notification is createdThe notification service rejects sender and recipient pairs that are the same
A notification is older than the visible feed windowIt is not shown in the notification panel even when it affects the total unread countTreat the separate unread count as authoritative and do not use the feed length as notification history
A notification link targets a task without a parent lead or dealThe user cannot be sent to a CRM task viewKeep the task's parent reference before creating a CRM notification log
An event is cancelled or is outside its trigger windowNo reminder is sent for that event during that processing runKeep event status, start/end time, and interval rules consistent
An event reminder arrives after the event endsA stale in-app alert can remain visible until cleanupEvent alerts filter expired events and periodically mark them complete
An event has no title or has an invalid time rangeThe event editor refuses to create or save itSupply a title and keep the end time after the start time
A user changes Data fields but leaves the record dirtyThe changes remain local and are not persistedUse the Data view's Save action and keep the dirty state visible
A timeline payload omits an activity type or uses an unknown referenceThe record view may show a generic or incomplete entryKeep the server activity type and client tab and icon mappings synchronized

Key files

FileWhy to read it
crm/…/activities.pyDefines the record-level activity payload and how lead and deal history is assembled.
frontend/…/Activities.vueShows how the shared timeline and its focused tabs present CRM work.
frontend/…/ActivityHeader.vueShows which actions each activity view offers and how channel capabilities affect them.
frontend/…/AllModals.vueConnects record actions to event, task, note, and call-log forms and returns users to the right activity tab.
frontend/…/CommentArea.vueShows comment ownership, editing, deletion, attachment display, and refresh behavior.
frontend/…/DataFields.vueShows the Data view, manager layout control, dirty state, and record save hooks.
crm/…/__init__.pyDefines communication-driven status and timestamp changes and incoming-email lead creation.
frontend/…/CommunicationArea.vueShows the user flow for composing email and comments and refreshing the record.
crm/…/comment.pyDefines comment creation, attachments, and mention notification behavior.
crm/…/event.pyDefines event reminder selection, timing, and delivery.
frontend/…/CalendarEventPanel.vueShows event details, attendance, links to CRM records, and calendar-side editing.
frontend/…/EventModal.vueShows the record event form for creating, editing, duplicating, and deleting events.
crm/…/crm_notification.pyDefines durable CRM notification creation, access rules, and real-time refresh signals.
crm/…/crm_notification.jsonDefines the stored notification types and links used by durable CRM notices.
crm/…/notifications.pyDefines the latest-notice feed, unread count, and read-state operations.
frontend/…/notifications.jsConnects the notification feed and unread count to refresh and read actions.
frontend/…/Notifications.vueShows desktop notification navigation and the split between notices and event alerts.
crm/…/notification_log.pyKeeps notification email links inside the CRM routes for CRM records.
frontend/…/notifications.jsDefines event alert lifetime and per-user acknowledgement state.