- Actions — the individual steps Rey runs (save a row, navigate, show an alert, and so on).
- Rules — optional conditional if/then/else branches that decide when actions run.
How logic works
Select a component and open the Logic tab in the property toolbar above it to build its behavior. Every logic flow has:- A trigger — the event that starts it (a button tap, a screen opening, a form submit).
- One or more actions — the steps that run in response.
- Optional rules — conditions that gate whether actions run.
Triggers
A trigger is the event that fires your actions. Select a component and open the Logic tab in its property toolbar to choose from the available triggers for that component type:When tapped
Fires when the user taps or clicks the component. The most common trigger for buttons, cards, and list items.
Screen load
Fires automatically when a screen opens. Use it to check a condition, set a user variable, or navigate elsewhere on entry.
Form submit
Fires when the user submits a form. Rey validates required fields before running the actions.
Action types
After choosing a trigger, pick an action from the dropdown. You can chain multiple actions together to build multi-step flows.Play audio — play a sound or track
Play audio — play a sound or track
Play an audio file when the action fires. Use it for sound effects on taps, background music on a screen load, or playing a track selected from a list.You can play a static uploaded file or bind the source to an
audio field on the current entry — for example, playing the track a user tapped in a playlist.Show paywall — prompt the user to subscribe
Show paywall — prompt the user to subscribe
Show your app’s paywall so the user can start a subscription or one-time purchase. Rey routes the paywall through your configured in-app purchase provider.Use this to gate premium screens, unlock exclusive content, or convert free users at the moment they hit a limit.
Show flash message — display a toast
Show flash message — display a toast
Display a brief toast notification that disappears automatically. Best for non-critical feedback like
"Saved successfully", "Link copied", or "Please fill in all required fields".The message supports dynamic text — bind it to a data value if needed.Open link — launch an external URL
Open link — launch an external URL
Open a URL in the device’s browser (or in an in-app webview). Enter a static URL or bind it to a data field — for example, open a
website_url field value from the current entry.Use this for linking to external websites, downloadable files, or deep links into other apps.Set user variable — store a value for the current user
Set user variable — store a value for the current user
Save a value to a user variable that persists across screens and app launches for the signed-in user. Use it to remember preferences (dark mode on/off), track onboarding state (completed the intro), or cache the last selected filter.Choose the variable, then set it to a static value, a form field’s current value, or a value from the current entry.
Show review prompt — ask the user to rate your app
Show review prompt — ask the user to rate your app
Trigger the native App Store or Google Play review prompt so the user can rate your app without leaving it. The OS controls how often the prompt can actually appear, so it’s safe to call after positive moments (finishing a workout, completing a purchase).
Show notifications prompt — request push permission
Show notifications prompt — request push permission
Ask the user to allow push notifications. Trigger this after the user experiences value — for example, after they save their first item — to improve opt-in rates.Pair it with a Set user variable action to remember that you’ve already asked, so you don’t prompt repeatedly.
Applying rules
Rules let you wrap your actions in conditional if/then/else logic so they only run when certain criteria are met.Open Apply rules
In the Logic tab of the property toolbar, click Apply rules to open the rules editor.
Define the If condition
Under If, click Add condition and choose a data field or app state variable, select a comparison operator (equals, does not equal, is greater than, contains, is empty, etc.), and enter or bind the comparison value.
Set the Then branch
Choose what happens when the condition is met — either Do nothing or an action to run.
Set the Else branch (optional)
Choose what happens when the condition is not met — for example, show an error toast if validation fails.
Conditions can reference form field values, database fields, the current user’s profile fields, screen parameters, or device state (such as whether the user is logged in). This lets you create branching logic entirely without code.
Chaining multiple actions
A single trigger can run as many actions as you need — they execute in order from top to bottom. To chain actions:- Add your first action and configure it.
- Click + Add action below it to add the next step.
- Drag actions up or down by their handle to reorder them.
- Continue adding actions until the sequence is complete.
Actions run sequentially. Each action waits for the previous one to complete before starting. If an action encounters an error (for example, a required field is empty), subsequent actions in the chain do not run.
Example: a “Start free trial” button
Here’s a complete, real-world flow that gates a premium screen behind a paywall and confirms the outcome — illustrating triggers, chained actions, and rules working together.Set the trigger
Select the Start free trial button on your upsell screen. Open the Logic tab in the property toolbar and set the trigger to When tapped.
Action 1 — Show the paywall
Add a Show paywall action. Rey opens your configured in-app purchase sheet so the user can start a subscription.
Action 2 — Confirm with a flash message
Add a Show flash message action with the text
"You're in! Welcome to Pro." This reassures the user after a successful purchase.