Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    User documentationGetting StartedFAQAltcraft glossary
      Profiles and databasesarrow
    • Subscription resourcesManaging databasesSubscriber profileProfiles import and data updateScheduled customer data importAutomatic data collectionBulk customers profiles updateDouble opt-in subscriptionSuppression listsProfile relationsProfile history exportProfile exportCreating a static segment based on import resultsHow to open a CSV fileMatchingTypes of fields in the databaseGlobal control groupsSubscription Manager
      Communication channelsarrow
      • Email channelarrow
      • Email: ISP interactions best practicesEmail: sending domain configurationEmail: setting up and using postmastersБыстрый старт
        Push channelarrow
        • Mobile Pusharrow
        • Settings & implementation
            Integrate your app with Altcraftarrow
          • Providers: push message structureProcessing and adding a subscriptionEvent registration
          Web pusharrow
        • Preliminary Settings
            Web browser push configurationarrow
          • Firebase Cloud messagingApple SafariMozilla Services
          Connecting Web Push to a WebsiteTransferring Data to the PlatformWeb Push SDK Methods
            Import of subscriptions from third-party push servicesarrow
          • Migrating push subscriptions from third-party servicesHow to transfer push subscriptions configured for Safari?Migration from OneSignal
      SMS channel
        Creating mailing from scratcharrow
      • EmailSMSWeb PushMobile PushWhatsAppViber*™Руководство: SMS-рассылка через VK NotifyMAX BotMAX GroupNotifyTelegram BotTelegram Group
      Communication Channels WorkflowРуководство: SMS-рассылка через УТШРуководство: push-рассылка через сервис от "Согласие"
      Segmentationarrow
    • Static SegmentsDynamic SegmentsUpdatable Segments
        Segmentation Conditionsarrow
      • Segmentation by Profile dataSegmentation by Interactions with EntitiesSegmentation by Activity of the channelSegmentation by external dataSegmentation by external SQL tablesSegmentation by Profile structure
      Best Send Time (BST)Logical operators "AND" and "OR"Recommendations for working with segments
      Message templatesarrow
      • Working with message templatesarrow
      • Working in the editorEmail-templateSMS templatePush templateMAX templateTelegram templateWhatsApp templateViber™ templateNotify template
        Visual editor for email-templatearrow
      • Visual editor interfaceAdding blocksElements and their settingsCustom blocksStyle managerLayer manager
      Template fragmentsImage galleryContent personalizationCreating tables based on array elementsBlock editor for email template
        Altcraft Variables and Functionsarrow
      • Logical expressions in messagesLoops in messagesMarket variables in templatesUsing the JSONPath functionality
        Dynamic content in messagesarrow
      • Dynamic HTML contentDynamic JSON contentContent from SQL database in templatesDynamic API content
      Importing and exporting a message templateImporting a template from a third-party serviceExporting a template from Pixcraft
      Mailingsarrow
    • Mailings calendarBroadcast mailingsRegular mailingTrigger mailingMultivariate testingMailing testingMailing schedulePlacement mailing
      Campaignsarrow
    • Working with CampaignsLocal control groups (LCG)Stratification Violation ErrorAudience expansionAudience building
      Automation scenariosarrow
    • Managing scenariosNodes of the scenarioClassic marketing scenariosStep-by-step welcome scenario guideScenario for automatic notification of the managerAbandoned cart scenario
      Marketarrow
    • Market settings
        Productsarrow
      • How to create a product manuallyHow to import a product from a fileScheduled product importProduct and SKU SegmentsPreparing the YML file
      OrdersMarket variables in message templateGuide: how to send an order confirmation email
      Loyalty programsarrow
    • Loyalty programsLoyalty integration with external systemsБыстрый стартBasic loyalty program use casesOrder SegmentsPromotion codes
      Reports and analyticsarrow
    • Channel reportTraffic report
        Summary reportarrow
      • Summary report metrics
      Cohorts reportLifetime reportFunnels reportGoals reportAudience growth reportClick map reportLoyalty programs reportBounces reportUndeliveries reportReport on global control groups
      Integrationsarrow
      • Action hooksarrow
      • Altcraft Action HooksAction hooks event typesAction Hook Message StructureJSON batch request (HTTP POST action hook)Message to RabbitMQ brokerMessage to RabbitMQ exchangerMessage to Kafka brokerTest event
        Integration of third-party services using Albatoarrow
      • Connecting Altcraft to Albato Launching the welcome scenario using AlbatoTransmitting event dataSetting app a trigger mailingEvent registrationGoogle Sheets and Altcraft integration AmoCRM and Altcraft integration
      Facebook Ads Manager™Google Ads AudiencesMAXYandex.Audience™VK Ads™Static segment synchronizationYandex AppMetrica™Tilda™Lpgenerator™WhatsAppViber*™ integrationIntegration scopeData Transmitted During SynchronizationNotify
      Weblayersarrow
      • Formsarrow
      • Create a formForm constructorAppearanceActions after form activationData analyticsBinding data channel and formsConditional logic in forms and surveysNPS testing
        Pixelsarrow
      • Goal customer actions and scoring
        Pop-upsarrow
      • Creating and publishing a pop-upSetting up a popup in the code editorManaging pop-ups manually via scriptPopup analyticsGuide: pop-up for push subscriptionsCase: Creating a pop-up with the "Wheel of Fortune" widgetBasic cases of placing a popup via the Tag Manager
        Tag Managerarrow
      • Configuring and installing Tag ManagerTrigger typesVariables typesLinking a pixel and the Tag manager
      Settingsarrow
    • Account settingsCustom linksVirtual sendersSending policiesAudit journalTags FAQ
        Users, groups and accessarrow
      • Two-Factor Authentication (2FA)
        Connectionsarrow
      • Connection to Facebook Ads ManagerConnection to Google AdsConnecting to Yandex.Audience™Connection to 360dialogConnection to EdnaConnection to Devino TelecomConnection to SMSTrafficConnection to VK Ads™Connection to MTS OmniChannelCustom Authentication ConnectionOAuth2 connectionBasic Authentication connectionToken Authentication connectionConnection to RapportoMAX connectionConnection to Notify
      Attribute settings
      API requests: where to startarrow
    • Import or update a profileTrigger mailing launchEngage profile in scenario
      Changelogarrow
    • v2026.1.76v2025.4.75v2025.4.74v2025.3.73v2025.2.72v2025.1.71v2024.4.70v2024.3.69v2024.2.68.2v2024.1.68
    Documentation archivelibrary
  • Campaigns
  • Stratification Violation Error

