Communications

SurelyCrm brings your customer communications into one place. Make and receive calls, send emails and SMS, run bulk campaigns, and keep a complete history of every interaction.

Built-in Telephony

SurelyCrm integrates with Twilio to provide a fully embedded phone system. No separate dialer required.

Opening the Dialer

Click the Open Dialer button in the application footer or header. The dialer opens in a popup window so you can navigate the CRM without dropping an active call.

Making Calls

  • Click-to-Call — Click the phone icon next to any customer's mobile or home number in their profile or the customer list
  • Manual Dial — Enter a number directly into the dialer keypad

Receiving Calls

When an incoming call arrives:

  1. The dialer popup rings and shows the caller ID.
  2. The main window displays a modal with matching customer records.
  3. Click the customer name to open their profile in a new tab while continuing the call.

SurelyCrm automatically searches for customers by phone number across all common UK formats (+44, 0-prefix, plain numbers).

Call Controls

ControlFunction
Answer / Hang UpStart or end a call
Mute / UnmuteToggle your microphone
Hold / ResumePause the call (timer pauses too)
Call TimerDisplays duration in real time

Call History

All calls are automatically logged to the customer's notification history. You can see inbound/outbound call records, timestamps, and durations from the customer's profile.

Browser Requirements: The telephony feature requires popup windows to be allowed, and uses Web Audio API and WebRTC. Supported browsers: Chrome 90+, Edge 90+, Firefox 88+, Safari 14+.

Email & SMS

Send one-to-one messages directly from a customer profile:

  1. Open the customer profile and go to the Actions section.
  2. Select Email or SMS.
  3. Choose a pre-made template or enter custom content.
  4. Send the message. It is logged automatically in the Notifications tab.

Sending a message from a Lead

Unconverted leads can also be contacted directly. When the Leads toggle is enabled, open the lead and click Send Message. The composer supports the Email and SMS channels, each with a saved template or free text. The recipient is always the lead's current saved contact for that channel, and a successful send records a single lead-owned entry. SMS deducts one credit after the message is sent; if that deduction cannot be recorded, staff see a warning but the sent message and history are kept. Received emails in the lead's history also offer Reply, which opens the composer on Email with a Re: subject and uses the stored thread details to set real In-Reply-To and References headers; older messages without thread details still reply, without fabricated headers. Converted leads are redirected to the customer's existing actions. See Leads for the full behaviour.

Message Templates

Administrators create templates in Settings > Email Templates and Settings > SMS Templates. Templates support token substitution using the syntax [Entity.Property], where Entity is the record type (for example Customer) and Property is a property name — matched exactly, including case:

  • [Customer.Firstname] — Customer's first name
  • [Customer.Surname] — Customer's surname
  • [Customer.ReferenceNumber] — Customer's unique reference
  • [Customer.EmailAddress] — Email address
  • [Customer.MobilePhone] — Mobile number

Any property of the record can be used, including custom fields via [Customer.ExtraField.FieldName]. Values are formatted automatically: dates render as dd/MM/yyyy, money as currency, and Yes/No for true/false values. Tokens that don't match a property are left as-is.

Lead email templates can use [Lead.SampleSiteUrlsHtml] to render the non-blank lines from Lead.SampleSiteUrls as an ordered HTML list. Lines are trimmed, kept in their stored order, and HTML-encoded. The existing [Lead.SampleSiteUrls] token remains newline-separated plain text for SMS and other plain-text use. Keep HTML out of Lead.SampleSiteUrls.

Bulk Actions

Bulk Actions let administrators work with large groups of Customers efficiently. When the Leads feature is enabled, the same page can also target non-converted Leads. Access it from Bulk Actions in the sidebar.

