Integrate 1C-Bitrix with YCLIENTS Online Booking
You launched a site on 1C-Bitrix and connected YCLIENTS for online booking. Clients leave requests via the widget, but booking data stays in YCLIENTS—it doesn't reach Bitrix CRM. Managers manually transfer information, spending up to 10 minutes per booking and losing up to 30% of leads. With 50 bookings per day, that's 500 minutes—over 8 hours of work for one employee. With an average ticket value, that means significant missed revenue daily. Result: lower conversion and unhappy clients.
Our team implemented an integration for a chain of 12 beauty salons: after automation, the time to process one booking dropped from 8 minutes to 2 seconds—240 times faster than manual entry—and the conversion to sale increased by 22%. This saved the chain 8 hours of manual labor daily. As noted in Wikipedia, CRM integration helps manage customer data effectively.
Why YCLIENTS and Bitrix Synchronization Matters
A unified CRM is not just convenience; it's a foundation for marketing and analytics. You see which source brought the client, which services are popular, where requests are lost. Without integration, this data is fragmented, and business processes suffer from manual input. Webhook processing allows instant reaction: a client books—a lead is already in the CRM.
What We Integrate: Key Scenarios
YCLIENTS provides a REST API v2. Main entities: records, clients, services, staff, bookforms. We prioritize records and clients.
Scenarios:
- New booking in YCLIENTS → lead in CRM (create or update)
- Client from CRM → client card in YCLIENTS (bidirectional sync)
- Booking cancellation → update deal status (JUNK)
- Showcase YCLIENTS services on the site via widget
YCLIENTS API: Authorization
YCLIENTS uses a Bearer token obtained in exchange for username/password. The token lives long (several months); we store it in the module settings.
namespace Local\YClients; class ApiClient { private string $baseUrl = 'https://api.yclients.com/api/v1'; private string $partnerToken; private string $userToken; public function __construct() { $this->partnerToken = \Bitrix\Main\Config\Option::get('local.yclients', 'partner_token'); $this->userToken = \Bitrix\Main\Config\Option::get('local.yclients', 'user_token'); } public function request(string $method, string $path, array $data = []): array { $url = $this->baseUrl . $path; $ch = curl_init(); curl_setopt_array($ch, [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 15, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . $this->partnerToken . ', User ' . $this->userToken, 'Accept: application/vnd.yclients.v2+json', 'Content-Type: application/json', ], ]); if ($method === 'POST') { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); } elseif ($method === 'PUT') { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); } $response = json_decode(curl_exec($ch), true); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode >= 400) { throw new \RuntimeException("YCLIENTS API error {$httpCode}: " . ($response['meta']['message'] ?? 'unknown')); } return $response['data'] ?? $response; } } Setting Up a Webhook for Creating Leads
YCLIENTS supports events: record_created, record_updated, record_cancelled, client_created. Configure in YCLIENTS admin: Integrations → Webhook.
// /local/api/yclients-webhook.php require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); $payload = json_decode(file_get_contents('php://input'), true); $signature = $_SERVER['HTTP_X_YCLIENTS_HOOK_SIGNATURE'] ?? ''; $body = file_get_contents('php://input'); $secret = \Bitrix\Main\Config\Option::get('local.yclients', 'webhook_secret'); if (hash_hmac('sha256', $body, $secret) !== $signature) { http_response_code(403); exit; } $eventType = $payload['resource'] ?? ''; $data = $payload['data'] ?? []; match ($eventType) { 'record_created' => (new \Local\YClients\RecordHandler())->onCreate($data), 'record_cancelled' => (new \Local\YClients\RecordHandler())->onCancel($data), 'record_updated' => (new \Local\YClients\RecordHandler())->onUpdate($data), default => null, }; http_response_code(200); The record handler creates a lead with fields: service name, phone, client name, comment with details, and custom fields to identify the record in YCLIENTS. On cancellation, the deal status changes to JUNK.
Synchronizing Clients from Bitrix to YCLIENTS
When a deal is created in Bitrix (client interested in a service), a client is automatically created in YCLIENTS. Search by phone—if found, update the card; if not, create a new one. The client ID is saved in a custom deal field.
Integration Options: Comparison Table
| Method | When to Use | Complexity | Timeline |
|---|---|---|---|
| Webhooks | Need instant reaction to events in YCLIENTS | Low | 1–2 weeks |
| Pull API | Need periodic data export (once per hour) | Medium | 2–3 weeks |
| Bidirectional sync | Full data consistency | High | 3–5 weeks |
What's Included in the Work (Deliverables)
- Detailed integration documentation (data schemas, configs)
- Source code of the module with comments
- Webhook and token setup
- Custom field creation in CRM
- Testing on staging environment
- Admin training (1 hour)
- 6-month code warranty and post-launch support
Step-by-step webhook setup guide (for administrators)
- Get a partner token in YCLIENTS admin (Settings → API).
- Save the token and webhook secret in the module settings.
- Place the handler file at
/local/api/yclients-webhook.php. - In YCLIENTS admin, add the webhook URL (Integrations → Webhook → Add).
- Test by creating a booking—a new lead should appear in the CRM.
Typical Integration Stages
| Stage | What We Do | Timeline |
|---|---|---|
| Analysis | Review current site, YCLIENTS, scenarios | 1–2 days |
| Design | Create data schema, define custom fields | 1 day |
| Development | Write API client, webhook handler, sync | 5–10 days |
| Testing | Verify all scenarios, handle edge cases | 2–3 days |
| Deployment | Deploy to production, set up monitoring | 1 day |
Timelines and How to Order
Basic integration (webhook → lead) takes 1–2 weeks. Bidirectional sync with service showcase takes 3–5 weeks. The project cost is calculated individually depending on complexity. The final price is determined after a detailed assessment.
We have over 7 years of experience with Bitrix and YCLIENTS integrations, with 40+ projects for beauty salons, clinics, and fitness centers.
Get a free consultation to evaluate the timeline and complexity for your project. Order integration and we'll prepare a detailed automation plan.

