# Create automatic segmentation rules

You'll use answers, contact data, or visitor behavior you already have to assign segments without asking another question.

Available on the Grow, Scale, and Pro plans.

Use automatic rules to show visitors something relevant without asking for information you already have. Rules can assign a standalone segment or supply a choice question's answer before you ask it.

For example, [WorkForge](https://workforge.rightmessage.com) could show a comparison offer to people who recently visited its [pricing page](https://workforge.rightmessage.com/pricing.html) and selected an agency-related answer.

## Open the segment's rules

You'll need editing access and an existing [segment group](https://rightmessage.com/help/creating-and-managing-segment-groups) or choice question. Open its rules in the appropriate place:

- For a standalone group, open **Segments**, select the group, and open **Setup**.
- For a choice question, open **Questions**, select it, and open **Auto-Segment**. Choose **Edit rules** beside the answer.

Input questions don't have answer segments or an **Auto-Segment** tab. To use a Number, text, or other input answer, add a [previous-answer condition](https://rightmessage.com/help/conditions-answers) to a segment's rules instead.

If the question has a running A/B test, its automatic rules stay locked until the test ends. **View test** opens that test.

Your rule edits stay in the project draft until you publish.

## Choose who should match

Start with the information that would make someone a good fit for the segment. Use your own real pages when you add page-visit conditions.

1. Choose **Add group** beneath the segment's rules.
2. Select the condition source and the field or behavior to check.
3. Choose the comparison operator.
4. Enter or select a value if the operator needs one.
5. Set the occurrence or time window if the condition offers one.
6. Choose **Add AND condition** if another requirement must also match.
7. Choose **Add group** if you want an alternative way to qualify.
8. If you're editing a question's rules in a drawer, choose **Done** when you're finished.

Every condition inside a group must match. Either group can qualify the visitor. An original landing page can't be both your pricing page and your contact page, so put those alternatives in separate groups.

![Automatic segment rules matching a current pricing page from Google or a returning visitor](https://rightmessage.com/help/screens/audience-auto-rules.light.webp)

*AND joins requirements inside a group. OR joins alternative groups.*

Remove unfinished groups and provide a path for visitors who don't match. An empty rule group doesn't match everyone. The [condition reference](https://rightmessage.com/help/condition-builder-reference) covers grouping, operators, available data, and how long each source applies.

## Use contact data you already have

If the answer already lives in your email platform, use the question or group's **Sync with** tab. Mapping the answer there lets contact data supply the segment after RightMessage identifies the visitor. You don't need to recreate that mapping as a manual rule.

You'll see an **Auto synced** condition in the rule editor. It's read-only there. Change the destination or mapped value in **Sync with** your provider. See [Map answers to contact fields and tags](https://rightmessage.com/help/synchronizing-contact-data-with-your-email-platform-or-crm) for setup.

Contact conditions need a connected provider and an [identified contact](https://rightmessage.com/help/how-do-we-identify-returning-subscribers-or-contacts). Connecting your platform alone doesn't identify a browser, and another device needs its own identification event. Page-visit and other anonymous behavior rules don't need an email-platform connection.

## Ask Righty to draft the rules

If you'd rather describe your audience than build the conditions yourself:

1. With no user-defined conditions, enter your audience description in the inline prompt. For WorkForge, you might write "Visitors who viewed /pricing.html in the last week and selected Managing client projects."
2. Choose **Generate Conditions**. If conditions already exist, choose **AI Generate** to open **Generate Conditions with AI** instead.
3. Review the sources, comparisons, group logic, and history windows it adds.

Generation changes your draft, not your live site. If it fails or reports an invalid format, use the manual controls to build the rules.

## Check that the right visitors match

To test website behavior, install your project's snippet and make the visits or other actions your rules require. For contact rules, use an identified test contact with the relevant data.

1. In **Setup**, put specific segments before broader ones that overlap with them.
2. Choose **Preview on your site** to load your draft with the debugger.
3. Check a visitor who should match and one who should stay unmatched.
4. Check the normal path without forced segment overrides.
5. [Review and publish](https://rightmessage.com/help/publishing-your-changes) when the draft is ready.

A remembered choice answer can take priority over an automatic rule. Contact rules can also stay unresolved while data loads. Missing data doesn't confirm that a contact lacks a tag or field. The debugger shows the data and matches RightMessage is using. [Testing your changes](https://rightmessage.com/help/best-practices-for-testing) covers the testing steps in more detail.

When the intended visitor gets the segment and an unmatched visitor takes the fallback, the rule is working. To use that known answer without asking again, [set the flow and widget to skip known questions](https://rightmessage.com/help/route-by-existing-answers). **Auto-Segment** supplies the answer, but doesn't override those question-handling settings.