Creating a Bulk Job

  1. Choose Customer or Lead as the record type. The Lead option appears whenever Leads is enabled.
  2. Choose an action. Customer choices are unchanged. Lead jobs support Change Status (SetStatus), Start Workflow (StartWorkflow), Send Email (Email), and Send SMS (Sms).
  3. Select a template or write custom content for Email or SMS.
  4. Define your audience using the filters for the selected record type:
    • Customers keep the existing status, owner, date, balance, postcode, notification, and Custom View filters.
    • Leads use a saved Lead view or the existing manual search and Campaign filters.
  5. Click Preview to see the matching total and a sample of up to 10 records. Converted Leads are excluded.
  6. Click Create Job. The matching IDs are captured at creation, and the existing background worker processes the job in batches.

Lead Jobs

Lead status changes use tenant-local Lead statuses. Lead workflow jobs use only active Lead-typed workflows. Lead Email and SMS use the Lead contact fields and the established Lead tokens. A successful Email or SMS send creates Lead-owned communication history; tracked email keeps its pre-tracking body, and a Lead bulk SMS deducts one credit after the send succeeds.

Each Lead is processed independently. A missing or invalid contact, a converted Lead, or another record-level failure is shown in the job details while the remaining captured Leads continue. Lead jobs require both the existing ProcessBulkActions worker toggle and the enabled Leads feature. The BulkActions licence limits the target count, and Lead workflow starts also use the WorkflowExecution licence. Only Administrators can create or manage jobs.

Managing Jobs

From the Bulk Actions dashboard you can:

  • View the record type and status for every job: Pending, Running, Paused, Completed, Failed, or Cancelled
  • Pause a running job
  • Resume a paused job
  • Cancel a running or pending job
  • Retry a failed job
  • Delete completed or cancelled jobs

Tip: Always use Preview before executing a large job. It shows the total match count and up to 10 records that will be targeted.

Automated Actions

The Action Designer lets you create event-driven automations that fire instantly when something happens in the system. Unlike scheduled workflows, these are immediate reactions.

Common setups include:

  • When a customer is created → Send welcome email
  • When a status changes to "Closed Won" → Send congratulations SMS
  • When a payment is received → Update status to "Active"

Administrators configure these in Automated Actions > Designer.

Email Agent

The Email Agent is a background service that connects to your inbound mailboxes over IMAP and processes new messages according to each mailbox's type. Administrators manage it from Settings > Email Agent, where you can switch the agent on or off, configure mailboxes and bounce rules, and review recent activity.

Agent Status

The Agent Status card at the top of the page shows whether the agent is running. Use the toggle to enable or disable it — this switches the ProcessInboundEmail feature for your tenant, so it can also be managed from Administration > Feature Toggles. While disabled, no mailboxes are polled and no inbound email is processed.

Inbound Mailboxes

Click Add Mailbox to connect a mailbox. Each mailbox has a type that decides how its messages are handled:

  • Correspondence — every message from a sender whose email address matches a known customer or lead is posted to that record's notification history (to both when a customer and a lead share the address; a converted lead is skipped in favour of its customer record), bounces are detected and handled by your bounce rules, and messages from senders that match no customer or lead follow the Unknown Sender Handling setting described below. Matching is case-insensitive.
  • Support — a new message from a known customer creates a support request in the default category you choose, and replies are added to the existing request (matched by message threading or the support reference number in the subject); a reply that cannot be matched opens a new request. An automatic acknowledgement is sent from the Reply From Address. As on correspondence mailboxes, any message matched to a known customer or lead is also posted to that record's notification history. Messages from senders that match no customer or lead are logged and skipped.
FieldDescription
NameFriendly label for the mailbox (for example Support Desk)
OrderDisplay order in the list
EnabledOnly enabled mailboxes are polled
Mailbox TypeCorrespondence or Support
Default Support CategorySupport mailboxes only — required; the category new support requests are raised in
Reply From AddressSupport mailboxes only — the From address used for ticket auto-responses
AI Reply Agent Prompt Correspondence mailboxes only. Optional prompt for future AI replies; maximum 8,000 characters
IMAP Server / Port / SSLConnection details; port defaults to 993 with SSL on
Username / PasswordCredentials for the mailbox account
Mark ReadMark messages as read once processed
Max / RunMaximum messages processed per run (default 50, up to 1,000)

