Critical Moments Docs
Quick StartHomepageAccount
  • Documentation Home
  • What is Critical Moments?
  • Quick Start
  • Concepts Overview
  • Remote Control / Service
    • Host Config on Github Pages
  • Config File Structure
  • Demo App
  • Homepage & Account
  • 📚Guides
    • Mobile App Toolbox: 13 Features Most Apps Need
    • Reduce App Churn with Notifications
    • Improve your App Store Rating
    • Feature Flags Guide
  • ⏰Notifications
    • Intro to Notifications
    • Notifications Spec
    • Smart Delivery
    • Badges
  • 🎯Conditional Targeting
    • Intro to Conditions
    • Built-in Properties
    • Custom Properties
    • Syntax and Operators
    • Conditional Guides
      • Working with Dates
      • Locations and Weather
      • Event and Property History
  • 🎪Events
    • Event Overview
    • Recommended Events
    • Built-In Events
  • 💬Actions / In App Messaging
    • Actions Overview
    • Modals
      • Modal Content Sections
      • Modal Buttons
      • Modal Images
    • Banners
    • Alerts
    • App Reviews
    • Open Link
    • Custom Actions
    • Conditional Actions
    • Triggers
  • 🎨Themes
    • Theme Overview
    • Built In Themes
  • ⛳Feature Flags
    • Feature Flag Guide
    • Conditional Feature Flags
    • Named Conditions Config
  • 🔑Trustless SaaS
  • 👋Support
  • 👩‍💻SDK API Reference
Powered by GitBook
On this page
  • Action Types
  • Themes
  • Configuration Example
  • Triggering Actions

Was this helpful?

  1. Actions / In App Messaging

Actions Overview

Trigger actions when events occur, or conditions are met

Last updated 1 year ago

Was this helpful?

Action Types

Our SDK comes with a number of powerful actions built in:

  • display a banner across the top/bottom of your app, optionally linking to other actions when tapped

  • : show a fullscreen popover with fully native UI. Create beautiful detailed UI with support for images, titles, text, buttons and theming. Buttons can connect to other actions.

  • : show the system native UI asking a user to rate your app

  • : launch native alerts, with buttons connecting to other actions.

  • : in an embedded brower displaying a webpage inside your app, or opening in the user's default browser

  • : Launch custom actions/deeplinks into other parts of your app

  • : Launch other apps, optional deeplinking to specific features

  • : check a condition, and fire one action if true, and another if false

An alternative to actions are our , which allow deeper integration into your codebase.

Themes

Our action UI can be themed to match the design of your app. .

Configuration Example

Actions are created in your . A top level actions object contains an namedActions map/object, with subitems for each action.

Each action requires an actionType string and actionData object. The contents of each are described in the docs for the each action type.

Actions can optionally include a condition string, which will be evaluated before triggering the action, and will stop the action from being performed if it evaluates to false (or errors).

Actions can also specify a fallback, a string name of an action to perform if this action can't be performed for any reason. Reasons an action might fail vary based on the action type, but as an example, attempting to launch an app deep link into an app which isn't installed will fail, and can fallback to another action, like launching an app store link to get that app.

Example:

"actions": {
     "namedActions": {
         "landscapeAlert": {
             "actionType": "alert",
             "condition": "interface_orientation == 'landscape'",
             "actionData": {
                 "title": "Launched Landscape",
                 "message": "The app was launched while in landscape orientation."
             }
         },
         "portraitAlert": {
             "actionType": "alert",
             "condition": "interface_orientation == 'portrait'",
             "actionData": {
                 "title": "Launched Portrait",
                 "message": "The app was launched while in portrait orientation."
             }
         }
     }
 }

Triggering Actions

  • Nested Actions: actions like alerts, modals and banners can have buttons which can be connected to other actions which are fired when the user taps them. For example, a "more info" button could launch an open link action to your webpage for more info.

Actions are connected to the rest of the system through the , by the name specified in the namedActions map. The following parts of the config file can trigger an action:

connect actions to events. You can fire an action when an event occurs.

: are actions which check a condition, and fire one action by name if true, and another if false

💬
config file
Triggers
Conditional actions
Announcement banner:
Modals Popovers / Custom Messaging
App Review Prompt
Alerts and Action sheets
Open web links
Custom actions
Open other apps
Conditional actions
feature flags
config file
See docs