Introducing a new way to review your PRs.

Read the announcement

frappe / helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / integrations-and-telephony

Integrations and telephony

Helpdesk connects customer support work with external services for email, ERPNext customer data, telephony, and Frappe Cloud account context. Email accounts carry customer messages into and out of ticket work. ERPNext keeps customer records and access state aligned across the two systems. Telephony lets agents place calls from the desk and keep call records with the related ticket.

Integration landscape

The integration layer links Helpdesk workflows to systems that own customer, message, call, or account data. ERPNext support is optional and controlled by site settings and permissions. Email uses configured account records for incoming and outgoing ticket communication. Telephony provides the provider connections and call-log records used by the desk. Frappe Cloud provides optional site and trial context.

IntegrationMain support outcomeDesk entry points
Email accountsAgents receive and send ticket messages through configured mail services.Email account settings and ticket replies
ERPNext integrationA linked ERPNext Customer and HD Customer share a common customer view and access state.Customer records and ERPNext sync settings
Telephony and call logsAgents make or receive calls and review the resulting call activity.Ticket actions, call popups, and /call-logs
Frappe Cloud account contextEligible site users can see Frappe Cloud account context and an active site trial.Boot context and the trial card

Email integration boundary

Email account configuration

Email account configuration defines how Helpdesk connects to mail services for inbound and outbound work. An account can use a supported provider or custom server settings. It can enable incoming mail, outgoing mail, or both, and can be marked as a default for either direction.

The desk lists configured accounts and lets an administrator edit provider credentials, server settings, security options, and the linked email domain. It also provides a manual pull action for accounts that have incoming mail enabled. The account form validates the chosen provider before it sends changes to the server.

References: desk/…/EmailAccountList.vue• L1-87 desk/…/EmailEdit.vue• L43-155 desk/…/EmailEdit.vue• L327-408

Ticket email communication

Ticket email communication turns an agent reply into an outbound message linked to the ticket. The communication area keeps email replies and internal comments as separate actions, while the email editor supplies recipients, sender choice, quoted content, attachments, and saved replies.

The editor sends the message through the ticket’s server method. It requires a non-empty message and at least one recipient in To, Cc, or Bcc. Attachments are uploaded against the ticket before send, and the editor clears the draft state after the server accepts the reply.

This diagram shows how a configured mail account supports a ticket reply from composition to ticket activity.

flowchart LR
    A[Configured email account] --> B[Ticket reply editor]
    C[Agent message and recipients] --> B
    D[Attachments and saved reply] --> B
    B --> E[Ticket reply service]
    E --> F[Outbound email]
    E --> G[Ticket communication activity]

References: desk/…/CommunicationArea.vue• L7-105 desk/…/EmailEditor.vue• L27-205 desk/…/EmailEditor.vue• L445-501 desk/…/AttachmentItem.vue• L1-37 desk/…/SavedRepliesList.vue• L1-18

ERPNext integration boundary

ERPNext customer alignment

ERPNext integration treats an ERPNext Customer and a Helpdesk HD Customer as two linked views of one customer. When enabled, new records can create their counterpart, selected customer fields stay aligned, and a bulk sync can link existing records without creating duplicates. The sync also follows record renames and merges, and removes the linked Helpdesk customer when an ERPNext customer is deleted.

The integration is active only when ERPNext is installed, ERPNext HD Settings is enabled, and the current user has the required customer permissions. The settings action reports whether all customer records have links on both sides before it offers a sync operation. A requested sync runs as a background job and reports start and completion events so the desk can refresh its status after the committed links are available.

This diagram shows how customer changes move between the two systems and how related access state follows the customer link.

flowchart LR
    A[ERPNext Customer] <--> B[Linked HD Customer]
    A --> C[Linked user permissions and shares]
    B --> C
    D[Sync Customers] --> A
    D --> B

References: helpdesk/…/api.py• L9-38 helpdesk/…/api.py• L41-142 helpdesk/…/customer.py• L15-65 helpdesk/…/erpnext_hd_settings.py• L11-28 helpdesk/…/test_erpnext_integration.py• L951-972 helpdesk/…/test_erpnext_integration.py• L1007-1226

ERPNext access alignment