Each row offers Test (verifies the IMAP connection before you rely on it), Edit, Enable/Disable, and Delete. Disabling a mailbox pauses it without losing its configuration.

Tip: Always use Test after creating or editing a mailbox. If the agent cannot connect, that mailbox is skipped on every run and an error is recorded in the agent logs.

Bounce Rules

When the agent detects a bounce on a correspondence mailbox — delivery status notifications, mailer-daemon or postmaster messages, and similar failure notices — it works out which customer the failed delivery belongs to and applies your bounce rules. Click Add Rule to create one.

Rules are checked in priority order (lowest number first) and only the first matching enabled rule runs. Matching is case-insensitive:

  • SubjectContains / BodyContains / HeaderContains — the match value appears in the bounce subject, body, or headers
  • FromAddress — the match value appears in the bounce sender address (for example mailer-daemon)
  • Always — matches every bounce; leave the match value blank. For the other match types a blank value never matches.
ActionEffect on the customer
DeleteCustomerDeletes the customer record
UpdateStatusChanges the customer's status — pick the status from the dropdown
RemoveEmailAddressClears the customer's email address
DisableNotificationsTurns off notifications for the customer
AddTag / RemoveTagAdds or removes the tag entered as the action value
SetCustomFieldSets a custom field — enter the action value as FieldName=Value
SetDataFieldSets a data field — enter the action value as PropertyName=Value

Behaviours to be aware of:

  • If no enabled rule matches, the bounce is only logged — the customer is left unchanged.
  • If no customer can be matched to the failed recipient address, the rule's action is not performed.
  • Rules can be edited, temporarily disabled, or deleted from the list at any time.

Caution: Destructive actions such as DeleteCustomer and RemoveEmailAddress run automatically and without confirmation. Start with a gentler action such as AddTag or DisableNotifications until you are confident your match conditions only catch genuine bounces.

Monitoring the Agent

The Recent Inbound Emails table on the Email Agent page lists the last 20 processed messages with their classification (Reply, Bounce, or Unknown), sender and subject. For a full audit trail, click View Agent Logs to open the Application Logs filtered to the Email Agent source — every processed message, applied rule and failure is recorded there.

Unknown Sender Processing

The email agent can turn inbound correspondence from senders that match no existing customer or lead into new records. This is a rule-based feature — no AI provider is involved — and it is off by default.

To configure it:

  1. Enable the UnknownSenderProcessing feature toggle in Administration > Feature Toggles.
  2. Open Settings > Email Agent and choose an Unknown Sender Action in the Unknown Sender Handling section:
    • None (default) — the message is only logged to the inbound email ledger; this is the behaviour when the toggle is off
    • Create Customer — a customer is created from the sender and the mail body is posted to their notification history
    • Create Lead — a lead is created from the sender and the mail body is stored in the Lead's shared communication history

Matching rules to be aware of:

  • Email addresses are matched case-insensitively.
  • Recording a known sender never depends on this toggle: whenever an inbound email matches an existing customer, an existing lead, or both, the mail body is posted to the notification history of every matched record — and no new record is created.
  • When a lead has converted to a customer, only the customer record receives the mail; the converted lead is skipped.
  • New leads are assigned to the tenant's first campaign. If the tenant has no campaigns, lead creation is skipped and a warning is logged instead.
  • The section is hidden on the Email Agent page while the toggle is disabled.

AI Email Assistant

The AI Email Assistant drafts replies to inbound correspondence and helps write templates. Everything in this section is gated by the AI feature toggle, which is disabled by default — enable it in Administration > Feature Toggles. While the toggle is off, all AI navigation entries are hidden and the pages return 404.

AI Settings

Administrators configure the assistant on the AI Settings page (admin dropdown, or the AI Assistant tile on the admin dashboard). Each tenant configures its own:

