UpsertAutomationTriggerInput
Create an event trigger that fires an automation on model activity or a complete app-scoped active-player-count transition.
input UpsertAutomationTriggerInput {
appId: BigInt!
automationName: String!
onEvent: String!
functionName: String
containerTypeName: String
propertyKey: String
writeSource: String
debounceMs: Int
}
Fields
UpsertAutomationTriggerInput.appId ● BigInt! non-null scalar
The app (tenant).
UpsertAutomationTriggerInput.automationName ● String! non-null scalar
The automation (by name) this trigger fires.
UpsertAutomationTriggerInput.onEvent ● String! non-null scalar
Event to observe: function_invoked | property_changed | container_created | player_count_changed | player_left | player_joined. player_count_changed fires only after complete fleet counts change, and injects reserved previous/current/delta/revision params. player_left fires once per actor that stops being present (about five seconds after its last update), the LAST player included, and injects actor_uuid, user_id, chunk_x/y/z, last_seen_at, left_reason (presence_removed | lease_expired) and remaining_player_count. player_joined (v1.93.0) fires once per actor the roster newly inserted (ON CONFLICT no-op is not a join), and injects actor_uuid, user_id, chunk_x/y/z, first_seen_at and current_player_count. A Redis flush can emit leave then join on later ticks.
UpsertAutomationTriggerInput.functionName ● String scalar
Filter: only this function name. Applies to function_invoked; rejected for property_changed, container_created, player_count_changed, player_left and player_joined.
UpsertAutomationTriggerInput.containerTypeName ● String scalar
Filter: only this container type. For function_invoked this is the type of the invocation's "self" container, so you can watch "this function, on this type". Rejected for player_count_changed, player_left and player_joined.
UpsertAutomationTriggerInput.propertyKey ● String scalar
Filter: only this property key. Applies to property_changed; rejected for function_invoked, container_created, player_count_changed, player_left and player_joined.
UpsertAutomationTriggerInput.writeSource ● String scalar
property_changed only: which writes to observe — "direct" (gameModelSetProperty), "function" (a mutation applied inside a gameModelInvoke, automation run, or timer fire), or "any" (default). Rejected for other events.
UpsertAutomationTriggerInput.debounceMs ● Int scalar
Debounce window in ms. player_count_changed uses trailing-edge coalescing (first previous count plus latest current count/revision); existing model events retain leading-edge suppression.
Member Of
gameModelUpsertAutomationTrigger mutation