Documentation

​
​

Development

User Acquisition

Monetization

Industry

Triggers

Triggers Admin API

Scheduler Admin API

Open Unity Dashboard

Triggers

LiveOps
​
​
Get started
  • Overview
  • Get started
  • Set up triggers example workflow
  • Authentication
Set up events
  • Understand and manage events
  • Schedule events
Define triggers
  • Define triggers
    • Trigger structure
    • Filters
    • Define triggers with the CLI
    • Define triggers with the REST API
    • Define triggers with the Unity Dashboard
Configure actions
  • Use Cloud Code
  • Use webhooks
Manage and monitor
  • Use the dead letter queue (DLQ)
  • Limits
  • Failure handling
Examples and reference
  • Use case samples
  1. Triggers
  2. Define triggers

Unity Dashboard

Preview, create, and delete triggers using the graphical interface of the Unity Dashboard.
Read time 15 minutes
Last updated 12 days ago

The Unity Dashboard provides a graphical interface for you to preview, create, and delete triggers.
Note
You can create triggers for both UGS service events and schedules in the Unity Dashboard, with Cloud Code or webhook actions. To create and manage schedules on their own, refer to Schedule events with the Unity Dashboard and Manage your schedules.

Create a trigger

You can create a trigger for a UGS service event or for a schedule. The trigger can run a Cloud Code script or module, or send an HTTP request to an external URL (webhook).
To create a trigger, follow these steps:
  1. In the Unity Dashboard, select Triggers (or Products > Triggers).
  2. Select New trigger.
  3. On the Details step, enter a Name for the trigger. Trigger names must be unique across the project and environment and can't exceed 255 characters.
  4. Choose the source of the event that activates the trigger:
    • Event: a UGS service event, such as a Cloud Save or Leaderboards event.
    • Schedule: a scheduled event that fires on a date or cadence you define.
  5. Select Next.
  6. In the When this happens section, define the event that activates the trigger. The controls depend on the source you chose:
    • For a UGS event, refer to Add an event.
    • For a schedule, refer to Add a schedule.
  7. In the Do this section, select Add Action and choose the action type:
    • Cloud Code: select a script or module to run when the trigger fires. You can only select Cloud Code actions in the same environment as the trigger. If you selected a Moderation event, you can only select a Moderation script. For module scope compatibility, refer to Scoped triggers.
    • Webhook: configure the HTTP request sent when the trigger fires. Refer to Configure a webhook action.
  8. Select Confirm.
Note
If you change the source between Event and Schedule, the Dashboard clears any event, filter, and payload you already selected, so a stale selection from the other source doesn't carry over.
Note
You can't create a trigger that duplicates an existing one. A trigger is a duplicate when it fires on the same event, runs the same action, and applies the same filter as an existing trigger. In that case, you can't select Confirm, and a tooltip explains that a trigger for this event and action already exists. A trigger with the same event but a different action is still valid, as is the same event and action with a different filter. The Dashboard compares actions by their Cloud Code action identifier (the
actionUrn
) and scope type, or by webhook URL.
After creation, the Dashboard redirects you to the trigger list page. To inspect the trigger configuration, select the trigger name in the table.

Add an event

In the When this happens section for an Event source, follow these steps:
  1. Select Add Trigger Event.
  2. Select the event that activates the trigger.
  3. Optionally, select Add Filter and set the attribute, operator, and value to filter on the event payload. For supported operators and examples, refer to Filters in the Unity Dashboard.
Note
You don't need to encase string values in quotes. However, you must encase the values for JSON types in quotes.
Warning
If the trigger interacts with the same service that emits the event, define a filter to avoid infinite loops. Refer to Filters in the Unity Dashboard.

Add a schedule

