Customer communications
Customer communications is the CRM’s shared record of customer contact and follow-up work. It brings email communications, comments, files, calls, notes, and tasks into the timeline of a lead or deal. It also turns assignments, mentions, and event reminders into notices for CRM users, while telephony links call records to the customer record that matches the phone number.
Communication record
The CRM uses a lead or deal as the main customer context. A communication is an email or other message tied to that context. A comment is an internal discussion entry that its owner can edit or delete. Notes and tasks add durable knowledge and next steps, while files remain available as related evidence. Together, these records let an engineer follow both what was said to the customer and what the team must do next. See Record productivity workflows for the wider work model around these records.
Activity timeline
The activity timeline is the customer record view of this history. Its main activity view combines the lead or deal’s creation and field changes with comments, communications, attachment changes, and linked calls. Dedicated views expose emails, comments, calls, notes, tasks, attachments, data fields, and WhatsApp messages, so a user can move from a conversation to its follow-up without losing the customer context. The activity and call views follow the user’s timeline order; notes, tasks, and attachments use their latest change order. The timeline requires read access to the lead or deal.
The activity area also keeps customer communication current while the record is open. Changes to comments or communications reload the activity data, and new WhatsApp messages reload the WhatsApp view when they target the open record. For a deal, the WhatsApp view also includes messages linked to the lead that became the deal. The header offers actions that match the selected view, such as sending email, adding a comment, logging or making a call, creating a note or task, uploading a file, or sending a WhatsApp message. Calling and WhatsApp actions appear only when the related service is enabled.
The communication area is the shared entry point for email replies and internal comments. It keeps an unfinished message and its files as a local draft, supports scheduled email, and refreshes the customer history only after the send or save succeeds.
This diagram shows how customer records and related work become one set of customer communication views.
flowchart LR
L[Lead or deal] --> T[Activity views]
E[Email communication] --> T
C[Comment] --> T
F[Files] --> T
CL[Call log] --> T
W[WhatsApp message] --> T
L --> N[Note]
L --> K[Task]
CL --> N
CL --> K
References: crm/…/activities.py• L15-23 crm/…/activities.py• L45-192 crm/…/activities.py• L195-339 crm/…/activities.py• L448-553 frontend/…/Activities.vue• L21-245 frontend/…/Activities.vue• L382-441 frontend/…/Activities.vue• L700-873 frontend/…/CommunicationArea.vue• L273-416 frontend/…/ActivityHeader.vue• L3-71 frontend/…/ActivityHeader.vue• L106-178 frontend/…/AllModals.vue• L18-132 crm/…/fcrm_settings.json• L195-213
Communication status
Communication status gives a lead or deal a small amount of workflow state around contact. When enabled in settings, a received communication can reopen the record and a sent communication can mark it as replied. A new email or comment can also update the record’s modified time. These changes apply only when the communication has a lead or deal reference, so an unlinked message does not update a customer record.
An incoming email can create a lead when it has no existing reference and the related email account allows lead creation. The new lead receives the sender’s address and the communication is then linked to it. Existing leads with the same email prevent a second lead from being created.
References: crm/…/__init__.py• L157-191 crm/…/__init__.py• L194-234 crm/…/__init__.py• L237-289 crm/…/fcrm_settings.json• L169-187 crm/…/crm_communication_status.json• L11-26
User notifications
User notifications are private notices that tell a CRM user about work or activity that needs attention. Each notice has a sender, recipient, type, message, read state, and route back to the related record. The supported CRM notice types are mentions, tasks, assignments, WhatsApp activity, and automation.
Assignment and mention notices
Assignments notify the newly assigned user for a lead, deal, or task. The lead or deal owner mirrors the latest assignment, and cancelling an assignment clears that owner. A task notice routes to the task’s own reference record, while a lead or deal notice routes directly to that customer record. The system does not create a notice when the sender assigns work to themself.
Comments on leads and deals can mention users. A mention is read from the comment content and creates a notice that routes back to the comment’s customer record. This keeps the alert private to the named user while preserving the full comment in the shared timeline.
References: crm/…/todo.py• L7-27 crm/…/todo.py• L31-68 crm/…/todo.py• L71-130 crm/…/comment.py• L12-57 crm/…/crm_notification.py• L61-84 crm/…/crm_notification.json• L33-38
Notice delivery
The notification center returns the latest 50 notices for the current user and sorts them from newest to oldest. A real-time event tells the client to reload when a notice is created or changed. Users can mark all unread notices or the notices related to a given comment or source document as read in one update. System managers and the Administrator can view all notices; other users can view only notices sent to them.
Event reminders use a separate real-time event and can also send email. They use event-specific reminder rules when present. Otherwise, CRM Settings supplies default rules for regular and all-day events. The scheduler checks events that are upcoming or already in progress and sends a reminder only inside its trigger window.
More detail about activity assembly and notice behavior is in Activities and notification handling.
References: crm/…/notifications.py• L4-30 crm/…/notifications.py• L64-90 crm/…/crm_notification.py• L30-59 crm/…/crm_notification.json• L7-23 crm/…/event.py• L23-136 crm/…/event.py• L167-218 crm/…/fcrm_settings.json• L139-166
Call workflows
Call workflows connect a phone interaction to the customer record and keep the call available for later follow-up. A call log stores direction, numbers, participants, status, timing, duration, recording information, and links to related CRM records. It can point to a lead or deal as its main reference and can also link to notes and tasks.
Customer matching
For an incoming call, the CRM matches the caller’s number. For an outgoing call, it matches the number being called. Matching first checks deals through their primary contacts, then unconverted leads, and then contacts. The match is limited to records the user can read when the result is shown in the client. The matched lead or deal becomes the call’s reference when the call log is created. When a call already has a customer reference, call details use that record for the contact label instead of guessing from the phone number.
If no customer matches, the call still exists as a call log. A user can create a lead from that call later. The new lead uses the call number when no mobile number is supplied and links the call to the new lead.
References: crm/…/api.py• L151-253 crm/…/api.py• L287-295 crm/…/crm_call_log.py• L158-226 crm/…/crm_call_log.py• L294-345
Call follow-up
Users can add or update a note or task from a call. The CRM links that note or task to the call, and the customer activity view can then show the call together with its follow-up. Call details return only follow-up records that the user can read. In the Exotel call window, users can also open the matched lead or deal while the call is active. A call recording remains behind the call log’s permission check and is fetched through the configured provider when the user plays it. The recording proxy supports browser seeking and checks each provider request and redirect before it fetches the audio. The Call Logs view lists provider and manually logged calls and opens a protected detail view for each call.
Telephony providers create or update the same call-log model. Twilio and Exotel use callbacks to record status, duration, timing, and recordings. The browser exposes calling only when at least one configured provider is enabled, and each user can have a default calling medium.
See Telephony integrations for provider-specific call setup and callback flows.
References: crm/…/api.py• L15-45 crm/…/api.py• L86-148 crm/…/api.py• L381-432 crm/…/crm_call_log.py• L130-155 crm/…/crm_call_log.py• L229-292 frontend/…/CallLogs.vue• L19-69 frontend/…/CallLogs.vue• L95-169 frontend/…/telephony.js• L4-40 frontend/…/ExotelCallUI.vue• L141-220 frontend/…/ExotelCallUI.vue• L272-290 frontend/…/ExotelCallUI.vue• L384-431 frontend/…/ExotelCallUI.vue• L440-480
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the activity response and its client rendering aligned when adding or renaming activity types. The timeline groups lead and deal activities with separate call, note, task, attachment, event, data, and WhatsApp views.
- Keep the timeline’s activity order aligned with the user’s timeline preference. The client applies that preference to activity and call views while sorting notes, tasks, and attachments by their latest change.
- Keep the selected activity tab and its available action set aligned. Email, comment, call, note, task, attachment, and WhatsApp actions use different entry points and service gates.
- Keep the activity refresh triggers aligned with record updates. Comment and communication updates use document events, while WhatsApp updates use a message event scoped to the open record.
- Keep local email and comment draft state separate for each user and customer record. A send or discard must not restore stale attachments or duplicate an email signature.
- Keep both the direct call reference and the call’s dynamic links in sync. Call follow-up lookup uses both paths.
- Preserve the notification route fields when changing assignment or mention notices. The notice center uses them to open the correct lead, deal, task, or comment context.
- Keep the notification type list aligned across the notification schema and notice creation logic. New types must remain visible and routable in the notice center.
- Keep the notification page limit and bulk read scope aligned with the notice center. The list shows only the latest page, while read updates must stay limited to the current user and requested comment or source document.
- Keep provider call status values mapped to the shared
CRM Call Logstatus set. The timeline and call detail view depend on the shared labels. - Keep customer-reference lookup and permission checks aligned between call parsing and call detail. A referenced lead or deal must take priority over phone-number guessing and must not expose a name or follow-up record without read access.
- Keep recording playback behind call-log read permission and provider URL checks. Range support and redirect handling must continue to serve valid recordings without allowing an unsafe fetch target.
- Keep Exotel contact lookup and event status handling aligned with the call-log data. A connected call can still warn when its call log was not saved.
- When changing communication settings, check both the record update rules and the incoming-email lead creation rule. They use different references and can fail independently.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A communication or comment has no lead or deal reference | It does not update the customer timestamp or communication status. An incoming email may instead create a new lead when account settings allow it. | Link inbound and outbound messages to the intended customer record before relying on status or timeline effects. |
| A phone number does not match a contact, deal, or unconverted lead | The call log has no customer context and does not appear in that customer’s activity view. | Create or link a lead from the call after confirming the number. |
| A phone or WhatsApp service is disabled | The matching action is not offered in the activity header. | Enable the related integration before expecting the action to appear. |
| A call provider callback is rejected or cannot create the call log | Call status, duration, and recording data remain incomplete. | Keep provider credentials and webhook authentication valid, then inspect the provider request result. |
| An Exotel call connects but call-log creation fails | The user can complete the call, but later customer history and call follow-up may be missing. | Treat the call-log creation warning as an operational error and repair the call record. |
| A recording URL is invalid, points to a non-public host, or redirects too many times | Recording playback is denied instead of fetching the audio. | Store a valid provider or public recording URL and keep each redirect within the approved provider flow. |
| A user cannot read the referenced lead, deal, or call log | The activity or recording request is denied. | Apply the same read permissions to the customer record and its call records. |
| A call has a customer reference that the user cannot read | The call contact can display as unknown and the linked customer or follow-up is not returned. | Check customer and call-log read permissions before using the call detail. |
| The notice center has more than 50 notices | Older notices are not returned in the panel. | Use the supported notice views or filters instead of assuming the panel is a complete history. |
| A user edits or deletes a comment they do not own | The client does not offer those actions. | Use the comment owner account for comment changes. |
| A user assigns work to themself | No assignment notice is created. | Treat the assignment as local work unless another user must be alerted. |
| A notice type is added to creation logic but not to the notification schema | The notice may be stored with an unsupported type and become hard to filter or interpret. | Update the CRM Notification type list with the creation logic. |
| An event has no recipient email or no active notification rule | No event reminder is sent for that run. | Configure event participants or the owner and define a matching custom or global reminder rule. |
Key files
| File | Why to read it |
|---|---|
| crm/…/activities.py | Defines the customer activity view and joins communications, comments, changes, files, calls, notes, and tasks. It also preserves call links to follow-up records. |
| frontend/…/Activities.vue | Shows how the client turns the activity response into timeline, email, comment, call, note, task, attachment, data, and WhatsApp views. It also shows live refresh and ordering behavior. |
| frontend/…/CommunicationArea.vue | Shows the shared email and comment entry point, including scheduled send, local drafts, attachments, and post-save timeline refresh. |
| frontend/…/ActivityHeader.vue | Shows how the customer record exposes communication, follow-up, telephony, attachment, and WhatsApp actions. |
| frontend/…/AllModals.vue | Shows how notes, tasks, and call logs are created or updated with the customer record as their reference. |
| frontend/…/CommentArea.vue | Shows comment ownership, editing, deletion, and attachment display in the customer record. |
| crm/…/__init__.py | Defines communication-driven lead creation, timestamp updates, and communication status changes. |
| crm/…/notifications.py | Defines the current-user notice feed, its latest-page limit, and bulk read-state behavior. |
| crm/…/crm_notification.py | Defines notice ownership, real-time refresh events, and notice creation. |
| crm/…/crm_notification.json | Defines the notice record’s types, recipients, read state, and routes to related records. |
| crm/…/comment.py | Defines customer comments and user mentions. |
| crm/…/todo.py | Defines assignment effects and assignment notices for customer work. |
| crm/…/crm_call_log.py | Defines the shared call record, customer-aware contact display, protected detail data, and links to follow-up work. |
| frontend/…/CallLogs.vue | Shows the call-log list, manual call-log creation, and protected detail loading. |
| crm/…/api.py | Defines phone matching, call follow-up links, provider-aware recording access, and safe recording playback. |
| frontend/…/ExotelCallUI.vue | Shows the live Exotel call window, contact lookup, call state, customer navigation, and call follow-up actions. |
| crm/…/api.py | Shows how Twilio callbacks create and update customer-linked calls. |
| crm/…/handler.py | Shows how Exotel requests create and update the same call workflow. |
| crm/…/event.py | Defines timed event reminders through email and real-time notices. |
| crm/…/fcrm_settings.json | Lists the CRM settings that control communication status, timeline display, and event reminders. |