Account segmentation
Overview
Segmentation is the tool that lets you run queries on the database to segment accounts, customers and prospects, and then take actions such as Send to Excel. It is available from the Accounts/Segmentation menu.
It lets you run:
- Simple queries: e.g. find all prospects in Lyon.
- Complex queries: e.g. find all customers in Paris, assigned to the key accounts portfolio, originating from the Eurexpo trade show, not managed by Pierre André and who do not have a P1 or P2 potential.
It works as follows:
- Creating and saving segments using a query builder
- Running the query and displaying the results (the segment)
- Actions on the segment
- Export to Excel (mailing, reporting....)
- Bulk actions: reassign these accounts to another manager, to another portfolio, change the category...
- Campaign creation: create a prospecting campaign

The query builder
- The query builder works with an unlimited combination of criteria, conditions and condition groups, which you can mix together using "AND" and "OR".
- Thanks to these nested combinations, the search possibilities are many, powerful and almost infinite.
- Queries are run on account information (city, sector, account type....) as well as on your reference data (geographical area, potential...) using selection criteria (equal to, different from, starts with, among...).
Don't hesitate to experiment in order to fully understand how the query builder and the combinations of "AND" and "OR" work. Sample queries are provided with the application.
In most cases, using "AND" and a single condition group will be enough.

Queries can also be run on your reference data: for example, the "Account origins" reference table contains, among others, the value "Salon Mobility for Business" (last row).

I can very simply tell the query builder to find all accounts whose origin is "Salon Mobility for business".

Query visibility
When you create or edit a query, the Visibility field, between "Query name" and "Query", sets who can see it:
- Everyone (default value): the query is shared with all users who have access to segmentation.
- Only me: only you can see the query. Other users, administrators included, do not see it in their list and cannot open, edit or delete it. Only the author of a shared query can switch it to "Only me".
The title of the query list is a selector that switches between:
- My queries: the queries visible only to you.
- Shared queries (default view): the queries visible to everyone.
Above the list, the Filters panel helps you find a query quickly:
- Search: filters on the query name (ignoring case and accents).
- Author: only shows the queries created by the selected users.
The reset icon restores the default filters. The sort order (Order by) stays outside the panel and applies to the filtered list.
Queries created before this field was introduced are visible to everyone. This feature is available on the web, in account, contact and business segmentation.
Duplicate a query
In the query list, the Actions menu of a query offers Duplicate this query. This action is available to users allowed to create queries.
The copy keeps the conditions, the visibility and the type (accounts, contacts or businesses) of the original query. Its name is the original name followed by "(Copy)". The copy opens directly in edit mode: you can adjust its name and conditions, then save it.
View the criteria of a query
In the list of queries, the Criteria column shows the criteria of each query without opening it. They are shown as in the advanced mode of the lists: each condition shows the field, the operator and the values, joined by AND or OR.
Using a query in the lists (advanced mode)
In the account lists (Customers, Prospects, All…) and in the business list, the header of the Filters panel offers two modes:
- Simple mode: the usual filters (manager, portfolio, category…).
- Advanced mode: a query from the query builder replaces these filters. The simple mode filters are kept and come back when you switch to the simple mode again.
In advanced mode, the Query selector only offers the queries of the screen (account queries on the accounts, business queries on the business list), grouped into My queries and Shared queries, with their author and their number of criteria. The search applies to the name and the author. The criteria of the selected query are displayed next to the selector, and its name is shown in the title of the list.
The tab is always applied: on the Customers tab, a query only returns customer accounts. If the query targets another account type than the tab, the criterion is highlighted and a message explains it.
The Edit button lets you adjust the criteria directly in the panel, then Apply them to the list. This change is temporary: the query saved in the query builder is not modified, the "Modified (not saved)" label is displayed, and the Back to the original query link cancels the change. It is also lost when the page is reloaded.
The search of the list and the export apply to the result of the query. The advanced mode requires the read permission on segmentation.
Queries on custom fields
You can filter your queries on all types of custom fields. 
Custom fields are at the end of the field list.
They are prefixed with their category for better readability
The custom fields defined in the query filter appear at the end of the result columns. 
Queries on badges and products
You can also filter your queries on badges and products.
Filter on badges.
A new 'Badge' column will be displayed in the results, containing the account's badges. 
Filter on products.
A new 'Product' column will be displayed in the results, containing the account's products. 
The result list: the segment

The result list presents the query results as a table. Horizontal scrolling lets you see all the columns to the right. When you click Export to Excel, this list is downloaded in .CSV format.