For a Schedule source, the When this happens section describes the schedule whose event activates the trigger. The trigger fires each time the schedule does.
  1. Select Add Schedule.
  2. In the Schedule dropdown, search for a schedule by name and select an existing schedule. Each schedule lists its type, and its version when the event has more than one version.
  3. If no schedule fits, select Create schedule inside the dropdown. The schedule creator opens as a dialog with the same two-step Details and Payload wizard described in Schedule events with the Unity Dashboard. When you create the schedule, the Dashboard saves it independently, refreshes the list, and selects the new schedule automatically.
  4. Optionally, select Add Filter to filter on the schedule's payload fields. The filterable fields come from the top-level keys of the schedule's payload object. If the schedule's payload is empty, the Dashboard disables Add Filter and a tooltip explains that the schedule has no payload fields to filter on. To filter a schedule trigger, give the schedule a non-empty JSON object payload.
Selecting a schedule sets the trigger's event type to that schedule's composed event type. A second trigger can select the same schedule to share the event, so one schedule can feed many triggers. For more information, refer to Multiple triggers per event type.
Note
Schedule triggers can't create infinite loops, so the infinite-loop warning shown for UGS events doesn't appear for schedule triggers.

Configure a webhook action

When you choose Webhook in the Do this section, you define how the Triggers service calls your endpoint when the event fires. For full template syntax (URL, headers, and payload), refer to Webhooks – Template syntax. The form includes the following fields:

Callback URL

Enter the URL that will receive the webhook request. The URL is called when the trigger fires. You can use template syntax to insert environment secrets or event data—for example
https://mywebsite.com/12345/{{ secret "SECRET_NAME" }}
. The form includes a link to create secrets (project > environment > Secrets); you do not need to leave the page. You can also create secrets in the Secret Manager for the project and environment. For the maximum URL length, refer to Limits.

Method

Select the HTTP method used to deliver the webhook (for example POST).

Environment secret

Environment secrets are used by template expressions in the URL, headers, and payload (for example
{{ secret "SECRET_NAME" }}
,
{{ hmac_sha256 "SECRET_NAME" }}
). Use View Environment Secrets to list secret keys for the current environment, or + Add Environment Secret to create a new secret. The secret key name is what you use inside the double curly braces. For full template syntax, including
hmac_sha256
,
hmac_sha512
,
secret
, and
jwt
, refer to Webhooks – Template syntax.

Header

Add one or more HTTP headers with + Add header. For each header:
  • Key: Header name (for example
    X-Signature-256
    ,
    Authorization
    ).
  • Value: Header value. You can use template expressions such as
    {{ hmac_sha256 "WEBHOOK_SECRET" }}
    or
    Authorization: Bearer {{ jwt }}
    .
Note
Do not wrap values in quotes. Enter the raw value (for example
{{ jwt }}
or
my-value
), not
"{{ jwt }}"
. The Dashboard replaces template expressions when the webhook is sent.
You can add up to 10 custom headers. Each header name and value has a maximum length; header names must be ASCII. For exact limits, refer to Limits. Use the trash icon to remove a header row.

Content type

Select the content type for the request body. This determines the expected format of the payload and controls whether the payload field is optional or required. For the full list of supported content types and their payload formats, refer to Webhooks – Content types. For
application/json
(the default), the payload is optional. For all other content types, the payload is required. Changing the content type clears the payload editor.

Payload

Enter the request body. The expected format depends on the selected content type (see above).
For
application/json
, the payload is optional. When left empty, the Triggers service forwards the full event payload as JSON. When provided, the value must be valid JSON — template expressions such as
{{.playerId}}
or
{{ secret "SECRET_NAME" }}
are excluded from JSON validation so they do not cause false errors.
For all other content types, the payload is required.
You can use template expressions in the payload:
  • Use
    {{.}}
    to insert the full event payload, or
    {{.fieldName}}
    for a specific field (for example
    {{.playerId}}
    ).
  • Use
    {{ secret "SECRET_NAME" }}
    to insert a secret value. Enter secret names with regular double quotes — the Dashboard handles serialization automatically.
Note
In the Dashboard, enter all template expressions with regular double quotes:
{{ secret "SECRET_NAME" }}
. Do not add backslashes. Quote escaping is only needed when writing templates directly in JSON for the API or CLI.
Select View current event payload to view the shape of the event data for the chosen trigger event. For all supported template functions, refer to Webhooks – Template syntax.
Failed webhook deliveries are retried. After retries are exhausted, events appear in the dead letter queue, where you can replay or remove them from the Unity Dashboard. For information on limits, refer to Limits.