Customer links also provide the map for user permissions and shared-document access. Changes made for an ERPNext Customer can be mirrored to its HD Customer, and changes made for an HD Customer can be mirrored back. The mirror keeps access scope aligned, avoids duplicate entries, and follows changes to the linked customer or access target. This keeps agent access consistent when users work from either application view.

References: helpdesk/…/user_permission.py• L8-104 helpdesk/…/doc_share.py• L7-100 helpdesk/…/mirror_sync.py• L27-72 helpdesk/…/test_erpnext_integration.py• L261-445 helpdesk/…/test_erpnext_integration.py• L451-907

Frappe Cloud integration boundary

Cloud account and trial context

Frappe Cloud context supplies site-level account information during desk boot and exposes an active free trial when the site supports Frappe Cloud Settings. The boot context is limited to the users and sites that Frappe Cloud allows, so Helpdesk does not present this account surface on unsupported sites.

The trial view uses shared site cache data to avoid a billing request on every read. A successful read refreshes several times a day, while a failed read retries sooner and keeps the last known trial. Each user can hide an open trial for a day; an ended trial remains visible until the billing data no longer reports it.

References: helpdesk/…/frappe_cloud.py• L1-25 helpdesk/…/frappe_cloud.py• L28-74

Telephony integration boundary

Calling experience

The desk exposes calling from customer and ticket context. An agent can use a contact phone number or enter a number, choose Twilio or Exotel when needed, and set a default medium. The active provider opens a call panel for outgoing and incoming calls, shows the matched contact when possible, and reports call state back to the ticket view.

The telephony store is the shared boundary between desk actions and provider-specific call panels. It loads provider status, records the default medium, and carries the ticket or customer link that the call provider uses when it creates call activity.

This diagram shows how a desk call becomes provider activity and returns to the ticket as refreshed call information.

flowchart LR
    A[Ticket or contact action] --> B[Telephony state]
    B --> C{Calling medium}
    C --> D[Twilio]
    C --> E[Exotel]
    D --> F[Call panel and status]
    E --> F
    F --> G[TP Call Log]
    G --> H[Ticket activity and call logs page]

References: desk/…/telephony.ts• L15-59 desk/…/CallUI.vue• L69-141 desk/…/TwilioCallUI.vue• L239-279 desk/…/TwilioCallUI.vue• L292-424 desk/…/ExotelCallUI.vue• L159-197 desk/…/TicketAgent.vue• L133-150

Call-log experience

TP Call Log is the shared record for provider calls and manually logged calls. Agents can view call logs at /call-logs, create or edit a log, and link it to an HD Ticket. Ticket activity uses the same records, so a call can be reviewed from the global call-log view or from the ticket that it supports.

Call-log presentation resolves phone numbers to contacts where possible. It then shows the caller or receiver, call direction, provider medium, status, duration, and any ticket link in a form suited to the desk.

References: desk/…/index.ts• L125-133 desk/…/CallLogs.vue• L1-141 desk/…/CallLogModal.vue• L180-218 desk/…/CallLogModal.vue• L261-344 helpdesk/…/api.py• L279-309 helpdesk/utils.py• L271-334 helpdesk/utils.py• L438-482

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep email account direction and default flags aligned with the sender selection and the server-side ticket reply path. A mismatch can make a valid account unavailable for replies.
  • Keep provider-specific and custom email fields aligned with account validation and the server update payload. A form can appear valid while saving incomplete connection details.
  • Keep recipient validation and attachment ownership aligned with ticket reply creation. A message can be sent without the context or files that the agent expects.
  • Keep saved-reply insertion and reply submission aligned. A saved reply can include actions that must be applied only after the server accepts the ticket reply.
  • Keep the ERPNext customer link rules aligned with bulk sync, create/update hooks, rename and merge handling, and delete handling. A change in one path can leave the two customer views linked to different records.
  • Keep ERPNext permission checks, background sync state, and realtime completion events aligned with the settings UI. The desk can otherwise show stale sync state or offer an action that the server must reject.
  • Keep customer links in sync with the user-permission and document-share mirror rules, including identity changes and access-scope changes. Access can silently differ even when the customer records look correct.
  • Keep Frappe Cloud trial cache expiry, retry behavior, and per-user dismissal together. A change in one can make the trial card stale or hide it for the wrong period.
  • Keep provider availability and the default calling medium aligned between telephony settings, the telephony store, and the call chooser. The desk uses this state to decide whether to call directly or ask the agent to choose.
  • Keep the call link fields passed by ticket actions aligned with provider call creation. Missing ticket context prevents the resulting call log from appearing in ticket activity.
  • Keep TP Call Log fields and display parsing aligned across global list views, ticket payloads, manual logging, and provider-created records.

