Skip to main content

How to refresh customer segments

Customer segmentation is executed during the refresh procedure, which scans all customers and adds them to relevant segments. By default, this is handled automatically by a scheduled cron task.

1. Check which refresh mode is used for the segment

Navigate to the Segments section and open the required segment. Check the Refresh mode option in the Action section. If the value is set to Automatic, the refresh will be performed by cron.

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

If Refresh mode option have Manual mode your segment will add new customers only when refresh will run manually.


2. Manually refresh a segment

To manually refresh a segment, navigate to the Customer segments grid, open the specific segment you want to refresh, and click the Refresh segment data button at the top of the page.

tip

This process is also useful when testing segmentation rules or conditions.