Preview triggers

You can access a list of all triggers for an environment from the Unity Dashboard:
  1. In the Unity Dashboard, select Triggers (or Products > Triggers).
  2. Select an environment from the list of environments.
A list of all triggers in the selected environment for the project appears. The table contains the name, trigger, type, and last updated timestamp.
If the schedule that feeds a trigger no longer exists, a warning icon appears at the start of the trigger's Trigger cell, with the tooltip This trigger's schedule no longer exists, so the trigger never fires. To make the trigger fire again, create a schedule that emits the same event name, or delete the trigger.

Trigger details

You can navigate to the trigger details page by selecting a trigger from the list of triggers. The trigger details page shows you the following information:

Data

Description

NameThe name of the trigger.
TypeThe type of trigger: Event or Schedule.
TriggerThe event that triggers the script. For example,
key_saved
by
Cloud Save
.
Event TypeThe full event type, for example,
com.unity.services.cloud-save.key-saved.v1
. For more information on event types, refer to Event structure.
Action scope typeFor a Cloud Code module trigger, this is the scope type of the triggered event. For more information, refer to Scoped triggers.
Last UpdatedThe timestamp of the last time the trigger configuration was updated.
Date CreatedThe timestamp of when the trigger configuration was created.
The trigger definition card breaks down the trigger configuration and adapts to the event source:
  • For a UGS-event trigger, it shows when this happens (the event type), any filter rows, and do this (the action).
  • For a schedule trigger, it shows the cadence in time-friendly language (for example, fires every hour), followed by do this (the action). While the schedule is active, the cadence links to the schedule's details page and carries an external-link icon. For an expired schedule, the cadence shows without a link, because expired schedules don't have a details page.
For webhook triggers, the card also shows the Action details: Callback URL, HTTP method, content type, headers, and payload. Use View Trigger Logs to debug delivery, or Delete Trigger to remove the webhook. Failed webhook events appear in the dead letter queue, where you can replay or remove them.
The filters are displayed as chips, showing the attribute, operator, and value of the filter. If the dashboard can't display the filter in the chip format, the dashboard displays the filter in its original CEL format.

Navigate to logs

To navigate to the logs page for trigger and view the logs for the trigger execution, select the View Trigger Logs button. Learn more about logs in the Logs section.

Navigate to action

If the trigger is associated with an existing script or module, the trigger definition card provides a link to the script or module. To navigate to the script or module details page, select the link.

Filters in the Unity Dashboard

You can add filters to the trigger configuration to specify the conditions under which the trigger activates. The Unity Dashboard supports a limited set of filters that you can use to filter the event payload.
Familiarize yourself with how filters work in the Filters section. Refer to Supported UGS events to inspect event payloads for each UGS event.
Note
The Unity Dashboard provides a limited amount of operators to offer a simple approach to filters. You cannot define type casting, nested expressions, or complex expressions in the Unity Dashboard. If you need more advanced filters, use the CLI or the Triggers API to define your own CEL expressions.
Warning
If your trigger interacts with the same service that emits the event, you need to define a filter to avoid infinite loops. Infinite loops over-process the event, cause unexpected behavior in your game, and eventually exhaust your Cloud Code resources for the project, which leads to a service outage. If you encounter this issue, delete the trigger that is causing the loop.

Supported operators

The Unity Dashboard displays different operators depending on the attribute type:

Operator

Supported by

equals toAll attribute types
not equals toAll attribute types
greater thanint, double and JSON types
greater than or equals toint, double and JSON types
less thanint, double and JSON types
less than or equals toint, double and JSON types
matchesstring and JSON types
not matchesstring and JSON types
containsstring and JSON types
starts withstring and JSON types
ends withstring and JSON types
Note
The JSON type refers to any JSON object, string, number or boolean. Although all operators are supported for JSON types, you need to use the correct operator for the attribute type within the JSON object. For example, you can't use a string operator for a JSON number.

Join filters

