Automatic filling of SEO data for products (meta tags, descriptions) in 1C-Bitrix

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

Auto-Filling Product SEO Data (Meta Tags, Descriptions) in 1C-Bitrix

Empty <title> and <meta name="description"> tags on 20,000 product pages directly damage organic traffic. Manual population is not realistic; template-based generation ("Buy {NAME} at the best price") works, but only moderately well. A properly implemented automation produces unique meta tags based on real product data — without duplication and accounting for the specifics of each category.

How 1C-Bitrix Stores SEO Data

SEO fields for info block elements are stored in the b_iblock_element_iprop table (SEO templates) and in direct fields:

  • b_iblock_element.NAME — used as a fallback for the title
  • b_iblock_element_property — properties of type SEO_TITLE, SEO_DESCRIPTION (if created manually)

1C-Bitrix provides the \Bitrix\Iblock\InheritedProperty\ElementValues class for working with SEO fields via the template mechanism. This is the preferred approach — it handles inheritance from the section and info block.

Writing SEO data via the API:

$ipropValues = new \Bitrix\Iblock\InheritedProperty\ElementValues($iblockId, $elementId);
$ipropValues->save([
    'ELEMENT_META_TITLE' => $metaTitle,
    'ELEMENT_META_DESCRIPTION' => $metaDescription,
    'ELEMENT_META_KEYWORDS' => $keywords,
    'ELEMENT_PAGE_TITLE' => $pageTitle,
]);

Template-Based Generation with Variables

The basic approach: templates with placeholders, unique per category.

Example templates by category:

  • Electronics: {NAME} — buy for {PRICE} | {BRAND} authorized dealer
  • Clothing: {NAME} {COLOR} {SIZE} — buy online
  • Spare parts: {NAME} art. {ARTICLE} — {QTY} in stock, price {PRICE}

Templates are stored in a SeoTemplates Highload block linked to IBLOCK_SECTION_ID. At generation time: find the nearest section with a template (walking up the tree), replace placeholders with element property values.

Constraints: title up to 70 characters, description up to 155–160. After substitution — truncate intelligently: do not cut a word in the middle, append "..." if the text was trimmed.

AI Generation for Uniqueness

Template meta tags share the same structure — search engines notice this. For important categories or highly competitive queries — generate via LLM:

$prompt = "Write an SEO title (up to 65 characters) and meta description (up to 155 characters)
for the product: {$product['NAME']}, brand: {$product['BRAND']},
attributes: {$characteristicsText}.
Response format: JSON {\"title\": \"...\", \"description\": \"...\"}";

$response = $openAiClient->chat($prompt);
$seoData = json_decode($response, true);

Cost: approximately $0.001–0.003 per product on GPT-3.5-turbo. For 10,000 products — $10–30.

Priorities and Protecting Manual Edits

SEO data often requires manual refinement for top-performing positions. Priority logic:

  1. If ELEMENT_META_TITLE was filled manually (flag SEO_LOCKED = Y) — leave it untouched
  2. If empty — generate from template
  3. If template generation is weak (low quality by length/uniqueness metrics) — queue for AI generation

Auto-Update on Product Change

Meta tags should be updated when the name, price, or stock level changes. The OnAfterIBlockElementUpdate event handler:

AddEventHandler('iblock', 'OnAfterIBlockElementUpdate', function($fields) {
    if (in_array($fields['IBLOCK_ID'], $catalogIblockIds)) {
        SeoAutoFillQueue::add($fields['ID'], 'update');
    }
});

Do not update synchronously in the handler — add to the queue and let a worker process it asynchronously.

Project Timeline

Phase Duration
Audit of current SEO fields, identifying gaps 2–4 hours
Category template system 1–2 days
1C-Bitrix InheritedProperty API integration 4–8 hours
AI generation for priority categories 1–2 days
Manual edit protection, update triggers 1 day
Admin interface for template management 1 day

Total: 5–8 working days. Results become visible in organic search 4–8 weeks after indexing.