> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions & Rules

> Use PlayStream Actions and Rules to react to real-time events with triggers, conditions, and actions like granting rewards or sending push notifications.

# Actions and rules

Use PlayStream Rules to react to PlayStream events in real time. A Rule consists of:

* Only one Trigger
* An optional list of conditions
* One or more actions to take when that trigger is activated.

For example, if you want to send a reward to your players, and send a them a notification when they have more than 10,000 XP you could:

* Define a [Segment](/services/playfab/live-service-management/game-configuration/segmentation/segmentation-overview) for your users called “High XP Players”, and set the criteria as **XP >= 10,000**.
* Create a rule that is triggered by the PlayStream event of those players moving into the High XP Players segment.
* Set two actions for that rule:
  1. Grant virtual currency to the player in the segment.
  2. Send a push notification to congratulate the player and let them know what they've received.

## See also

* [Actions & Rules quickstart](/services/playfab/data-analytics/acting-data/action-rules-quickstart)


## Related topics

- [Actions & Rules quickstart](/services/playfab/data-analytics/acting-data/action-rules-quickstart.md)
- [Economy V2 Segment Actions](/services/playfab/economy-monetization/economy-v2/player-segmented-monetization/segment-actions.md)
- [Content & Configuration Reads Meter API Description](/services/playfab/pricing/meters/file-reads.md)
- [Event Sampling quickstart](/services/playfab/data-analytics/export-data/event-sampling-quickstart.md)
- [Content & Configuration Writes Meter API Description](/services/playfab/pricing/meters/file-writes.md)
