EN
Log in Book a demo

Blog

How to segment a customer portfolio without writing SQL

By DeepMiner team 3 min read For: CRM and marketing

Segmenting a portfolio is usually a request to someone else. Whoever plans the campaign describes the audience, someone writes the query, the list comes back days later and the audience has already changed. With indexed data and an AI assistant, the business question becomes an answer in the conversation itself, and whoever asks stays in control.

Start with the business question

Write what you want to know the way you would say it to an analyst. “How many Gold and Platinum customers do we have per state?” “Which preferred channel shows up most among people who opted in to marketing?” “Show the distribution by segment as a donut.”

In DeepMiner, the Data Assistant queries the indexes chosen in Sources and answers with formatted text and the chart. The answer brings the numbers found, and the chart can change type without a new question: bar, line, area, pie, donut, KPI, Pareto or table.

Good questions have three parts: what to count, by which cut and over which period. The more specific the question, the less adjusting afterward.

Check the query

Natural language is ambiguous. “Active customers” could be a boolean field, a status or the date of the last purchase. Before deciding, open View query and see the filters and groupings that ran.

If the query does not match what you meant, correct it in the conversation: “use the last_purchase field in the last 90 days instead of the status”. The assistant redoes the query with the new criterion.

Compare different datasets

Many segmentations depend on more than one dataset. Customers who are in retail and also in the collections portfolio. The distribution by state in each one. With two indexes selected in Sources, the assistant queries each one and cross-references the summarized analyses, such as the count by state for each index and the difference between them.

The cross-reference works on aggregated results. To list records that appear in both datasets at once, the way is to have a shared field and filter each index by it.

From the cut to the send

A segmentation is only worth it if it reaches the campaign without being redone. In DeepMiner, the cut becomes the filters of a flow strategy: is one of, is not one of, contains, greater than, between, last 30 days. The strategy shows the expected records before saving.

With the provider and recurrence set, the strategy sends on its own. The option to not resend to anyone who already received on that channel keeps the same person from getting the same message in two campaigns.

What the AI should not see

Segmenting does not require knowing anyone’s CPF. In DeepMiner, CPF, CNPJ, phone and email fields are recognized as sensitive. The model receives the name and type of those fields, never the values. The query does not group by them, and filters on them accept only equality comparisons, so a question cannot list documents from the data.

From question to tracking

When a cut becomes routine, the answer’s chart goes to a dashboard with Add to dashboard. There it follows the global filters and the panel’s refresh interval, and the question does not need to be asked again every week.

Want to try questions on data like yours? Book a demo and bring the three questions you ask the data team most.

Frequently asked questions

Can I segment data without knowing SQL?

Yes. In DeepMiner you ask the AI assistant in natural language, and it builds and runs the query on the index and answers with a chart.

How do I know the AI understood correctly?

Every chart has View query, which shows the filters and groupings that ran. If something is wrong, you correct it in the conversation itself.

Can the segmentation become a campaign?

Yes. The same criteria become the filters of a flow strategy, with provider and recurrence, and the strategy shows the expected count.

See DeepMiner working on your data.

Book a demo and watch a dataset get indexed, enriched and queried.

Book a demo