Setting up a 1C-Bitrix customer support ticket system

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Configuring a Customer Support Ticket System in 1C-Bitrix

1C-Bitrix includes a built-in technical support module (support). It works, but its functionality is often insufficient: there is no convenient operator queue, no SLA, and no response-time statistics. The configuration task is either to bring the standard module up to a working state for a specific business, or to build a custom ticket system on top of the Bitrix infrastructure.

Standard support Module

The Bitrix support module creates tickets in the b_support_ticket table. Structure: subject, description, status, assignee, category, priority. Messages are stored in b_support_message.

Enabling the module: Settings → Product Settings → Modules → Technical Support Service. After activation, the /support/ section appears in the public area of the site.

A typical configuration includes:

  • Request categories (delivery, payment, return, product, other)
  • Statuses (new, in progress, awaiting reply, resolved, closed)
  • Support groups and assignee distribution
  • Auto-reply templates on ticket creation and closure

Linking a Ticket to an Order

The standard module is not connected to the sale module. Add this link via custom ticket fields:

// Adding a UF field to tickets
$userTypeManager = \Bitrix\Main\UserTypeManager::getInstance();
$userTypeManager->Add([
    'ENTITY_ID'  => 'SUPPORT',
    'FIELD_NAME' => 'UF_ORDER_ID',
    'USER_TYPE_ID' => 'integer',
    'XML_ID'     => 'order_id',
    'SORT'       => 100,
    'MULTIPLE'   => 'N',
    'MANDATORY'  => 'N',
    'EDIT_FORM_LABEL' => ['en' => 'Order Number'],
    'LIST_COLUMN_LABEL' => ['en' => 'Order'],
]);

In the ticket creation form in the user account, add a dropdown with the user's orders. When an order is selected, UF_ORDER_ID is populated automatically.

Custom Ticket System on Top of Bitrix

If requirements exceed the standard module (SLA, multi-brand, complex routing), build a custom system.

Data schema:

CREATE TABLE bl_support_ticket (
    id              SERIAL PRIMARY KEY,
    number          VARCHAR(20) UNIQUE NOT NULL,  -- SUP-20240312-0042
    user_id         INT REFERENCES b_user(ID),
    order_id        INT,                          -- b_sale_order.ID
    subject         VARCHAR(500) NOT NULL,
    category        VARCHAR(64),
    priority        SMALLINT DEFAULT 2,           -- 1=low, 2=normal, 3=high, 4=critical
    status          VARCHAR(30) DEFAULT 'open',
    assigned_to     INT,                          -- b_user.ID of the operator
    group_id        INT,                          -- operator group
    sla_deadline    TIMESTAMP,
    first_reply_at  TIMESTAMP,
    resolved_at     TIMESTAMP,
    created_at      TIMESTAMP DEFAULT NOW(),
    updated_at      TIMESTAMP DEFAULT NOW()
);

CREATE TABLE bl_support_message (
    id         SERIAL PRIMARY KEY,
    ticket_id  INT REFERENCES bl_support_ticket(id),
    author_id  INT REFERENCES b_user(ID),
    body       TEXT NOT NULL,
    is_internal BOOLEAN DEFAULT false,  -- internal operator note
    created_at  TIMESTAMP DEFAULT NOW()
);

SLA and Escalation

SLA is calculated at ticket creation based on category and priority:

class SlaCalculator
{
    private array $slaMatrix = [
        'critical' => ['first_reply' => 60,  'resolution' => 240],  // minutes
        'high'     => ['first_reply' => 240, 'resolution' => 1440],
        'normal'   => ['first_reply' => 480, 'resolution' => 2880],
        'low'      => ['first_reply' => 1440,'resolution' => 5760],
    ];

    public function calculateDeadline(string $priority): \DateTime
    {
        $minutes = $this->slaMatrix[$priority]['resolution'];
        return (new \DateTime())->modify("+{$minutes} minutes");
    }
}

An agent runs every 15 minutes to check tickets with expiring SLAs and escalates — changes the assignee or priority, and sends a notification to the supervisor.

Ticket Creation Form in the User Account

A form with category selection, subject, and problem description. If the user arrived from an order page, order_id is pre-filled. After submission — an email with the ticket number and tracking link is sent.

The operator component in the admin area: ticket queue with filters (status, category, assignee, SLA-overdue), reply interface with templates, and a status-change button.

Auto-replies and Templates

Message templates are stored in bl_support_templates. The operator selects a template from a dropdown — the message body is populated with placeholders (customer name, order number, tracking link).

On ticket creation, an email is automatically sent via \Bitrix\Main\Mail\Event with the type SUPPORT_TICKET_CREATED. On operator reply — SUPPORT_TICKET_REPLY.

Timeline

Phase Duration
Database schema + repositories 2 days
Creation form + user account 3 days
Operator interface 4 days
SLA + escalation + agent 2 days
Email notifications + templates 1 day
Testing 2 days
Total 2 weeks