Pocket StationPocket Station
Automations

Conditions and variables

Write CEL conditions about an account and reuse action results in later blocks.

An If / Else condition is a yes-or-no question about the account written in CEL. For example, size(claimable_mission_ids) > 0 means some missions are ready to claim.

Write a condition

  • Builder mode: each row is a field, operator, and value. Every row must be true; Add Condition adds one.
  • Raw CEL mode: type the expression; Insert variable adds fields. Conditions that use || or grouping open in this mode.

An If / Else block in Builder mode with the row "Booster Vitality > 0" and an Open Pack block under Then.

Account fields

Insert variable lists these under Summary Fields, and earlier bindings under Variables. "Vitality" is the game's stamina.

FieldExpression
Player Levelplayer_level
Number of Cardsnumber_of_cards
Booster Vitalitybooster_vitality.amount
Wonder Pick Vitalitymiracle_pick_vitality.amount
Trade Vitalitytrade_vitality.amount
Event Battle Vitalityevent_battle_vitality.amount
Pack Hourglassespack_hourglasses.total_item_count
Wonder Pick Hourglassesmiracle_pick_hourglasses.total_item_count
Event Hourglassesevent_hourglasses.total_item_count
Trade Hourglassestrade_hourglasses.total_item_count
Has Claimable Rewardsreward_inbox.has_claimable_items
Claimable Missions Countsize(claimable_mission_ids)

Expressions and output variables

On Add Friend, Approve Friend Request, and Remove Friend, the Expression (CEL) toggle in Parameters computes the player ID from account data. Automation JSON lists the exact fields.

Bind output to variable names an action's result for later blocks. Names use letters, digits, and underscores, can't start with a digit, and must be unique in the workflow. Don't use summary, true, false, null, or an account field name.

A bound result is a map of strings: numbers and true/false become text, and nested values become JSON text. Convert a value before comparing it, for example int(my_result.count) > 0.

On this page