Starting a flow from an app event (startFlow)

Last updated: 22 October 2026 · 5 min read

The app can start a flow itself: for example, a “Something is wrong” button on an order screen. When the app calls Clomni.startFlow, Clomni opens a new conversation and starts that event's flow. This trigger exists only in a mobile app (App SDK) inbox.

Steps

  1. 1

    Build the flow

    1. Campaigns › Flows › “New flow”, with the mobile app inbox.
    2. “Settings” › “When it starts”: “App event”.
    3. “Event name”: starts with a lowercase letter, holds only lowercase letters, digits and _, up to 64 characters. For example order_problem. An event name belongs to one flow per inbox.
    4. “Expected data fields”: the names of the data the app will send, e.g. order_id. A name starts with a letter or _.
    5. Build the steps, set the status to “Active” and press “Publish”.
  2. 2

    Call it from the app

    In “Settings”, “How the app calls it” shows ready code for Android, iOS, React Native and Flutter. For example:

    Clomni.startFlow("order_problem", mapOf("order_id" to "A-1042"), openMessenger = true, source = "order_screen")

    openMessenger = true opens the messenger at once. For an event the user did not tap themselves (a failed payment, say), keep false: the user learns of it from a push or the unread count. source becomes the conversation's “Opened from”; without it, event:order_problem.

  3. 3

    The data in text

    Write the data as {{data.order_id}}; it is also offered under “Insert a variable”. A nested field is {{data.order.id}}. The data is a JSON object of at most 8 KB. A field the app did not send is left empty.

  4. 4

    If it does not work

    • Pass startFlow the “Event name”, not the flow's name.
    • With no active, published flow for the event, nothing happens and no conversation opens.
    • A user outside “Who sees it” does not get the flow.
    • A “When a conversation starts” flow never starts from startFlow.
  5. 5

    The event is remembered

    Even with no flow, the event is kept for 90 days. The “Condition” step's “App event” check branches on whether the user's app sent it in the last N days (1 to 90, 30 by default).

Document