Important failure modes

TriggerConsequenceGuard
No incoming or outgoing email account is enabledThe desk cannot pull incoming messages or send ticket replies through that direction.Configure the account direction and default state before using the related ticket action.
A ticket reply has no recipientThe reply is not submitted to the server.The editor requires at least one address in To, Cc, or Bcc.
An attachment upload is still in progress or its file is removedThe reply can be blocked or sent without the intended file.The editor disables send during upload and removes the server attachment when an agent removes it.
ERPNext is not installed while ERPNext HD Settings is enabledSettings cannot be saved and customer sync cannot run.Settings validation checks the installed apps before enabling the integration.
The user lacks the required ERPNext customer permissionsThe integration appears unavailable or a customer sync is rejected.Check read access for status and write access for synchronization on both customer types.
A customer exists on both sides but has no reciprocal linkSync may create or link a counterpart, while access mirrors cannot find the correct target.Run the customer sync and verify the linked state before relying on mirrored access.
A rename or merge conflicts with an unrelated customer on the other sideThe cross-system operation is rejected to avoid replacing the wrong customer.Resolve the name conflict before renaming or merging the linked records.
Frappe Cloud Settings is unavailable or a billing read failsCloud context is hidden, or the trial card keeps its last known value until a retry.Treat Cloud Settings as optional and use the built-in retry and cache behavior.
Both telephony providers are unavailableThe desk cannot enable calling, so call actions cannot start a provider call.The telephony store derives isCallingEnabled from provider status.
A ticket has no usable phone numberThe agent must enter a number before the call can start.Ticket call actions check contact phone fields and open the number prompt when empty.
A call is created without the ticket linkThe call exists in global logs but does not appear in the ticket activity.Pass the ticket doctype and name through the call flow or add the ticket link when logging manually.

Key files

FileWhy to read it
desk/…/EmailAccountList.vueShows the desk boundary for listing and selecting configured email accounts.
desk/…/EmailEdit.vueShows how provider, direction, domain, and pull settings are managed.
desk/…/CommunicationArea.vueShows how a ticket separates email replies from internal comments.
desk/…/EmailEditor.vueShows the ticket reply contract for recipients, attachments, saved replies, and server submission.
desk/…/AttachmentItem.vueShows how supported attachment types are previewed or opened from the desk.
desk/…/SavedRepliesList.vueShows how reusable response content is scoped and managed for ticket communication.
helpdesk/…/api.pyDefines ERPNext integration status, permission checks, and the customer sync boundary.
helpdesk/…/test_erpnext_integration.pyShows the supported customer, access-mirror, sync, rename, and merge guarantees.
helpdesk/…/utils.pyExplains the customer link, field alignment, and rename relationship used by ERPNext support.
helpdesk/…/customer.pyShows how customer create, update, rename, and delete events keep the two systems aligned.
helpdesk/…/user_permission.pyShows how customer access permissions follow the cross-system link.
helpdesk/…/doc_share.pyShows how shared customer documents follow the same link.
helpdesk/…/erpnext_hd_settings.pyDefines the setting that turns ERPNext support on and validates its prerequisite.
helpdesk/…/frappe_cloud.pyDefines optional Frappe Cloud boot context and cached trial visibility.
desk/…/telephony.tsProvides the shared desk state for provider status, calling medium, and call links.
desk/…/CallUI.vueConnects desk call actions to the selected provider experience.
desk/…/TwilioCallUI.vueShows the Twilio call lifecycle as the desk presents it to an agent.
desk/…/ExotelCallUI.vueShows the Exotel call lifecycle and real-time call updates.
desk/…/CallLogs.vueDefines the global call-log view and its entry points for new and existing logs.
desk/…/CallLogModal.vueDefines manual call-log creation, editing, and ticket linking.
helpdesk/…/api.pyAdds linked call logs to the ticket data returned to the desk.
helpdesk/utils.pyDefines the common call-log display fields and contact-aware call presentation.