Best Practices for Segmentation Queries
Generates Athena SQL + JSON criteria for Unica CDP segments. The SQL returns customer_id and JSON defined filters.
How to Use Prompts?
Demographics: Age, Gender, Location. Behavior: Transactions, Responses. Timeframe and Thresholds.
Example: Segment female customers aged 25–35 in Germany with >3 transactions and revenue >1000 in last 90 days.
Examples for Good Prompt vs Bad Prompt
| Prompt | Good / Bad? | Reason? |
|---|---|---|
| Segment male customers age 40–50 in US with no purchase >180 days. | Good | Full criteria. |
| Segment users. | Bad | Needs details. |
| Create segment high spenders. | Bad | Missing thresholds. |
| Segment female, age 30–40, France, >2 orders last month. | Good | Specific date and metrics. |
| Segment people by event. | Bad | Which event? |
| Segment single customers in UK with >$500 revenue. | Good | Demographic + revenue. |
| Make group. | Bad | Lacks context. |
| Segment Gen Z in CA with clicks >5. | Good | Age cohort + state + behaviour. |
| Segment behavior. | Bad | Needs specifics. |
| Create fancy segment. | Bad | Non-descriptive. |
| Segment customers who dropped off car loan journey | Good | Journey stage + context |
| Segment users with email opens >2 and click-throughs >1 | Good | Specific behavioral metric |
| Segment by app version | Bad | Missing filter logic (which version?) |