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.

ProjectRoleDev port
frontline_apiFederated GraphQL subgraph + tRPC + Express webhook routes; subscriptions enabled3304
frontline_uiModule 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/.

ModuleWhat it containsKey collectionsModule page
inbox/Conversations, messages, integrations records, widget and client-portal resolvers, receiveInboxMessageconversations, conversation_messages, integrationsInbox & Channels
channel/Team and personal channels, membership, roles (admin/lead/member)channels, channel_membersInbox & Channels
response/Response templatesresponse_templatesInbox & Channels
integrations/<kind>/facebook, instagram, mail, discord, call, callpro runtimes plus the trpc routerPer-kind mirror collections (mail_integrations, conversations_discord, calls_cdr, …)Channel Integrations
ticket/Pipelines, statuses, tickets, activities, notes, ticket configs, import/exportfrontline_tickets, frontline_tickets_pipeline, frontline_tickets_pipeline_status, frontline_ticket_activities, frontline_tickets_notes, frontline_ticket_configsTickets
form/Form definitions, fields, submissionsfrontline_forms, frontline_form_submissionsForms & Surveys
survey/Channel-scoped surveys, vote ledger, per-option ticket automationfrontline_surveys, frontline_survey_votesForms & Surveys
knowledgebase/Topics, categories, articles; AI knowledge source providerknowledgebase_topics, knowledgebase_categories, knowledgebase_articlesKnowledge Base
helpcenter/The client portal config record behind a published help center sitefrontline_help_center_configsKnowledge Base
reports/Inbox/ticket/call/Facebook report aggregations, saved ReportChartsfrontline_report_chartsKnowledge 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:

VariablePurpose
CALLPRO_ENABLEDtrue turns on Call Pro
CALLPRO_SUBDOMAINSComma-separated tenant list that restricts Call Pro on shared deployments
MAIL_RECEIVE_URL, MAIL_WORKER_URL, MAIL_TENANT, MAIL_WEBHOOK_SECRETInbound mail delivery from the Cloudflare worker
MAIL_DOMAIN, MAIL_SENDING_ACCOUNT_ID, MAIL_SENDING_API_TOKEN, MAIL_SENDING_DAILY_LIMITThe deployment's own Cloudflare account used when a workspace has not connected its own
CALL_ENDPOINT_URL, CALL_WEBHOOK_REQUIRE_SIGNATURE, CALL_SUBSCRIPTION_REQUIRE_AUTHCall (SIP) integration
FACEBOOK_GRAPH_URLGraph API base URL
DOMAIN, ENDPOINT_URL, JWT_TOKEN_SECRET, VERSIONShared 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

Was this helpful?