Frontline

Customer service: unified inbox, channel integrations, tickets, forms, surveys, knowledge base, and help center configuration.

Frontline is the customer-communication plugin. Agents work a unified inbox of conversations that arrive through per-channel integrations: erxes messenger, Facebook, Instagram, mail (Cloudflare Email Routing), Discord, Call (SIP), and Call Pro (webhook PBX). Conversations can be answered in place or converted into tickets (handled by Frontline's own ticket pipelines), deals (created by sales over tRPC), or tasks (created by operation over tRPC). The plugin also provides forms and form submissions, channel-scoped surveys, the knowledge base (topics → categories → articles), help center configuration records, response templates, and frontline reports.

For embedding chat on a site, see Messenger Widget. For the published help center app, see Help Center.

Enabling and ports

ENABLED_PLUGINS=frontline

The base name maps to the Nx projects frontline_api and frontline_ui; the dev scripts append _api/_ui to each entry.

Project Role Dev port
frontline_api Federated GraphQL subgraph + tRPC + Express webhook routes; subscriptions enabled 3304
frontline_ui Module Federation remote (remote name frontline_ui) 3004

The API port is set in main.ts.

Module map

Backend modules live under backend/plugins/frontline_api/src/modules/.

Module What it contains Key collections Module page
inbox/ Conversations, messages, integrations records, widget and client-portal resolvers, receiveInboxMessage conversations, conversation_messages, integrations Inbox & Channels
channel/ Team and personal channels, membership, roles (admin/lead/member) channels, channel_members Inbox & Channels
response/ Response templates response_templates Inbox & Channels
integrations/<kind>/ facebook, instagram, mail, discord, call, callpro runtimes plus the trpc router Per-kind mirror collections (mail_integrations, conversations_discord, calls_cdr, …) Channel Integrations
ticket/ Pipelines, statuses, tickets, activities, notes, ticket configs, import/export frontline_tickets, frontline_tickets_pipeline, frontline_tickets_pipeline_status, frontline_ticket_activities, frontline_tickets_notes, frontline_ticket_configs Tickets
form/ Form definitions, fields, submissions frontline_forms, frontline_form_submissions Forms & Surveys
survey/ Channel-scoped surveys, vote ledger, per-option ticket automation frontline_surveys, frontline_survey_votes Forms & Surveys
knowledgebase/ Topics, categories, articles; AI knowledge source provider knowledgebase_topics, knowledgebase_categories, knowledgebase_articles Knowledge Base
helpcenter/ The client portal config record behind a published help center site frontline_help_center_configs Knowledge Base
reports/ Inbox/ticket/call/Facebook report aggregations, saved ReportCharts frontline_report_charts Knowledge Base

The frontend remote under frontend/plugins/frontline_ui/src/modules/ mirrors this structure (inbox, ticket, pipelines, status, channels, forms, survey, knowledgebase, helpcenter, integrations, integrations-config, report, responseTemplate, settings), plus src/widgets/ automation remote entries and src/pages/ route pages. Navigation is registered from src/config.tsx under frontline/* (inbox, tickets, reports, calls/dashboard, calls/statistics, forms, surveys, knowledgebase, helpcenter) and settings/frontline/* (channels, personal-channel, config).

HTTP routes

src/routes.ts mounts webhook routers on the plugin's Express app: /facebook, /instagram, /mail (POST /mail/receive, HMAC-signed by the Cloudflare worker), and /callpro (POST /callpro/receive, only when CALLPRO_ENABLED=true). See Channel Integrations.

tRPC

src/init-trpc.ts merges the integration, inbox, conversation, form, ticket, relation, and fields routers. Notable procedures include inbox.createConversationAndMessage, inbox.getConversationsList, ticket.create, form.submissionsByConversation, and relation.onRelationAdded.

How it connects to Core

  • Contacts/customers come from Core: inbound messages and webhooks create or reuse core customers over tRPC.
  • meta/ registers permissions (inbox, channel, integration, ticket, form, survey, callReport, responseTemplate, knowledgeBase, helpCenter modules), automations (facebook, instagram, inbox, tickets, discord workers plus the knowledgebase AI source), notifications, segments, references, relations (frontline:conversation subscribed type), tags (conversation, ticket, form), and properties (the conversation and ticket property types, each with systemFields).
  • Import/export producers cover ticket import/export (frontline:ticket.ticket) and form-submission export (frontline:formSubmission.formSubmission).
  • Messenger and form embed bundles are built by the apps/frontline-widgets app (messengerBundle.js, formBundle.js); install dialogs build snippet URLs from REACT_APP_WIDGETS_URL.

Configuration

Backend env vars read by this plugin:

Variable Purpose
CALLPRO_ENABLED true turns on Call Pro
CALLPRO_SUBDOMAINS Comma-separated tenant list that restricts Call Pro on shared deployments
MAIL_RECEIVE_URL, MAIL_WORKER_URL, MAIL_TENANT, MAIL_WEBHOOK_SECRET Inbound mail delivery from the Cloudflare worker
MAIL_DOMAIN, MAIL_SENDING_ACCOUNT_ID, MAIL_SENDING_API_TOKEN, MAIL_SENDING_DAILY_LIMIT The deployment's own Cloudflare account used when a workspace has not connected its own
CALL_ENDPOINT_URL, CALL_WEBHOOK_REQUIRE_SIGNATURE, CALL_SUBSCRIPTION_REQUIRE_AUTH Call (SIP) integration
FACEBOOK_GRAPH_URL Graph API base URL
DOMAIN, ENDPOINT_URL, JWT_TOKEN_SECRET, VERSION Shared platform vars (VERSION=saas toggles SaaS behavior)

Meta app credentials (FACEBOOK_APP_ID, FACEBOOK_APP_SECRET, FACEBOOK_VERIFY_TOKEN, FACEBOOK_POST_APP_ID, FACEBOOK_POST_APP_SECRET, INSTAGRAM_*) are read through getConfig: per-workspace records first, env vars as fallback, env-only when VERSION=saas. See Channel Integrations.

Pages in this section

Operate on one system.

Talk to our team about consolidating your stack onto erxes. 30-minute walkthrough, custom to your org.