# Triggers

> Automate server-side actions at set moments in time or as the result of server events from Unity Gaming Services.

# Triggers

- [Overview](https://docs.unity.com/en-us/triggers.md): Automate server-side actions at set moments in time or as the result of server events from Unity Gaming Services.
- [Get started](https://docs.unity.com/en-us/triggers/overview.md): Understand how the Triggers service works and how you can use it.
- [Set up triggers example workflow](https://docs.unity.com/en-us/triggers/getting-started.md): Follow this workflow to set up Triggers and automate rewarding top players from Leaderboards.
- [Authentication](https://docs.unity.com/en-us/triggers/authentication.md): Authenticate Triggers Admin API requests using Service Account credentials.

## Use Cloud Code

- [Use Cloud Code](https://docs.unity.com/en-us/triggers/use-cloud-code.md): Understand how you can use Cloud Code modules or scripts with the Triggers service.
- [Set up Cloud Code](https://docs.unity.com/en-us/triggers/use-cloud-code/setup-cloud-code.md): Set up Cloud Code scripts or modules to use with the Triggers service.
- [Use Access Control](https://docs.unity.com/en-us/triggers/use-cloud-code/access-control.md): Control access to Unity Gaming Services by creating rules to restrict service APIs.
- [Cost](https://docs.unity.com/en-us/triggers/use-cloud-code/cost.md): Understand that Triggers currently do not incur additional costs beyond Cloud Code invocations.
- [Use webhooks](https://docs.unity.com/en-us/triggers/webhooks.md): Learn how webhook actions send event payloads to an external URL when a trigger fires.

## Understand and manage events

- [Understand and manage events](https://docs.unity.com/en-us/triggers/manage-events.md): Learn how events work with the Triggers service, which events are supported, and how to debug and monitor events.
- [Events](https://docs.unity.com/en-us/triggers/manage-events/events.md): Understand how the Scheduler service and Unity Gaming Services produce events that Triggers service processes.
- [Supported UGS events](https://docs.unity.com/en-us/triggers/manage-events/supported-ugs-events.md): Learn about the events emitted by Unity Gaming Services that you can use to trigger Cloud Code scripts or modules.
- [Debug and monitor events](https://docs.unity.com/en-us/triggers/manage-events/debug-events.md): Use the Logging service to debug and monitor events in your triggers.

## Schedule events

- [Schedule events](https://docs.unity.com/en-us/triggers/tutorials/schedule-events.md): Create and manage schedule configurations with either the REST API or the Unity Gaming Services (UGS) command line.
- [Using the CLI](https://docs.unity.com/en-us/triggers/tutorials/schedule-events/cli.md): Create and manage schedule configurations from the command line using the Unity Gaming Services command-line interface.
- [Using the REST API](https://docs.unity.com/en-us/triggers/tutorials/schedule-events/rest-api.md): Create and manage schedule configurations that emit events at set or recurring moments using the REST API.

## Define triggers

- [Define triggers](https://docs.unity.com/en-us/triggers/tutorials/define-triggers.md): Understand trigger structure and filtering so that you can define your triggers through several different interfaces.
- [Trigger structure](https://docs.unity.com/en-us/triggers/tutorials/define-triggers/trigger-structure.md): Understand the structure of a trigger configuration that defines what to invoke when an event fires.
- [Filters](https://docs.unity.com/en-us/triggers/tutorials/define-triggers/filters.md): Use filters to determine whether to execute a trigger and avoid unnecessary trigger execution.
- [Define triggers with the CLI](https://docs.unity.com/en-us/triggers/tutorials/define-triggers/cli.md): Manage trigger configurations from the command line using the Unity Gaming Services command-line interface.
- [Define triggers with the REST API](https://docs.unity.com/en-us/triggers/tutorials/define-triggers/rest-api.md): Manage trigger configurations using raw HTTP APIs and the Triggers Admin API.
- [Define triggers with the Unity Dashboard](https://docs.unity.com/en-us/triggers/tutorials/define-triggers/unity-dashboard.md): Preview, create, and delete triggers using the graphical interface of the Unity Dashboard.
- [Limits](https://docs.unity.com/en-us/triggers/limits.md): Find the limits and constraints for Triggers configuration, webhooks, and execution.
- [Failure handling](https://docs.unity.com/en-us/triggers/failure-handling.md): Learn how Triggers handles errors and retries for Cloud Code and webhook actions, and when events enter the dead letter queue.

## Use the dead letter queue (DLQ)

- [Use the dead letter queue (DLQ)](https://docs.unity.com/en-us/triggers/tutorials/manage-dlq.md): View, filter, replay, and discard failed events in the dead letter queue (DLQ) using the Unity Dashboard, the CLI, or the REST API.
- [DLQ overview](https://docs.unity.com/en-us/triggers/tutorials/manage-dlq/dead-letter-queue.md): Understand when events enter the dead letter queue and how to manage them.
- [Using the CLI](https://docs.unity.com/en-us/triggers/tutorials/manage-dlq/cli.md): List, replay, and discard dead letter queue events from the command line using the Unity Gaming Services CLI.
- [Using the REST API](https://docs.unity.com/en-us/triggers/tutorials/manage-dlq/rest-api.md): List, replay, and discard dead letter queue events using the Triggers Admin API.
- [Using the Unity Dashboard](https://docs.unity.com/en-us/triggers/tutorials/manage-dlq/unity-dashboard.md): View, filter, replay, and discard failed events in the dead letter queue using the Unity Dashboard.

## Use case samples

- [Use case samples](https://docs.unity.com/en-us/triggers/tutorials/use-cases.md): Explore different ways to use triggers in combination with other Unity Gaming Services.
- [Reward top players at end of season](https://docs.unity.com/en-us/triggers/tutorials/use-cases/reward-top-players.md): Reward your top players with in-game currency at the end of a season using Triggers.
- [Initialize newly signed-up players](https://docs.unity.com/en-us/triggers/tutorials/use-cases/initialize-new-players.md): Initialize new players with default values in Cloud Save when they first sign up.
- [Wish players a happy new year](https://docs.unity.com/en-us/triggers/tutorials/use-cases/happy-new-year.md): Send a push notification to all users on January 1st at 00:00:00 UTC wishing them a happy new year.
- [Send a push message to player with beaten score](https://docs.unity.com/en-us/triggers/tutorials/use-cases/higher-score-message.md): Send a push message to a player whose leaderboard score was beaten by another player.
- [Announce a level up to all players in joined lobbies](https://docs.unity.com/en-us/triggers/tutorials/use-cases/announce-level-up.md): Announce a player's level up to all other players in joined lobbies through a push message.
- [Tune game difficulty level for individual players](https://docs.unity.com/en-us/triggers/tutorials/use-cases/tune-game-difficulty.md): Tune game difficulty level for individual players based on their progress and skill level.
- [Notify a Discord channel when players sign up](https://docs.unity.com/en-us/triggers/tutorials/use-cases/notify-discord-channel.md): Post messages to a Discord channel using a webhook trigger when players sign up with Authentication.

## Triggers APIs

- [Triggers APIs](https://docs.unity.com/en-us/triggers/apis.md): Reference the Triggers and Scheduler Admin APIs to programmatically manage triggers and schedule configurations.
- [Triggers Admin API](https://services.docs.unity.com/triggers-admin/v1/)
- [Scheduler Admin API](https://services.docs.unity.com/scheduler-admin/v1/)