SettingDescription
ProviderOpenAI, Anthropic, Kimi, OpenRouter, or an OpenAI-compatible endpoint
ModelFree-text model identifier with per-provider suggestions (for OpenRouter use its vendor/model naming, e.g. openai/gpt-4o-mini)
API KeyStored encrypted per tenant; leave blank when saving to keep the existing key
Base URLOptional override; defaults to api.openai.com, api.anthropic.com, api.moonshot.ai, or openrouter.ai. Required for an OpenAI-compatible endpoint — enter its full chat completions URL (e.g. http://localhost:11434/v1/chat/completions)
Reply agent prompt Tenant-wide system prompt used when a correspondence mailbox has no mailbox prompt
Summary agent promptSystem prompt controlling how the AI summarises a customer's current position on the overview page
Max tokensUpper bound on each generated completion
Auto-replyMaster switch for replying to inbound correspondence
Reply modeManual review queue or Automatic send
AI templatesEnables the Generate with AI button on template pages

Use Test Connection to verify the provider, model, and key before relying on the assistant.

Security: The API key grants access to your AI provider account. It is stored encrypted, never logged, and redacted from error messages. Rotate it with your provider if it may have been exposed.

AI Auto-Reply

When the toggle is on, a configuration is saved, and auto-reply is enabled, the assistant answers inbound email on correspondence mailboxes only — never support mailboxes and never bounce messages. A reply is drafted after the inbound email has been logged to a Customer or an unconverted Lead (an existing record, or a Lead just created by unknown sender processing). Converted Leads remain customer-side.

Two reply modes:

  • Manual review queue (default) — the drafted reply waits in the AI Reply Queue for a person to send or discard it
  • Automatic send — the reply is sent immediately through the tenant's SMTP account and logged to the owning Customer's or Lead's history

Tip: Start with the Manual review queue. Switch to Automatic send only after you are happy with the quality of the drafted replies.

Mailbox Reply Agent Prompts

Each correspondence mailbox can have its own optional AI Reply Agent Prompt. Add or edit it from Settings > Email Agent. The prompt can contain up to 8,000 characters. It controls replies generated for that mailbox.

Leave the mailbox prompt blank to use the tenant-wide Reply agent prompt on AI Settings. If both are blank, SurelyCrm uses its built-in reply prompt. Clearing a mailbox prompt restores that fallback order.

Support mailboxes do not generate AI replies, so they do not show this setting. Changing a prompt affects future replies only. Items already in the Manual review queue keep their drafted content.

AI Reply Queue

Administrators open the queue from the admin dropdown or the AI Reply Queue dashboard tile. It lists pending AI replies page by page; open an item to see an excerpt of the original inbound email next to the drafted reply, which you can edit before sending.

  • Send — delivers the (optionally edited) reply via the tenant's SMTP account, from the SMTP username address, and posts it to the owning Customer's or Lead's history
  • Discard — drops the reply without sending anything

Items move from Pending to Sent or Discarded; sent and discarded items are never re-sent.

AI Template Generation

When the AI toggle is on, AI templates are enabled, and a configuration is saved, the Email Templates and SMS Templates edit pages show a Generate with AI button. Describe the template you want — audience, purpose, tone — and the assistant fills in the subject and body for you to review and adjust before saving. Nothing is stored or sent until you save the template yourself.

AI Customer Summary

The customer overview page shows an AI Summary card when the AI toggle is on, the AiCustomerSummary child toggle is on, and a configuration is saved. The assistant writes a short, factual summary of the customer's current position — balance and status, recent payments, recent communications, open support issues — based only on data already in the CRM. The Summary agent prompt on the AI Settings page controls how the summary is written.

The summary loads automatically after the page renders — asynchronously, so it never slows the page down — and a Regenerate Summary button refreshes it at any time. Each generation consumes provider tokens (one per page load while the toggle is on), which is why it has its own feature toggle. The text is a reading aid, not a record — it is never stored.

General Notes

Sometimes you just need to log an internal note. From the customer profile Actions menu, select General Note. Notes are stored in the customer's history and visible to all team members with access.