Self-Hosted AI Customer Service Without the SaaS Inbox

php dev.to

Most AI customer service tools follow the same pattern: sign up for a SaaS inbox, pipe your WhatsApp, email, and chat traffic through their cloud, and let their models read everything. That works until you ask where your data actually lives. Every message, phone number, and complaint history now sits in a third-party database under someone else's retention policy. If you already run Perfex CRM on your own server, there is another way: self-hosted AI customer service, where the inbox, the customer records, and the full conversation history stay on infrastructure you control.

That is the design goal behind PulseChat, a module for Perfex CRM. Full disclosure: we build and sell it. This post is less a pitch and more a walkthrough of what a self-hosted setup looks like in practice, where AI fits into it, and where the self-hosted boundary honestly ends.

What self-hosted AI customer service means here

Perfex CRM is a self-hosted PHP application built on CodeIgniter, and PulseChat's compatibility list covers PHP 7.x and 8.x with MySQL 5.x and 8.x. PulseChat installs into Perfex as a regular module, which means the operational core of your support stack lives in your own database:

  • Conversations from every channel land in a dedicated Channels tab inside Perfex.
  • Each external sender is matched to an existing client, contact, or lead whenever possible, so agents see the name, company, open tickets, invoices, and past interactions next to the thread.
  • Channel credentials and tokens are stored encrypted in your installation.
  • Access follows Perfex's own permission model, with granular capabilities for who can use AI, manage channels, or view analytics.
  • Recurring work like email polling runs through Perfex cron, the background-job mechanism your installation already uses.

The channels: WhatsApp (team replies from a verified business number), Telegram (through your bot), email (real-time conversations over IMAP and SMTP), SMS, plus Slack and Viber bridges. The point is not any single channel; it is that all of them terminate in your CRM instead of a rented inbox.

Contrast that with the SaaS model, where the conversation store, identity matching, and analytics live in a vendor's cloud and your CRM gets, at best, a sync. Here the CRM is the system of record because the conversations are physically in it.

Where the AI actually sits

PulseChat's AI layer connects to OpenAI (ChatGPT) and Anthropic (Claude), with configurable models such as gpt-4o, gpt-4o-mini, and Claude 3.5. You pick the provider and model, set temperature and max-token limits, and customize the system prompt so drafts match your brand's tone.

The features are assistive rather than autonomous:

  • Draft Reply generates a complete response from the recent messages in a thread, for an agent to review and send.
  • Smart Suggestions offers three short ready-to-send replies as clickable chips.
  • Rewrite adjusts a draft to be more professional, friendly, or concise.
  • Spelling and Grammar cleans up a message before it goes out.
  • Summary condenses a long back-and-forth into bullet points for handovers.
  • Sentiment Analysis flags angry or at-risk customers so they get priority.
  • Translation lets an agent read and reply in the customer's own language.

Two details matter for the data-ownership argument. First, every AI call is logged per conversation with model, tokens, cost, and duration, so you can see exactly which provider was called, how often, and what it cost. Second, AI is a switch, not a foundation: you can turn the AI features off entirely in settings and PulseChat still works as a plain omnichannel inbox.

Automation rules that run on your own box

An automation rules engine evaluates every incoming message inside your installation. Typical rules look like this:

  • Route a WhatsApp message that hits your sales number to the sales team and tag it as a lead.
  • Open a ticket and set status to pending when an email subject contains "support".
  • Set priority to urgent and notify the account manager when the customer is marked VIP.
  • Route a Spanish-language message to the Spanish-speaking team with a translated AI draft ready to go.

Rules can route conversations to a staff member or team, set status and priority on arrival, tag threads for reporting, trigger AI auto-replies for common low-risk questions, and create tickets straight from a conversation. Because the rules run in the CRM, the objects they create (tickets, assignments, tags) are native Perfex records, not webhook copies of them.

What a first week looks like

Setup is install, activate, and connect channels by following the included documentation; there is no coding step. From there, three scenarios drawn from how teams actually use it:

Lead capture on WhatsApp. A prospect messages your sales number. PulseChat creates or matches an external contact against a Perfex lead, an automation rule assigns the conversation to sales, the AI proposes a welcome message with a few qualifying questions, and the whole thread lands under the lead profile.

Multi-language support over email and Telegram. Customers write in different languages across both channels. Everything centralizes into unified conversations, agents reply through AI translation in English, Spanish, or French, and Summary lets an agent joining mid-thread catch up from bullet points instead of scrolling.

Internal plus external collaboration. A support agent hits a hard technical question. The external thread stays in the Channels tab, the agent opens a staff group chat (PulseChat also covers staff-to-staff direct messages, staff-to-client messaging through the client portal, and group conversations), the team agrees on an answer, AI rewrites it in plain language, and the reply goes back out on the channel the customer used.

The changelog shows steady maintenance rather than a frozen codebase: the current release is 1.3.5 (June 2026), PHP 8.5 support landed in 1.2.7, and recent versions focused on webhook and logging improvements.

Where the self-hosted line honestly ends

Self-hosted does not mean air-gapped, and it would be dishonest to imply otherwise. When an agent clicks Draft Reply or runs a translation, the relevant thread content is sent from your server to the AI provider you configured, OpenAI or Anthropic. Those are the two documented providers; a local LLM option is not part of the feature set. If your compliance posture requires that no conversation text ever leaves your network, run PulseChat with AI disabled (a supported configuration) or handle the AI part elsewhere.

A few more cases where this is the wrong tool. If you do not run Perfex CRM, the module is useless to you; it is not a standalone product. If your main support volume lives on a channel outside the supported list, verify that before buying instead of assuming a bridge exists. And self-hosting means the operations are yours: server, database backups, cron jobs, and channel credentials all sit on your side of the line. That is the price of data ownership, not a hidden defect, but it is real work a SaaS vendor would otherwise absorb.

Key facts

Fact Value
Current version 1.3.5, updated 2026-06-24
Platform Perfex CRM module (PHP 7.x/8.x, MySQL 5.x/8.x, CodeIgniter)
Channels WhatsApp, Telegram, email (IMAP/SMTP), SMS, Slack, Viber
AI providers OpenAI (gpt-4o, gpt-4o-mini) and Anthropic (Claude 3.5), configurable
AI controls Temperature, max tokens, custom system prompt, per-conversation usage logs
Track record 43 sales on CodeCanyon
Licensing One-time Standard purchase or yearly Pro license

Links

If you are weighing a SaaS helpdesk against self-hosting on your own Perfex install, or you want details on how any of this works under the hood, ask in the comments and we will answer.

Source: dev.to

arrow_back Back to Tutorials