Segmentation by Interactions with Entities
This section contains rules for segmenting profiles based on their interactions with various functional entities of the Altcraft platform, such as automation scenarios, forms, popups, segments, and loyalty programs.
Scenarios
Segmentation by participation in automation scenarios. Allows selecting profiles that are in a scenario, have completed it, or exited with an error.
Available operators:
- was at least once — the profile has ever participated in the selected scenario.
- never was — the profile has never participated in the selected scenario.
- currently in scenario — the profile is currently active in the scenario.
- currently not in scenario — the profile is currently not active in the scenario.
- completed scenario — the profile successfully completed the scenario.
- exited with error — the profile exited the scenario due to an error.

Segments
Selection of profiles based on their participation in other segments (dynamic or static). Allows creating complex multi-level selections.
Participation in a Dynamic Segment
The rule checks whether a profile is included in the calculation result of another dynamic segment.
Available operators:
- in segment — the profile is included in the selected dynamic segment.
- not in segment — the profile is not included in the selected dynamic segment.

Try to avoid the Not in segment operator for large selections, as such a rule consumes significant system resources for comparing data arrays.
The dynamic segment for selection must be configured for the same database as the current segment.
Participation in a Static Segment
The rule checks whether a profile is in a static segment (control group) or has ever been in it.
Available operators:
- currently in segment — the profile is currently in the static segment.
- entered at least once — the profile has ever been in this segment.
- never entered — the profile has never been in this segment.
- currently not, but entered at least once — the profile is currently not in the segment but was in it previously.
- not in segment — the profile is currently not included in the segment.
- entered at least [n] times in the last [x] days — the profile entered the segment the specified number of times in the last X days.
- entered at least [n] times in period — the profile entered the segment the specified number of times in the selected period.
- not entered even once in the last [x] days — the profile has not entered the segment in the last X days.
- not entered even once in period — the profile has not entered the segment in the selected period.

Popup Behavior
Segmentation based on user interaction with popups on your website.
Available events for selection:
- Popup Opened — the popup was shown to the user.
- Popup Filled — the form in the popup was successfully filled and submitted.
- Popup Closed — the user closed the popup (click on the "Close" button).
- Popup Click — click on any element of the popup, except the close button.
- Popup Target — the conditions for showing the popup were met (even if it wasn't shown due to limits).
- Click on element in popup — click on a specific HTML element with a given
nameattribute. - Popup custom event — an event configured via JavaScript code.

Available selection conditions:
- Exists — the event was registered at least once.
- Does not exist — the event was never registered.
- At least [n] times in period — the event occurred at least N times during the specified period.
- Not once in period — the event did not occur during the specified period.
- Was at least [n] times in the last [x] days — the event occurred at least N times in the last X days.
- Not once in the last [x] days — the event did not occur in the last X days.

Loyalty
Promo Code
Segmentation by participation in loyalty programs via promo codes.
Available operators:
- Assigned / Not assigned — selection of subscribers to whom a promo code was assigned by the loyalty program (manually or automatically).
- Activated / Not activated — selection based on the fact of promo code activation (e.g., upon purchase).

Forms
Segmentation based on interaction with forms placed on the website.
Available selection conditions:
- filled — the subscriber has ever filled out the specified form.
- did not fill — the subscriber has never filled out the specified form.
- filled in selected period — the subscriber filled out the form during the specified dates.
- did not fill in selected period — the subscriber did not fill out the form during the specified dates.
- filled in the last [x] days relative to current date — dynamic selection for the last X days.

Orders
Segmentation based on orders registered in the "Market" module. Allows building selections by amount, quantity, products, and other order parameters.
Available main conditions:
- Exists N orders satisfying all conditions
- No N orders satisfying all conditions
- Total cost of orders satisfying all conditions equals N
- Total cost of orders satisfying all conditions does not equal N

Conditions for Grouping Orders
Within the rule, additional conditions can be set to select specific orders:

Sales Channel
Groups orders made in one sales channel. Multiple contact points can be specified.

Statuses
Selects orders with the specified statuses: new, delivered, paid, canceled, partial return.

Regions
Selects orders made in specific regions.

Products/SKU by Categories
Selects orders containing products from specific categories.

Product Quantity
Selects orders with a specific quantity of products. Available calculation methods:
- in any of the items — any order item has the specified quantity.
- summed across items — all order items together have the specified quantity.
- in each of the items — each order item has the specified quantity.
- different products in order — number of items in the order (1 product = 1 item).

Order Creation Date
Selects orders registered during the specified time period.

By Order Amount
Selects orders with a specific cost. Calculation currency can be specified.

Goal/Pixel Behavior
Goal Achieved
Segmentation based on subscriber actions on external resources (websites, apps) tracked using Altcraft pixels.
Available operators:
- Exists / Does not exist — checks for the presence or absence of goal achievements.
- Total cost — calculates the sum of the cost of achieved goals. Operators: greater than / less than / equals. Can be specified for all time, for a period, or for the last [x] days.

- Average cost — calculates the arithmetic mean of the cost of achieved goals. Operators: greater than / less than / equals. Can be specified for all time, for a period, or for the last [x] days.

- At least [n] times / Not once — selection based on the number and frequency of actions performed. Can specify goal, pixel, or referrer (traffic source).

- Meets / Does not meet complex condition — extended selection based on additional data passed when registering a goal via API.
Rules can be configured for selection by:
- Goal value (cost)
- Data from the
pixel_dataobject (string, numeric, date, boolean) - Profile device and geo-data (browser, OS, country, city, etc.)
- Sent messages and promo codes
- UTM labels
- URL Referer and Origin
- Profile order data
![]()
Campaigns
Segmentation by participation in a campaign.
- currently in campaign — the profile is currently in the global control group.
- not in campaign — the profile is currently not in the campaign.
- entered at least once — the profile has ever been in the campaign.
- never entered — the profile has never been in the campaign.
- currently not, but entered at least once — the profile is currently not in the campaign but was previously.
- entered at least [n] times in the last [x] days — the profile entered the campaign the specified number of times in the last X days.
- entered at least [n] times in period — the profile entered the campaign the specified number of times in the selected period.
- not entered even once in the last [x] days — the profile has not entered the campaign in the last X days.
- not entered even once in period — the profile has not entered the campaign in the selected period.

Control Group / Test Group
Segmentation by participation in test or local control groups.
Available operators:
- currently in LCG — the profile is currently in the local control group.
- not in LCG — the profile is currently not in the LCG.
- entered at least once — the profile has ever been in the LCG.
- never entered — the profile has never been in the LCG.
- currently not, but entered at least once — the profile is currently not in the LCG but was previously.
- entered at least [n] times in the last [x] days — the profile entered the LCG the specified number of times in the last X days.
- entered at least [n] times in period — the profile entered the LCG the specified number of times in the selected period.
- not entered even once in the last [x] days — the profile has not entered the LCG in the last X days.
- not entered even once in period — the profile has not entered the LCG in the selected period.
