Getting Started

Welcome to the Customer Segmentation Suite documentation.

Customers segmentation is one of the main principles of marketing. It allows us to make communication with customers more efficient. Properly used, it also can dramatically decrease the financial resources for marketing.

Our extension allows you to automatically split customers into segments according to the rules and then utilize these segments in your analysis and even in other extensions.

Go ahead, dive in!

Firstly, please, find our extension in My Downloadable Products section of our store. Learn how to install extension, and proceed with Quick Start, which will guide you to set up your Customer Segment service.

How to install the extension

  1. Backup your store database and web directory.
  2. Login to SSH console on your server and navigate to the root directory of the Magento 2 store.
  3. Copy installation instructions from the page My Downloadable Products to SSH console and press ENTER.
  4. Run command below to enable extension:
    php -f bin/magento module:enable Mirasvit_Core Mirasvit_Report Mirasvit_CsNewsletter Mirasvit_CustomerSegment
    php -f bin/magento setup:upgrade
  5. Clean the cache
    php -f bin/magento cache:clean
  6. Deploy static view files

    rm -rf pub/static/*     
    rm -rf var/view_preprocessed/*  
    php -f bin/magento setup:static-content:deploy

Quick Start

Our Customer Segmentation Suite is a small yet powerful extension, which comes with features that work straight out of the box.

However, there's more to dive into its possibilities in marketing analysis.

  1. Start from creating simple Segments and begin the process of analyzing your store's audience.

  2. Use our Reports to track and analyze, how customers behave in each segment and plan to dissect them to smaller segments. We have a very rich conditions set in Segmenting Rules.

  3. Think about a flexible discount program for customers from selected segments. This is where our built-in Cart Price Rule Integration will help you.

  4. If your services' and products' assortment became diverse, you could think about expanding your discount program even more. Our Reward Points extension can be in handy, and you can seamlessly integrate it with Customer Segmentation Suite.

  5. If your customer audience is on the grow, think about building a community. Try our Mirasvit Gift Registry extension, and integrate it with Customer Segmentation suite.

  6. Growing community will require more personalized email flow. Our extension Follow-Up Email can help you, and it also can integrate it with Customer Segments.

  7. Advanced Reports will help you to analyze both your services' efficiency and growing community. Customer Segments also will be integrated there.

This should be a good beginning.

Refer to appropriate sections of our manual to have more info.

Segmenting Customers

Customer segmentation is the practice of dividing a store's customers into groups based on similarities among them. The goal of segmenting customers is to decide which strategy apply to customers in-large, and provide customers with maximum available services.

Segmentation has the potential to allow you to work with customers most effectively. The more data on customers gathered and the conditions for segmentation diverse, the more precise the segmentation and accuracy of marketing analysis will be, which allows you to plan your marketing strategy with maximum efficiency.

All Segments, defined in our extension, are located at their respective grid Customers -> Customers Segment -> Segments. You can create, view, and even delete unnecessary segments (using mass Delete action).

Segments can be refreshed both by cron and manually. For more information refer to segment refreshing subsection.

How to define Customer Segment

Go to Customers -> Customers Segment -> Segments, and press Add New Segment button. You will be directed to complex segment creation page, which divides into five separate tabs:

  • General Information - contains general parameters of segment
  • Rules - contains conditions, which customers should apply to.
  • Actions - defines actions, which will be performed, when customer applies to segment.
  • Matched Customers - contains grid of customers, which are fit to conditions, defined in Rules tab.
  • History - contains history of actions, performed on current segment.

General Information

This subsection contains the most basic parameters of the customer segment:

  • Segment Title - the sensical name of segment, for example Male Customers or Female Customers.
  • Description - the description of this segment, its purpose and overview, etc.
  • Website - the website, where this segment should apply.
  • Status - defines whether this segment is active and should be refreshed.
  • Apply to - defines a customer macro scope, which shall apply to this segment. It allows you to flexibly position your segment and make the analysis more accurate. There are three possible values:
    • Registered and Guest Customers - default scope, which includes all customers on a given website.
    • Registered Customers - apply to this segment only registered customers.
    • Guest Customers - apply to this segment only guest customers.

Rules

This is the most important part of Segment definition. Here conditions are defined, which decide whether a customer is eligible for the current segment.

They have four possible global modes of applying, shown in special header If *[apply mode]* of these conditions are *[validation mode]*:

Applying modes define, when rule shall be triggered:

  • ALL - implies, that rule will be executed only when strictly all conditions were met;
  • ANY - implies, that rule will be executed only when one or more (but not all) of conditions were met;

Validation modes define, which result can produce each condition to be counted as "met":

  • TRUE - implies. that conditions should be valid.
  • FALSE - implies, that conditions should be invalid.

You can also define multiple nested mode blocks by selecting Conditions Combination option. These modes allow creating flexible condition sets to satisfy a policy of any complexity.

Once you had selected global mode (or left it as default), press the green (+) button, and pick up a condition type. There are many possible options, combined into the following categories:

  • Customer Address

    This option opens a special mode block with a header of type If Customer [Address Type] Address match [Applying Mode] of these Conditions:. Applying mode is the same as described above. Address types are:

    • Billing - default billing address of the customer. Applies only to registered customer.
    • Shipping - default shipping address of the customer. Applies only to registered customer.
    • Any - any of addresses, registered by current customer.

    Address options, available for checking, are the same as address defines, including VAT number and its validation status and date.

  • Customer

    Contains all properties of standard registered customer. However, there's also some unique of them are:

    • Is Confirmed - allows filtering customers, which have confirmed/declined their account.
    • Create In - allows to check, on which store customer was actually created. It is extremely useful for multi-stores.
    • First Failure Date - allows to check, when a customer for the first time made failed login attempt.
    • Failures Number - allows to check, how many failed login attempts customers have.
  • Sales

    Allows checking customer's shopping details. This section is useful for creating threshold segments (e. q. with sales over $1000, etc.). Includes the following:

    • Last Order Date - checks date of last order, placed by the current customer.
    • Order Address - checks address of the last-placed order.
    • Sales Amount - lifetime total of all orders placed by the customer.
    • Number of Orders - lifetime number of all orders placed by the customer.
    • Purchased Quantity - totals lifetime quantity of all products bought by the customer.
  • Shopping Cart

    Allows analyzing the last shopping cart of the customer (or last created, but unfinished to order). Contains the following:

    • Shopping Cart Total - the total amount of last cart contents.
    • Shopping Cart Products Qty - the number of products in the last cart contents.
  • Products

    It allows analyzing customer's interests in shopping. Contains the following options:

    • Products List - analyzes last shopping, and opens block of type If Product is [Existence Mode] in the [Product List] with [Applying Mode] of these Conditions match:.
      • Existence Mode - defines whether the product was Found or Not Found in the list.
      • Product List - defines where to search for the product - in the Shopping Cart or Wishlist (the last one applies only to a registered customer). If Mirasvit Gift Registry is installed, you can also use Gift Registries as a product list. Read more on this at Integrations section.
      • Applying Mode is described as above.
    • Products History - analyzes all shoppings, and opens block of type If Product [Action Mode] [Action] and matches [Applying Mode] of these Conditions:.
      • Action Mode - defines, whether product Was or Was Not involved in actions.
      • Action - defines, whether product was Ordered or just Viewed.
      • Applying Mode is described as above.
    • Ordered Item History - same as Products History, except it validates the data of the purchased items. It can be useful if you want to validate SKU values of the products that were already removed from your store or whose SKUs have already been changed over time.
      • Action Mode - defines, whether product Was or Was Not involved in actions.
      • Action - for now only Ordered option is available.
      • Applying Mode is described as above.

    Example

    FIXME: Add examples

    Note

    If you cannot find a product attribute in the list of available conditions, make sure this attribute is allowed for use with the promo rule conditions. On the Admin sidebar, tap Stores, then under Attributes, choose Product. Open required attribute, on the tab Storefront Properties find the setting Use for Promo Rule Conditions, choose Yes if you want to use this attribute as the condition for customer segment rules.

Useful Info

You can now validate customers over the segment's conditions.
For this, enter customer IDs separated by a comma into the input above the conditions block and press the Validate button.

Actions

This subsection contains possible actions, that can be performed on the customer when he applies to the segment for the first time:

  • Move to Group - allows moving a customer to the proper group automatically. You can see available groups at Customers -> Customer Groups.
  • Priority - allows you to automatically resolve issues when a customer simultaneously eligible to multiple segments. In this case, the customer will be applied to the segment with a lesser value of priority.
  • Refresh mode - allows you to choose, how current segment will be refreshed. Automatic and Manual options are available. For more information refer to segment refreshing subsection.

Matched Customers

This subsection contains a customers' grid, where are gathered only those eligible to the current segment. You can use the following mass actions there:

  • Export - allows you to export a list of customers either to CSV or to OOXML (ExcelXML) format.
  • Exclude - allows you to exclude customers from this segment manually.

    Note

    If you use manual exclusion, you also shall set Refresh Mode parameter to Manual, otherwise excluded customers will be added again on the next refresh - if they meet conditions.
  • Delete - allows you to remove customers. Do not use this action unless you really need to - since it actually will remove customers from store.

History

This subsection contains all actions that were performed on the current segment. It is extremely useful for checking how segmenting actually performs.

History contains the following columns:

  • Created At - time of action actual execution.
  • Action - name of action. Here is the list of available actions:
    • Segment Refresh Started - marks start of refreshment procedure.
    • Segment Refresh Finished - marks the end of refreshment procedure.
    • Add Customer - adding customers to the current segment.
    • Remove Customer - removing customers from the current segment.
    • Customer Group Change - moving customers from/to the specific group, set in Move to Group option.
    • Segment Refresh Iteration Started - marks start of AJAX Rule execution.
    • Segment Refresh Iteration Finished - marks the end of AJAX Rule execution.
  • Affected rows - how many customers from Matched Customers were involved in the action.
  • Type - whether this action was done by automatic cron task, or manually.

Refreshing Customer Segments

Customers are scanned and added to segments during refreshment procedure. Normally it is performed by a special cron task.

But if you had set Refresh Mode to Manual option, this segment will be skipped by that task. In this case, you need to manually open the respective segment and press the Refresh Segment Data button, available from the top button ribbon.

Manual refreshing also can be used for segmentation testing.

Note

Customer Segment extension defines two separate crontasks:

  • segment_refresh_data - refreshes all segments with automatic refreshing, runs at 02:00 by default.
  • segment_history_clear - clears segments' histories, runs at 03:00 by default.

    They can be adjusted by editing this file (purge ALL cache and restart cron to apply changes): /vendor/mirasvit/module-customer-segment/src/CustomerSegment/etc/crontab.xml

Integrating Segments

Our extension allows different kinds of integration of customer segments to Magento services and other Mirasvit extensions, which turn Customer Segmentation Suite into a powerful tool of automatic store's policy management.

For now integrations include:

  • Magento Newsletter - allows you to send newsletter emails only to customers belonging to specific segments.
  • Cart Price Rules - allows you to provide customers with discounts, using conditions based on their segment.
  • Follow Up Email - allows you to send special emails to customers, depending on their segment.
  • Reward Points - allows you to flexibly vary earning or spending policy for customers, which belongs to a certain segment.
  • Gift Registry - allows you to segment customers, depending on products in their Gift Registries.
  • Advanced Reports - allows you to generate reports with additional filter, based on customer segments.
  • Indirect Integrations - allows you to integrate Customer Segment with other extensions, which have Workflow Rules.

Each of these integration options contains a lot of hidden possibilities, which will help you to build the most flexible service for your customers.

And, of course, there can be more then extension-to-extension integration. You can also build combinations of three or even four extensions, boosting your service to the top.

Integration with Magento Newsletter

This is a useful integration that allows you to filter target newsletter recipients by segments they belong to.
You can now use all the power of the segment's rules to partition your audience more precisely.

Segment filter block, available on Newsletter Queue, creates and edit pages.

**Subscribers From Segments**

Integration with Cart Rules

This is the most simple integration, which comes out-of-box, and does not require installation of any other Mirasvit products.

Cart Price Rules are default Magento feature, which allows providing customers with discounts when their cart contents meet certain conditions. These rules can be created at Marketing -> Promotions -> Cart Price Rules.

Each rule has Condition section, which defines conditions, on which discount should be provided. Customer Segmentation Suite adds to default conditions set Customer Segment option, which allows triggering Cart Rule only when customer belongs to the particular segment, which makes Cart Price Rule much more flexible and powerful tool.

Consider these examples, which will demonstrate the potential of this integration feature.

  • Provide all Male customers with 20% discount, if they bought Shorts

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: Male Customers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: Customer Gender is Male
    • Actions
      • Refresh Mode: Automatic

    Create a new Cart Price Rule at Marketing -> Promotions -> Cart Price Rules, and set the following options:

    • Conditions
      • Customer Segment is one of Male Customers
      • Product Attribute Combination: Category is 19(e. q. Shorts)
    • Actions
      • Apply: Percent of product price discount
      • Discount Amount: 20
  • When a customer reaches total sales of $2000, automatically make him VIP, and provide $100 discount for each order

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: VIP Customers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: Total Sales Amount equals or greater than 2000 while ALL of these Conditions match (this block is actually Sales -> Sales Amount condition)
        • Order Status is one of Complete
    • Actions
      • Move to Group: VIP (Group should be created at Customer -> Customer Groups before)
      • Refresh Mode: Automatic

    Note: this segment will automatically move to VIP group all customers when they reach real $2000 sales (only Completed orders will count).

    Create a new Cart Price Rule at Marketing -> Promotions -> Cart Price Rules, and set the following options:

    • Conditions
      • Customer Segment is one of VIP Customers
      • Subtotal equals or greater than 100
    • Actions
      • Apply: Fixed amount discount
      • Discount Amount: 100

    Note: since we provide a fixed discount amount, we added an additional Subtotal check to ensure that the discount will be properly applied.

  • If a customer had placed his last order more than 30 days ago, provide him one-time Return Discount of 10%

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: Departed Customers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: Last Order placed equals or greater than 30 days ago while ALL of these Conditions match: (this block is actually Sales -> Last Order Date condition)
        • Order Status is one of Complete
    • Actions
      • Refresh Mode: Automatic

    Note: A customer, which was absent for 30 or more days, will be automatically placed to this segment and removed - once he will place a new order after the return.

    Create a new Cart Price Rule at Marketing -> Promotions -> Cart Price Rules, and set the following options:

    • Conditions
      • Customer Segment is one of Departed Customers
    • Actions
      • Apply: Percent of product price discount
      • Discount Amount: 10

    Note: Since a customer will be removed from Departed Customers, once he will place a new order, this discount will be one-time.

Integration with Follow Up Email

Follow-Up Email allows you to send customers emails on certain events - such as log-in, birthday, abandoned cart expiration, and so on. For each event, the extension allows you to create so-called Triggers, which are defined emails, which should be sent.

There can be more than one Trigger per event since each email has an Audience - group of customers eligible to receive these emails. Therefore, each group can receive its own type of emails.

Customer Segmentation Suite, integrated with Follow-Up, allows you to target your emails more precisely, creating very flexible emails flow, which will automatically adjust in time - since CS can automatically move customers from group to group.

Consider these examples, which will demonstrate the potential of this integration feature.

  • Send all Girls a special email on their Birthday

    Create a Customer Group Girls at Customer -> Customer Groups.

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: Girls Segment
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions:
        • Customer Gender is Female
        • Customer Date of Birth equals or less than 2000-01-01 (select all females under 18 years old)
    • Actions
      • Move to Group: Girls
      • Refresh Mode: Automatic

    Create a new Trigger at Marketing -> Follow-Up Email -> Manage Triggers, with following parameters:

    • General Information
      • Trigger Event: Customer / Birthday
    • Audience
      • Customer: Group is one of Girls

    Then just add a proper template to be sent.

  • On each order completed, send customers special promotions if they have in their wishlist recommended products

    Create at Stores -> Attributes -> Product attribute Recommended with the following properties:

    • Default Label: Recommended
    • Catalog Input Type for Store Owner: Yes/No
    • Values Required: No
    • Default Value: No

    Pick up products in Catalog -> Products, and set Recommended attribute, which will appear on Edit Page.

    Create a Customer Group Recommendation Target at Customer -> Customer Groups.

    Create a new segment at Customers -> Customer Segment -> Segments, with the following properties:

    • General Information
      • Name: Wishes our Recommended
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: If Product is Found in the Wishlist* with ALL of these Conditions match: (this block is selected as Products -> Product List)
        • Product: Recommended is Yes
    • Actions
      • Move to Group: Recommendation Target
      • Refresh Mode: Automatic

    Create a new Trigger at Marketing -> Follow-Up Email -> Manage Triggers, with following parameters:

    • General Information
      • Trigger Event: Sales / Order obtained Complete status
    • Audience
      • Customer: Group is one of Recommendation Target

    Then just add a proper template to be sent.

Integration with Reward Points

Reward Points extension allows customers to earn points, which later can be used as internal store currency or dynamic discount.

It already contains a very flexible set of conditions. Still, Customer Segmentation Suite brings even more flexibility, and create rewards policy according to your marketing analysis with new condition Customer Segment for Cart Earning Rules and Spending Rules.

Consider these examples, which will demonstrate the potential of this integration feature.

  • Whenever a Female buys Top, she receives additionally 20 Rewards Points

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: Female
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions:
        • Customer Gender is Female
    • Actions
      • Refresh Mode: Automatic

    Create a new Earning Rule of Cart type, with the following properties:

    • Conditions
      • Customer Segment is one of Female
      • If an item is FOUND in the cart with ALL of these conditions true:
        • Category is 21 (e. q. Tops)
    • Actions
      • Customer Earning Style: Give X points to customer
      • Number of Points: 20
  • Whenever a customer buys a particular item from his wishlist, he receives additionally 100 Reward Points

    Create a new segment at Customers -> Customer Segment -> Segments, with the following properties:

    • General Information
      • Name: Wishes our Recommended
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: If Product is Found in the Wishlist* with ALL of these Conditions match: (this block is selected as Products -> Product List)
        • Product: SKU is one of 24-MB01, 24-MB04, 24-MB03 (technically, can be any product list)
    • Actions
      • Refresh Mode: Automatic

    Create a new Earning Rule of Cart type, with the following properties:

    • Conditions
      • Customer Segment is one of Wishes our Recommended
      • If an item is FOUND in the cart with ALL of these conditions true:
        • SKU is one of 24-MB01, 24-MB04, 24-MB03 (should match Segment definition)
    • Actions
      • Customer Earning Style: Give X points to customer
      • Number of Points: 100
  • If customers are from other countries, encourage them with 10% of cashback to Reward Points balance

    Consider our store is located in Ukraine, but we wish to attract to our store clients from abroad.

    Create a new segment at Customers -> Customer Segment -> Segments, with the following properties:

    • General Information
      • Name: Foreign Customers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: If Customer Shipping* Address match ALL of these Conditions: (this block selected as Customer Address)
        • Address: Country is not Ukraine
    • Actions
      • Refresh Mode: Automatic

    Create a new Earning Rule of Cart type, with the following properties:

    • Conditions
      • Customer Segment is one of Foreign Customers
    • Actions
      • Customer Earning Style: Give X points for every spent Y
      • Number of Points: 1
      • Step: 10

    Note: If you wish Ukrainian customers also to receive points, you will need to create a separate Earning Rule for them, with condition Customer Segment is not one of Foreign Customers.

  • If a customer has reached sales amount threshold of $2000, double cost of his points

    Create a new segment at Customers -> Customer Segment -> Segments, with the following properties:

    • General Information
      • Name: Rich Customers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions: Total Sales Amount equals or greater than 2000 while ALL of these Conditions match: (this block is selected as Sales -> Sales Amount)
        • Order Status is one of Complete
    • Actions
      • Refresh Mode: Automatic

    Let main Spending Rule utilize rate $1 for 1 Reward Points, then your additional Spending rule should look like:

    • Conditions
      • Customer Segment is one of Rich Customers
    • Actions:
      • Customer Earning Style: Give X points for every spent Y
      • Points spending style: Fixed
      • For each spent X points: 1
      • Customer receive Y discount: 2

    Note: In your main Spending Rule, also condition Customer Segment is not one of Rich Customers should be placed in order to resolve conflicts.

  • Restrict customer from some services to spend their points

    Assume that for some reason, we need to restrict customers from Amazon, and do not allow them to earn or spend points.

    Create a new segment at Customers -> Customer Segment -> Segments, with the following properties:

    • General Information
      • Name: Amazon Customers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions:
        • Customer Email contains amazon.com
    • Actions
      • Refresh Mode: Automatic

    Create a new Earning Rule of Cart type, with the following properties:

    • Conditions
      • Customer Segment is not one of Amazon Customers
    • Actions: Can be any combination

    Create a new Spending Rule, with the following properties:

    • Conditions
      • Customer Segment is not one of Amazon Customers
    • Actions: Can be any combination

Integration with Gift Registry

Gift Registry allows your customers to buy gifts for other customers, building this way a community around your store.

Customer Segmentation Suite can use Gift Registries, where customers had opted to receive certain products, as an additional condition for segments.

If Gift Registry extension is installed, there will be additional option in [Product List] placeholder in block If Product is Found in the [Product List] with ALL of these Conditions match (it is selected as Product -> Product List condition) - Mirasvit Gift Registry.

This option allows you to automatically check the customer's gift registry and group customers on their wishes. Analysis of growth or shrinking of that group will allow you to plan your marketing policy and introducing of new goods.

Consider these examples, which will demonstrate the potential of this integration feature.

  • Track women, who wish to receive a T-Shirt as gift

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: Female T-Shirt Lovers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions:
        • Customer Gender is Female
        • If Product is Found in the Mirasvit Gift Registry* with ALL of these Conditions match
          • Product: Category is 26 (e. q. T-Shirts)
    • Actions
      • Refresh Mode: Automatic
  • Track customers, that are interested in your new arrivals

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: New Goods Interest
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions:
        • If Product is Found in the Mirasvit Gift Registry* with ANY of these Conditions match
          • Product: New is Yes
          • Product: Category is 38 (e. q. What's New)
    • Actions
      • Refresh Mode: Automatic
  • Track customers, that are more likely to download goods in last month

    Create a new Segment at Customers -> Customer Segment, and set the following options:

    • General Information
      • Name: Leechers
      • Apply To: Registered Customers
    • Rules
      • Segment customers based on the following conditions:
        • If Product is Found in the Mirasvit Gift Registry* with ANY of these Conditions match
          • Product: Format is Download
          • Date Range is within 01/1/2018...01/31/2018
    • Actions
      • Refresh Mode: Automatic

Note

Segments, created from Mirasvit Gift Registries analysis, can be used in triple integrations.

For example:

  • Customer Segment:Gift Registry:Reward Points integration allows you to flexibly reward customers depending on their wishes.
  • Customer Segment:Gift Registry:Follow-Up integration allows you to send customers new promotions, based on their interests.

Integration with Advanced Reports

Integration with Advanced Reports includes a new type of statistical graph - Sales by Segment. It analyses sales (counts only completed orders - e. q. invoiced and shipped), and distributes them between defined segments.

Statistics consists of the following markings:

  • Number of customers per segment - displayed both in absolute and percent values.
  • Number of orders per segment - displayed quantity of orders, placed customers in corresponding segments.
  • Totals of orders per segments - displayed totals elements, such as discounts, distributed between orders, refunds and shipping fees.

These markings are simple but allows you to quickly and effectively visualize, how you can adjust your marketing policy, and track growth or shrinking of different segments of your market.

Indirect Integrations

Customer Segmentation Suite also allows indirect integration. It revolves around the ability of this extension to automatically move customers to specific Customer Group on assigning to the corresponding segment.

This way, Customer Segment can be integrated even with third-party extensions, which features Customer Group-dependent actions and services.

To integrate CS indirectly, just create a Customer Group, and a segment, which corresponds with it. Set in this segment Move to Group option at Actions subsection, and then use that Group in target extension.

Managing Reports

Customer Segmentation Suite comes with one basic Report, available at Customers -> Customer Segment -> Reports.

It provides a customer with a basic chart (both linear and square) with sales per segment. It features the following parameters, located at Top Ribbon:

  • Date Period - allows you to generate charts for the most popular periods, like Today, This Week, This Month, and so on.

    Note

    Date widget also provides the possibility of comparison graphs - by overlaying data from different selected periods.

    To generate such comparison chart, you need to check Compare To checkbox at the date selection dialog and select a comparing period.
  • Graph type - is a switcher button, which switches chart from square box visualization to linear graph. While a square box is useful for the growth/shrinking segment track, linear is good for detecting trends.

Under the chart, you can also find a small statistical table, which displays the most important data in segmentation analysis:

  • Segment - sensical name of segment.
  • Number of customers - the number of customers assigned to a particular segment (displayed both in percent and absolute value).
  • Number of orders - the number of orders, placed by customers, belonged to a particular segment (also displayed both in percent and absolute value).
  • Total Qty Ordered - number of products bought with orders, shown in Number of Orders column.
  • Discount Amount - the amount of discount, provided in orders, shown in Number of Orders column. Useful for tracking rewarding and discounting programs' efficiency.
  • Shipping Amount - the amount of shipping fees, paid in orders, shown in Number of Orders column. Useful in an analysis of shipping methods.
  • Tax Amount - the amount of tax, paid in orders, shown in Number of Orders column.
  • Total Refunded - refund amount for particular segment, provided for orders, shown in Number of Orders column.
  • Subtotal - subtotals in orders, shown in Number of Orders column.
  • Grand Total - actually paid money amount in orders, shown in Number of Orders column.

All these columns are also available as filters, which can be accessed with the Filters button and can be used for building flexible reports.

Data currently displayed in this statistics table also can be exported to both CSV and Excel OOXML formats. For that, you need to use the Export button, located near the Filters button.

General Settings

Go to Stores > Configuration > Mirasvit > Customer Segment. You will see the following email settings:

Export Settings

  • Is Active - Enable automatic export of the segment's customers to CSV file after segment data refresh. The export path is var/export/.

Command Line Interface

Usage: php -f bin/magento [options]

  • Display all segments:

     mirasvit:customer-segment:info
  • Refresh segment data with specified id, v - to show progress:

    mirasvit:customer-segment:refresh <id> -v
  • Export all customers for specified segment id to .csv file:
    mirasvit:customer-segment:export <id> <file>

Troubleshooting

  • Product attribute is not visible under the Products conditions

    If you cannot find some product's attribute in the list of available conditions, make sure this attribute is allowed for use with the promo rule conditions.
    On the Admin sidebar, tap Stores, then under Attributes, choose Product. Open required attribute, on the tab Storefront Properties find the setting Use for Promo Rule Conditions, choose Yes if you want to use this attribute as the condition for customer segment rules.

How to upgrade the extension

To upgrade the extension, follow these steps:

  1. Backup your store's database and web directory.
  2. Login to the SSH console of your server and navigate to the root directory of the Magento 2 store.
  3. Run command to update current extension with all dependencies:

    composer require mirasvit/module-customer-segment:* --update-with-dependencies

    Note

    In some cases, the command above is not applicable, or it's not possible to update just the current module, or you need to upgrade all Mirasvit modules in a bundle. In this case, the command above will have no effect.

    Run instead composer update mirasvit/* command. It will update all Mirasvit modules installed in your store.

  4. Install updates:

    php -f bin/magento setup:upgrade
  5. Clean the cache:

    php -f bin/magento cache:clean
  6. Deploy static view files
    rm -rf pub/static/*     
    rm -rf var/view_preprocessed/*  
    php -f bin/magento setup:static-content:deploy

Disabling Extension

Temporarily Disable

To temporarily disable the extension please follow these steps:

  1. Login to the SSH console on your server and navigate to the root directory of the Magento 2 store.
  2. Disable extension:

    php -f bin/magento module:disable Mirasvit_CsNewsletter Mirasvit_CustomerSegment
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Extension Removal

To uninstall the extension, please follow these steps:

  1. Login to the SSH console on your server and navigate to the root directory of the Magento 2 store.
  2. Remove the extension:
    composer remove mirasvit/module-customer-segment
  3. Log in to the Magento backend and refresh the store cache (if enabled).

Change Log

1.2.9

(2023-08-28)

Fixed

  • Fixed the issue with displaying segments info in the Segments grid

1.2.8

(2023-08-08)

Fixed

  • Fixed the issue with refreshing segments (Column 'item_id' in where clause is ambiguous)

1.2.7

(2023-03-22)

Fixed

  • Fixed the issue with error 'Invalid parameter number: number of bound variables does not match number of tokens' on the Edit Queue (Newsletter Queue) page'

1.2.6

(2023-02-23)

Improvements

  • Added support of Magento 2.4.6

Fixed

  • Fixed the issue with address data not loaded for Matched Guests

1.2.5

(2022-12-08)

Fixed

  • Fixed the issue with the error 'Deprecated Functionality: Implicit conversion from float to int loses precision' (PHP8.1)

1.2.4

(2022-09-07)

Fixed

  • Composer requirements

1.2.3

(2022-09-06)

Fixed

  • Composer dependencies

1.2.2

(2022-08-16)

Improvements

  • removed unnecessary dependencies

Fixed

  • Console commands return type

1.2.0

(2022-05-23)

Improvements

  • Migrate to declarative schema

1.1.7

(2022-02-16)

Fixed

  • Fixed the issue with incorrect segmentation by custom customer sttributes

1.1.6

(2021-12-17)

Fixed

  • Issue with customer validation

1.1.5

(2021-06-18)

Fixed

  • Fixed the issue with refreshing segments that have custom customer attributes in conditions

1.1.4

(2021-04-23)

Improvements

  • Memory usage decrease (with big amount of customers)

1.1.3

(2021-04-22)

Fixed

  • Fixed the issue with refreshing segments.
  • Fixed the issue with validating customers in segment form.

1.1.1

(2021-03-17)

Fixed

  • Fixed the issue with refreshing segment when one customer subscribed to newsletters in different stores

1.1.0

(2021-01-06)

Fixed

  • Fixed the issue with empty rows in customers grid in segment form

1.0.51

(2020-10-21)

Fix

  • Refresh customer segment window has been overlayed by top toolbar

1.0.50

(2020-10-13)

Improvements

  • Small spelling fixes

1.0.49

(2020-08-11)

Improvements

  • Minor Improvements (UI)

1.0.48

(2020-07-30)

Improvements

  • Support of Magento 2.4

1.0.47

(2020-04-03)

Fixed

  • Issue with creating new segment (Table '[dbname].[prefix]_mst_email_trigger' doesn't exist, affects only 1.0.46)

1.0.46

(2020-03-11)

Features

  • New condition "Follow up email subscription"

1.0.45

(2020-02-28)

Fixed

  • Undefined offset 0 in reports
  • issue with unable to edit category condition

1.0.44

(2019-10-07)

Fixed

  • Issue with condition Number of orders > 0 + Complete
  • Issue with filters
  • Issue with Category conditions

1.0.43

(2019-10-02)

Fixed

  • Issue with incorrect customer segmentation
  • Issue with the last order and the last shipment conditions
  • Issue with Unknown column 'main_table.status' in 'where clause'

1.0.42

(2019-09-24)

Fixed

  • Issue with customers group changing

1.0.41

(2019-08-15)

Fixed

  • Issue with incorrect customers segmentation (number of orders 0 + date range)
  • Issue with not displaying date range in conditions
  • Issue with unavailable to set inner combinations of conditions

1.0.40

(2019-05-31)

Improvements

  • New Rule "Last Shipment Date"

Fixed

  • Export after refresh

1.0.39

(2019-05-29)

Fixed

  • Issue with group id
  • Issue with sales rules

1.0.38

(2019-05-28)

Improvements

  • Segments Comparison

1.0.37

(2019-05-16)

Improvements

  • Ability to export segment customers via cli (mirasvit:customer-segment:export)
  • Export time

Fixed

  • Issue with message-queue

1.0.36

(2019-05-08)

Improvements

  • UI
  • Customer Last Activity Rule
  • Code Refactoring

1.0.35

(2019-04-11)

Improvements

  • Segment refresh time

1.0.34

(2019-04-04)

Fixed

  • Test customer validation by email does not work for tables with prefix

1.0.33

(2019-04-02)

Fixed

  • Problem refreshing segments by cron

1.0.32

(2019-03-29)

Improvements

  • Add more meaningful error message while exporting segment customers

1.0.31

(2019-03-22)

Improvements

  • Use separate cron group for customer segment cron jobs
  • Start segment refresh process from the oldest segments

1.0.30

(2019-03-13)

Fixed

  • Issue refreshing segments through CLI and by cron [#33]()

1.0.29

(2019-03-05)

Fixed

  • Error during segment refresh through CLI

1.0.28

(2019-02-25)

Fixed

  • Segment applied to newsletter only on second save

1.0.27

(2019-02-08)

Fixed

  • Error blocking Magento installation

1.0.26

(2019-01-22)

Fixed

  • Issue with 'Newsletter Subscription' condition #28

1.0.24

(2018-12-13)

Improvements

  • Add dependencies for newsletter integration feature

1.0.23

(2018-12-13)

Features

  • Integration of Magento Newsletter with Customer Segment #26

Documentation

  • Integration with Magento Newsletter

1.0.22

(2018-11-30)

Improvements

  • M2.3 support

Fixed

  • Error refreshing segments with sales amount rule if DB tables contain prefix

1.0.21

(2018-11-12)

Fixed

  • Error while exporting segment customers without ZIP code

1.0.20

(2018-08-21)

Fixed

  • Some customers are not moved to group when multiple segments with lower priority exist

1.0.19

(2018-05-29)

Features

  • Automatically export segment customers to CSV

Documentation

  • Info about automatic data export

1.0.18

(2018-05-24)

Improvements

  • Ability to preview guest customers
  • Ability to validate SKU of order item instead of actual product

Documentation

  • CLI commands to generate segment via command line and Segment Customers Preview

1.0.17

(2018-05-23)

Features

  • Preview segment's customers

Fixed

  • Properly display conditions in segment listing
  • Properly display Size column in segment listing
  • Properly refresh guest customers

1.0.16

(2018-05-18)

Improvements

  • Refresh process improvement: add indexes

1.0.15

(2018-05-17)

Improvements

  • Increase performance of segment refresh process by cron

1.0.14

(2018-05-15)

Features

  • Console command to refresh segments

Improvements

  • Increase performance of segment refresh process for guest customers

Documentation

  • Instruction on making the product attribute available for use as the condition for customer segment rules

1.0.13

(2018-04-04)

Fixed

  • Broken styles for column 'Size'

1.0.12

(2018-03-28)

Improvements

  • Compatibility with latest version of Mirasvit Report module

Fixed

  • Correct problem with rendering customer segment edit page

1.0.11

(2018-03-01)

Fixed

  • Make extension properly work with 1.2.* version of Mirasvit Report module

1.0.10

(2018-02-26)

Fixed

  • Custom customers attributes are not validated properly

1.0.9

(2017-02-02)

Fixed

  • Fix error occurred during refreshing customer segment by cron

1.0.8

(2018-02-01)

Improvements

  • Rule Condition 'last order placed X days ago' #9

1.0.7

(2017-12-27)

Features

  • Export customer shipping/billing addresses #8
  • Reindex segment data with AJAX preview #7

1.0.6

(2017-12-12)

Features

  • Ability to export matched customers from segment

Fixed

  • Fix filter segment matched customers

1.0.5

(2017-12-01)

Fixed

  • Close segment edit page on pressing 'Save' button

1.0.4

(2017-11-20)

Improvements

  • Remove constructor from interface

1.0.3

(2017-11-01)

Documentation

  • Add basic documentation

1.0.2

(2017-09-28)

Fixed

  • Fix error during compilation

1.0.1

(2017-09-27)

Improvements

  • Compatibility with Magento 2.2

1.0.0

(2017-09-01)

Fixed

  • Fix incorrect dependency error during compilation

1.0.0-alpha6

(2017-08-11)

Fixed

  • Set correct permissions for segment tabs

1.0.0-alpha5

(2017-08-11)

Fixed

  • Fix permissions to show segment tabs 'Matched Customers' and 'History'

1.0.0-alpha4

(2017-08-10)

Improvements

  • Create schema for virtual table in friendly way

1.0.0-alpha3

(2017-06-28)

Features

  • Integration for Mirasvit Report: fast filter by customer segments for reports
  • Integration with Mirasvit Email - customer segment condition for trigger's rules
  • Integration with Mirasvit RWP - customer segment condition for rules

1.0.0-alpha1

(2017-05-15)

Features

  • Refresh Segment Data by cron and collection guest customers
  • Change customers' groups after refreshing segment data


Submodule mirasvit/module-report

1.2.27

(2017-12-07)

Fixed

  • Filters by "Customers > Products" and "Abandoned Carts > Abandoned Products" columns

1.2.26

(2017-12-06)

Fixed

  • Filter by "Products" column

1.2.25

(2017-12-05)

Fixed

  • Issue with active dimension column

1.2.24

(2017-11-30)

Fixed

  • Issue with export in Magento 2.1.8

1.2.23

(2017-11-27)

Fixed

  • Issue with "Total" value of non-numeric columns

1.2.22

(2017-11-15)

Fixed

  • Issue with export to XML

1.2.21

(2017-11-03)

Fixed

  • Properly replicate temporary tables
  • An issue with builing relations
  • Issue with finding way to join tables

1.2.20

(2017-10-30)

Fixed

  • An issue with sales overview report when customer segments used

1.2.19

(2017-10-30)

Fixed

  • Issue with export to CSV (Magento 2.1.9)

1.2.18

(2017-10-26)

Fixed

  • Issue with long replication

1.2.17

(2017-10-20)

Fixed

  • Fixed css bug
  • Compare for leap year

1.2.16

(2017-09-28)

Fixed

  • Compatibility with php 7.1.9

1.2.15

(2017-09-26)

Fixed

  • M2.2

1.2.14

(2017-09-18)

Fixed

  • Fix report email notification using 'Send Now' function

1.2.13

(2017-08-09)

Fixed

  • Conflict with other reports extensions

1.2.12

(2017-08-02)

Improvements

  • New Report Columns

1.2.11

(2017-07-19)

Fixed

  • Display option labels instead of values for dashboard widgets

1.2.10

(2017-07-12)

Fixed

  • Issue with Eav attributes

1.2.9

(2017-07-11)

Improvements

  • New Charts

1.2.8

(2017-06-21)

Fixed

  • Proper filter product details report by current product ID

1.2.7

(2017-06-21)

Improvements

  • Refactoring

1.2.6

(2017-06-01)


1.2.5

(2017-05-31)

Improvements

  • Added field to relation

1.2.4

(2017-05-15)

Fixed

  • Issue with column ordering

1.2.3

(2017-05-04)

Bugfixes

  • Fixed an issue with compound columns of type simple

Improvements

  • Changed default multiselect control to ui-select
  • Chart resizing

1.2.2

(2017-03-21)

Improvements

  • Performance

Fixed

  • Fixed an issue with join returing customers

1.2.1

(2017-03-06)

Improvements

  • Disabled wrong filters for day/hour/month/quarter/week/year

Fixed

  • Fixed an issue with table joining
  • Fixed an issue with filters
  • Issue with rounding numbers in chart

1.2.0

(2017-02-27)

Fixed

  • Minor issues
  • Fixed an issue with replication

1.1.14

(2017-01-31)

Fixed

  • Dashboard

1.1.12

(2017-01-25)

Fixed

  • Backward compatibility
  • Fixed an issue with bookmarks

1.1.11

(2017-01-20)

Fixed

  • Fixed an issue with tz

1.1.9, 1.1.10

(2017-01-13)

Fixed

  • Fixed an issue with timezones
  • Fixed an issue with dates

1.1.7, 1.1.8

(2016-12-15)

Fixed

  • Fixed an issue in toolbar
  • Fixed an issue with date filter

1.1.6

(2016-12-09)

Improvements

  • Compatibility with M2.2

1.1.5

(2016-09-27)

Fixed

  • Fixed an issue with moment js

1.1.4

(2016-09-13)

Fixed

  • Removed limit on export reports (was 1000 rows)

1.1.3

(2016-09-05)

Improvements

  • Changed product type column type

1.1.2

(2016-09-01)

Improvements

  • Added Product Type column

1.1.1

(2016-08-15)

Fixed

  • Fixed an issue with exporting

1.1.0

(2016-07-01)

Fixed

  • Rename report.xml to mreport.xsd (compatiblity with module-support)

1.0.4

(2016-06-24)

Fixed

  • Compatibility with Magento 2.1

1.0.3

(2016-05-31)

Fixed

  • Fixed an issue with currency symbol

1.0.2

(2016-05-27)

Fixed

  • Add store filter

1.0.1

(2016-05-25)

Fixed

  • Removed font-awesome

1.0.0

(2016-05-19)

Improvements

  • Export
  • Refactoring
  • Table join logic

Fixed

  • Fixed an issue with joining tables
  • Chart - multi columns