itimpulse

← Back to projects

CvetBuket Platform

Product Summary

CvetBuket Platform is an automation system for a flower shop («ЦвеТут Цветы», Aksay, Russia). It unifies the website (cvetbuket.com), Telegram bot (@cveTut_bot) and MAX messenger bot into a single order and catalog core, integrated with 1C ERP, Tinkoff SBP payments and Yandex Delivery for courier dispatch. The system automates sales, payment handling, delivery booking and customer communication so the shop can serve more orders with less manual work.

Business Problem

Flower shops typically juggle multiple channels (website, messengers, phone), manual catalog updates, manual payment follow-up and manual courier ordering. That leads to errors, delays and lost orders. Double data entry between a website and 1C, expired payment links with stuck reserves, and unsynced cancellations between the shop and ERP create operational risk and extra work for staff.

Solution

The platform provides one backend for the website and both bots. Catalog, prices and stock are synced from 1C via OData; orders from any channel are written to MySQL and pushed to 1C. Payment links (Tinkoff SBP) are created at checkout; a cron job cancels expired links and releases reserves in both Tinkoff and 1C. Courier delivery is automated: a cron job creates Yandex Delivery claims for ready orders; a webhook updates order status and notifies the client. Cancellations are synced both ways (site/bot → 1C and 1C → site). An AI consultant (YandexGPT) suggests bouquets in the bots. Florists send a photo of the assembled bouquet for client approval before dispatch.

Key Capabilities

Architecture Overview

The system map (`doc/system-map.md`) describes the flow: **Clients** (Website, Telegram Bot, MAX Bot) send requests into the **Order & catalog core** (PHP). The core uses **MySQL** for orders, catalog cache, bot state and users. It talks to **1C:УНФ** (catalog sync, order create/cancel, import), **Tinkoff SBP** (payment links and cancel), **Yandex** (Delivery, GPT, Direct, Maps), and **Telegram / MAX** APIs. **Admin** and **CRON** jobs (catalog, payment expiry, taxi, order status, photo confirm, Yandex Direct) run on the same codebase. No framework; single PHP app with PDO/MySQL and Docker in production.

Integrations

| System | Role |

| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| **1C:УНФ OData** | Catalog (nomenclature, characteristics, prices, stock, set composition), order create (Document_ЗаказПокупателя), order cancel (ВариантЗавершения), order status poll and 1C-only order import. |

| **Yandex Delivery** | Courier dispatch: cron creates claims (Express / Other-Day), webhook receives status; geocoding and cost calculation for checkout. |

| **Tinkoff SBP** | Payment link generation at checkout; webhook for payment confirmation; cancel on link expiry to release reserve. |

| **Telegram Bot API** | Webhook for bot; send messages, keyboards, photos; subscription check for discounts. |

| **MAX Bot API** | Same flows as Telegram via a separate webhook and adapter; shared BotHandler. |

| **Yandex GPT** | AI consultant in bots (bouquet suggestions); optional SEO text generation for categories/products; Yandex Direct ad copy. |

| **Yandex Direct API v5** | Campaigns, ad groups, ads, keywords, extensions, images; semantic core and stats via cron. |

| **Yandex Maps** | Geocoding for delivery address (server-side proxy to avoid browser blocking). |

Business Impact

Case Study

Case Study: cvetbuket

Problem

Operations include multiple systems and manual transitions between them.

Engineering solution

Implemented a docs-driven integration pipeline with endlog-triggered updates and synchronized project artifacts.

Architecture

Project manifest + integrations manifests + knowledge extraction + static site generation.

Integrations

1c-unf-odata, tinkoff-sbp, yandex-delivery

Business value

Faster updates of engineering portfolio, less manual documentation overhead, consistent cross-project visibility.

Engineering Log

Engineering log

Changelog of engineering solutions. Generated from `doc/changelog-entries.md`.

Run: `php scripts/build_engineering_log.php`


2026 — AI consultant for bouquet selection

Problem

Clients needed 24/7 personalised recommendations; staff could not scale.

Engineering

YandexGPTClient::consultFlorist() with catalog slice and system prompt; 3 price tiers; ai_chat_history for context.

Business value

Faster selection, upsell, less routine load on staff.

Tech

PHP, YandexGPT API, MySQL ai_chat_history


2026 — Automatic courier dispatch

Problem

Manual courier ordering slowed down delivery.

Engineering

cron_taxi.php creates delivery requests via Yandex Delivery API (Express / Other-Day). Webhook updates order status.

Business value

Orders automatically receive courier dispatch.

Tech

PHP, Yandex Delivery API, cron, webhook


2026 — Payment link TTL and reserve release

Problem

Expired SBP links left reserves locked in Tinkoff and 1С.

Engineering

cron_payment_expiry.php runs every minute; calls TinkoffSBPClient::cancel() and ODataClient::cancelOdataOrder().

Business value

No stuck reserves; stock and money freed without manual steps.

Tech

PHP, Tinkoff SBP API, 1С OData PATCH, cron


2026 — Two-way order cancellation sync

Problem

Cancel in 1С or on site/bot had to stay in sync.

Engineering