You can define up to 10 filters for a trigger. You can join filters by the logical operators
AND
and
OR
. You can use these operators to combine multiple filters to create complex conditions.
Note
The Unity Dashboard doesn't support nested expressions. You can only join filters with the logical operators
AND
and
OR
. If you need more advanced filters, use the CLI or the Triggers API to define your own CEL expressions.

Define filters with the Cloud Save key-saved event

You can define your trigger to only activate when a specific key is saved in Cloud Save. For example, you can define a filter to only activate the trigger when the key
playerData
is saved.
In the Unity Dashboard, you can add this filter to the trigger configuration:
  1. In the When this happens section, select the Add Event button.
  2. Select the event dropdown and choose the Cloud Save key-saved event.
  3. Select the Add Filter button.
  4. In the new Filter card:
    1. In the first dropdown, select the
      key
      attribute.
    2. In the second dropdown, select the
      equals to
      operator.
    3. In the third dropdown, enter the value
      playerData
      .
If you define this filter, you ensure that the trigger only activates when the key
playerData
is saved in Cloud Save.

Define filters with the Leaderboards score-submitted event

You can define your trigger to only activate when a specific score is submitted to a leaderboard. For example, you can define filters to only activate the trigger for a score in a specific range.
In the Unity Dashboard, you can add this filter to the trigger configuration:
  1. In the When this happens section, select the Add Event button.
  2. Select the event dropdown and choose the Leaderboards score-submitted event.
  3. Select the Add Filter button.
  4. In the new Filter card:
    1. In the first dropdown, select the
      score
      attribute.
    2. In the second dropdown, select the
      greater than
      operator.
    3. In the third dropdown, enter the value
      0
      .
  5. Select the Add Filter button.
  6. In the new Filter card:
    1. In the first dropdown, select the
      score
      attribute.
    2. In the second dropdown, select the
      less than
      operator.
    3. In the third dropdown, enter the value
      100
      .
If you define this filter, you ensure that the trigger only activates when a score between 0 and 100 is submitted to a leaderboard.

Scoped triggers

When you create a trigger with a module action, the Unity Dashboard checks that the selected module endpoint is compatible with the event that activates the trigger. Each event and each module endpoint can declare a scope type (for example,
Player
). The scope type indicates the context in which the action runs.
The following rules apply when selecting a module endpoint:
  • If the endpoint has no scope type, you can select the endpoint regardless of the event.
  • If the endpoint declares a scope type, you can only select the endpoint when the event declares the same scope type.
  • If the scope types do not match, the endpoint is disabled in the dropdown and a message explains the mismatch (for example, Endpoint requires MultiplayerSession scope; event provides Player).
For more information, refer to Scoped trigger events.

Delete a trigger

Warning
Deleting a trigger can't be undone. If you delete a trigger that a live game uses, you might cause unexpected behavior in your game.
To delete a trigger, follow these steps:
  1. Navigate to the Triggers list page.
  2. Select the bin icon, or open the trigger details page and select Delete Trigger.
  3. If the trigger is the only one consuming a schedule, the dialog warns that the schedule keeps running with no triggers, and offers an Also delete the schedule checkbox labeled with the schedule name. Select it to delete the schedule with the trigger, or leave it clear to delete only the trigger and leave the schedule running. The checkbox is clear by default and resets each time you reopen the dialog.
  4. Select Delete to confirm.

Additional resources

  • Webhooks
  • Trigger structure
  • Filters
  • Schedule events with the Unity Dashboard
  • Manage your schedules
  • Dead letter queue
  • Use case sample: Notify a Discord channel

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Create a trigger

      • Add an event

      • Add a schedule

    • Configure a webhook action

      • Callback URL

      • Method

      • Environment secret

      • Header

      • Content type

      • Payload

    • Preview triggers

    • Trigger details

      • Navigate to logs

      • Navigate to action

    • Filters in the Unity Dashboard

      • Supported operators

      • Join filters

      • Define filters with the Cloud Save key-saved event

      • Define filters with the Leaderboards score-submitted event

    • Scoped triggers

    • Delete a trigger

    • Additional resources


Report a problem with this page