Stratification Violation Error

A stratification violation error occurs when, due to an imposed limit, the system cannot maintain proportions between strata when forming a local control group (LCG). The warning does not stop the campaign but indicates that the control group may be formed with violated proportions.

The examples below use a database of 100 profiles. This small size is chosen intentionally — it makes it easier to track the logic behind the error. In real projects, databases can be much larger, but the principle of stratification remains the same.

Database fields and their distribution:

FieldValuesDistribution
int_field20 / 8020% / 80%
regionMoscow, SPb, Kazan~34 / ~33 / ~33 profiles
age18–54uniform
Important

The error notification appears only when the limit is reached during LCG selection. During LCG formation, deviations may occur that the system tries to correct using new profiles added to the campaign, but cannot do so because of the imposed limit.

Example 1. Limit too small for the number of strata​

Initial data

ParameterValue
Database100 profiles
Stratificationint_field (20 / 80) and region (Moscow, SPb, Kazan)
Number of strata6
LCG size15% (should be 15 profiles)
LCG limit12 profiles

Stratum distribution in the database

StratumIn databaseShareExpected in LCG (share × limit)
int_field=20 × Moscow66%0.72 → ~1
int_field=20 × SPb77%0.84 → ~1
int_field=20 × Kazan77%0.84 → ~1
int_field=80 × Moscow2828%3.36 → ~3
int_field=80 × SPb2626%3.12 → ~3
int_field=80 × Kazan2626%3.12 → ~3

Problem

Due to the limit of 12 profiles, the expected value for the stratum "20 × Moscow" is 0.72 — less than 1. The system cannot reliably fill such a stratum.

How to fix

  • Increase the limit (e.g., to 35 profiles) — in this case, the LCG size must also be increased proportionally;
  • Remove the limit entirely, leaving only the LCG percentage;
  • Simplify stratification by removing fields with rare values (e.g., leave only int_field without region breakdown).

Example 2. Critical heterogeneity in three‑field stratification​

Initial data

ParameterValue
Database100 profiles
SegmentProfiles under 25 years old — 21 profiles
Stratificationint_field (20 / 80), region (Moscow, SPb, Kazan), age (18-21, 22-25)
Number of strata2 × 3 × 2 = 12
LCG size10%
LCG limit8 profiles

Stratum distribution in the segment and expected values in LCG

CombinationIn segmentShareExpected in LCG
20 × Moscow × 18-2100%0
20 × Moscow × 22-2514.8%0.38 → ~0
20 × SPb × 18-2114.8%0.38 → ~0
20 × SPb × 22-2514.8%0.38 → ~0
20 × Kazan × 18-2100%0
20 × Kazan × 22-2500%0
80 × Moscow × 18-21314.3%1.14 → ~1
80 × Moscow × 22-2529.5%0.76 → ~1
80 × SPb × 18-2129.5%0.76 → ~1
80 × SPb × 22-25523.8%1.90 → ~2
80 × Kazan × 18-2129.5%0.76 → ~1
80 × Kazan × 22-25419.0%1.52 → ~2

Problem

Due to the limit of 8 profiles, the expected value for strata with int_field=20 is 0 or close to 0. Empty strata themselves are not an error — they may reflect the actual state of the database if such profiles simply do not exist. The error occurs because the expected number of profiles in a stratum is too small and cannot be increased even when the campaign audience expands, as the limit restricts it, causing a loss of stratification homogeneity.

How to fix

Remove the limit — then the system will be able to add profiles from new arrivals. Or simplify stratification: remove age or broaden age ranges.

Example 3. Very small limit​

Initial data

ParameterValue
Database100 profiles
Stratificationby int_field (20 / 80)
LCG limit1 profile
LCG size10% (10 profiles available, but limit restricts to 1)

Problem

With a limit of 1 profile, the system cannot maintain proportions of 20% and 80%. In a sample of one profile, only two outcomes are possible: 0%/100% or 100%/0%. The deviation from the ideal proportion is 100%.

How to fix

Remove the limit or increase it to at least 10-20 profiles.

Last updated on Apr 20, 2026
Previous
Local control groups (LCG)
Next
Audience expansion
  • Example 1. Limit too small for the number of strata
  • Example 2. Critical heterogeneity in three‑field stratification
  • Example 3. Very small limit
© 2015 - 2026 Altcraft, LLC. All rights reserved.