Local cancel → cancelOdataOrder(). cron_order_status.php detects 1С cancel → local status + notify client.

Business value

Single view of order state; operator or client cancel reflected everywhere.

Tech

PHP, 1С OData, cron, Telegram/MAX Notifier


2026 — Unified bot logic (Telegram + MAX)

Problem

Two messengers needed the same flows without duplicating code.

Engineering

BotHandler holds all logic; TelegramAdapter and MaxAdapter implement MessengerInterface; same webhook flow.

Business value

One codebase for two channels; consistent UX and fewer bugs.

Tech

PHP, Telegram Bot API, MAX Bot API, MySQL bot_user_states


Integrations

CvetBuket Platform

Product Summary

CvetBuket Platform is an automation system for a flower shop («ЦвеТут Цветы», Aksay, Russia). It unifies the website (cvetbuket.com), Telegram bot (@cveTut_bot) and MAX messenger bot into a single order and catalog core, integrated with 1C ERP, Tinkoff SBP payments and Yandex Delivery for courier dispatch. The system automates sales, payment handling, delivery booking and customer communication so the shop can serve more orders with less manual work.

Business Problem

Flower shops typically juggle multiple channels (website, messengers, phone), manual catalog updates, manual payment follow-up and manual courier ordering. That leads to errors, delays and lost orders. Double data entry between a website and 1C, expired payment links with stuck reserves, and unsynced cancellations between the shop and ERP create operational risk and extra work for staff.

Solution

The platform provides one backend for the website and both bots. Catalog, prices and stock are synced from 1C via OData; orders from any channel are written to MySQL and pushed to 1C. Payment links (Tinkoff SBP) are created at checkout; a cron job cancels expired links and releases reserves in both Tinkoff and 1C. Courier delivery is automated: a cron job creates Yandex Delivery claims for ready orders; a webhook updates order status and notifies the client. Cancellations are synced both ways (site/bot → 1C and 1C → site). An AI consultant (YandexGPT) suggests bouquets in the bots. Florists send a photo of the assembled bouquet for client approval before dispatch.

Key Capabilities

Architecture Overview

The system map (`doc/system-map.md`) describes the flow: **Clients** (Website, Telegram Bot, MAX Bot) send requests into the **Order & catalog core** (PHP). The core uses **MySQL** for orders, catalog cache, bot state and users. It talks to **1C:УНФ** (catalog sync, order create/cancel, import), **Tinkoff SBP** (payment links and cancel), **Yandex** (Delivery, GPT, Direct, Maps), and **Telegram / MAX** APIs. **Admin** and **CRON** jobs (catalog, payment expiry, taxi, order status, photo confirm, Yandex Direct) run on the same codebase. No framework; single PHP app with PDO/MySQL and Docker in production.

Integrations

| System | Role |

| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| **1C:УНФ OData** | Catalog (nomenclature, characteristics, prices, stock, set composition), order create (Document_ЗаказПокупателя), order cancel (ВариантЗавершения), order status poll and 1C-only order import. |

| **Yandex Delivery** | Courier dispatch: cron creates claims (Express / Other-Day), webhook receives status; geocoding and cost calculation for checkout. |

| **Tinkoff SBP** | Payment link generation at checkout; webhook for payment confirmation; cancel on link expiry to release reserve. |

| **Telegram Bot API** | Webhook for bot; send messages, keyboards, photos; subscription check for discounts. |

| **MAX Bot API** | Same flows as Telegram via a separate webhook and adapter; shared BotHandler. |

| **Yandex GPT** | AI consultant in bots (bouquet suggestions); optional SEO text generation for categories/products; Yandex Direct ad copy. |

| **Yandex Direct API v5** | Campaigns, ad groups, ads, keywords, extensions, images; semantic core and stats via cron. |

| **Yandex Maps** | Geocoding for delivery address (server-side proxy to avoid browser blocking). |

Business Impact

System Map

System map

CvetBuket Platform (cvetbuket.com)

```

Clients

├── Website (index, category, product, cart, process_order)

├── Telegram Bot (webhook.php → BotHandler)

└── MAX Bot (max_webhook.php → BotHandler)

Order & catalog core (PHP)

├── Catalog ← 1С:УНФ OData (cron_update_catalog_odata, CatalogUpdater)

├── Orders → 1С Document_ЗаказПокупателя (ODataClient)

├── Payments ← Tinkoff SBP (process_order, webhook/tinkoff, cron_payment_expiry)

├── Delivery ← Yandex Delivery (cron_taxi, webhook/yandex_delivery)

├── Notifications (Notifier → TG/MAX)

└── AI consultant (YandexGPTClient, ai_chat_history)

MySQL (orders, product_bases, categories, bot_user_states, site_users, yd_*, …)

├── 1С:УНФ OData (catalog, orders, cancel sync, cron_1c_import, cron_order_status)

├── Yandex (Delivery, GPT, Direct API, Maps geocode-proxy)

├── Tinkoff SBP

└── Telegram / MAX Bot API

Admin (admin/*), CRON (catalog, payment_expiry, taxi, order_status, photo_confirm, yd_*)

```