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 practices
          First mailingarrow
        • Quick StartEmail
        Email: 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
          First Mobile Push Mailing
          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
          First Web Push Mailing
        SMS channelarrow
      • SMS
      WhatsAppViber*™
        Telegramarrow
      • Telegram BotTelegram Group
        Maxarrow
      • MAX BotMAX Group
      NotifyCommunication Channels WorkflowРуководство: SMS-рассылка через VK NotifyРуководство: 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 formarrow
        • General settingsForm constructorAppearanceActions and form publicationConditional logic in forms and surveys
        Data analyticsBinding data channel and formsNPS 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
  • Segmentation
  • Recommendations for working with segments

Recommendations for working with segments

Segments are a key tool for working with data in a CDP platform. The quality of selections, analytics, and marketing mailing launches depends on how they are configured. However, in practice, there are situations when a segment does not work as expected: it is not recalculated, not updated, or returns unexpected results.

To simplify troubleshooting, this article provides recommendations for working with segments.

Too many "NOT" conditions​

Excessive use of negations, especially the NOT IN SEGMENT operator, complicates logic and reduces performance.

Special attention – the "NOT IN SEGMENT" operator.
It is the most performance‑heavy operator. When used, the system dumps the entire profile database to intersect with the excluded segment. This is very slow.

Example of a problematic construct:

NOT IN (segment A)
AND NOT IN (segment B)
AND NOT IN (segment C)
...

Recommendations:

  • Avoid using "NOT IN SEGMENT" whenever possible. Instead, duplicate the negative conditions from the selected segment. For example, if the segment has a single condition "not in Global Control Group", use a direct condition "is in GCG".

  • Do not use more than 2–3 "NOT" conditions (of any kind) in a row without a good reason.

  • Replace a set of "NOT" conditions with a single positive rule. Instead of listing where an object should not be, describe where it should be.

  • Document segmentation rules: state why each negation is added. This helps avoid situations where one condition becomes irrelevant but the logic remains unnecessarily complex.

  • Use "NOT IN SEGMENT" only when it is really unavoidable (e.g., the excluded segment is dynamically updated by another team).

Using the "NOT" condition with "OR"​

When building a segment, a condition like the following is often set:

NOT (has active contract) OR NOT (verified)

At first glance, it may seem that this condition excludes all customers without a contract and without verification. In practice, it works differently: the segment will include all customers except those who simultaneously have both an active contract and verification completed.

This means that the condition excludes only those for whom both conditions are true at the same time, and not everyone who has at least one of them.

Recommendations:

  • Avoid long expressions that alternate NOT and OR.

  • If you need to select only customers who have neither a contract nor verification, use:

NOT (has active contract) AND NOT (verified)

Indexes and segment performance​

Indexes are internal database structures that speed up searching for profiles by field values. Without an index, the system has to iterate through all customers — the segment builds slowly, especially on large databases.

Some indexes are created automatically when the platform starts. These are system indexes necessary for platform operation. You cannot manage them, and their set may differ between installations. Queries on such fields are usually fast, but you shouldn’t rely on this for any field.

Recommendations

Analyze which segments you build most often and which fields you use in them. Pass this list to your administrator. The administrator will check which indexes already exist and, if necessary, create additional ones within the limits.

caution

No more than 64 indexes can be created per account. For more details on database indexes, see the administrator documentation.

Storing lists of values​

If you need to select profiles by a specific value from a list (e.g., interests, categories, tags), it is better to store such lists in a “tags” field type rather than in a string.

For example, the interests field contains tennis, football, chess. If you need to select everyone interested in tennis, the segmentation process will take longer when stored in a string than when stored in a “tags” field.

Date range​

If a segment condition uses a date (registration date, order date, goal reached, email opened, etc.), the recalculation will be faster when the date range is limited. The fewer dates need checking, the less time segmentation takes.

Recommendations:

  • Specify a concrete period whenever possible. Instead of “goal reached”, use “goal reached in the last 7 days”.

  • Instead of checking events for all time, use profile attributes that don’t require scanning history (e.g., “last order date” instead of “had at least one order”).

  • For recurring segments, use relative dates (“last N days”), but don’t make N too large — usually 30–90 days are enough.

Last updated on May 6, 2026
Previous
Logical operators "AND" and "OR"
Next
Message templates
  • Too many "NOT" conditions
  • Using the "NOT" condition with "OR"
  • Indexes and segment performance
  • Storing lists of values
  • Date range
© 2015 - 2026 Altcraft, LLC. All rights reserved.