Me
How are rules used when applying User Groups?
Enki
**Source:** [Rules in Game Server](https://tripledotstudios.atlassian.net/wiki/spaces/KB/pages/2668494860/Rules+in+Game+Server)
Rules are a critical component for defining User Groups, allowing precise targeting and segmentation of users based on specific conditions. Here's a comprehensive overview of how rules are used when applying User Groups:
### Rule Basics
Rules are based on two primary logical operators:
- **AND operator**: Users must match ALL added rules to receive the entity
- **OR operator**: Users must match AT LEAST ONE rule to receive the entity
### Rule Configuration
1. **Logical Operators**
- You can add multiple rules within a single section
- Rules can be combined using AND/OR logic
- Some rules allow adding multiple values using the green + button

### Example Scenario
Consider targeting users with these complex conditions:
- From France OR UK
- AND Game version equal to 2.7.0
- AND Installed the app 15 days ago or more

### Advanced Rule Structuring: Sections
Sections provide advanced rule nesting with these capabilities:
- Up to 3 levels of nesting
- Color-coded for easier visualization
- Can use AND/OR operators between sections

### Named Rule Groups
A powerful feature allowing you to:
- Create and save rule sets
- Reuse rules across different features
- Save time in configuration
### Key Considerations
- Rules help differentiate entities for specific user groups
- They provide granular targeting capabilities
- Can be combined to create complex user segmentation strategies
### Best Practices
1. Start with simple AND/OR conditions
2. Use sections for complex targeting
3. Leverage Named Rule Groups for reusability
4. Test and validate rule configurations thoroughly
By understanding and effectively using rules, you can create highly targeted User Groups that precisely match your segmentation requirements.