Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Web Experiences
  • Use Cases

Use the JavaScript API to Launch Flows

Learn how to use the JavaScript API to manually trigger Appcues Flows.

Written by Sofia Domingues

Updated at May 14th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Installation & Developers
    Installing Appcues Web Installing Appcues Mobile API & Data Troubleshooting Extras
  • Installation & Developers
    Installing Appcues Web Installing Appcues Mobile API & Data Troubleshooting Extras
  • Web Experiences
    Building Web Experiences Targeting Studio Customization & Styling Use Cases Troubleshooting FAQ
  • Mobile Experiences
    Installation & Overview Building Mobile Experiences Mobile Analytics & Integrations Troubleshooting
  • Workflows
    Building & Configuration Use Cases Workflow Analytics and Integrations
  • Account Management
    Subscription Users & Data
  • Analytics
    Experience and Event Analytics Data
  • Best Practices
    Best Practices Use Cases Pro Tips Product-led Growth
  • Integrations
    Integration Documents Use Cases Extras
+ More
  • Home

  • Installation & Developers

    • Installation & Developers

      • Web Experiences

        • Mobile Experiences

          • Workflows

            • Account Management

              • Analytics

                • Best Practices

                  • Integrations

                    Appcues is great at naturally showing content in your application when your users navigate from page to page. But sometimes, you might have a situation that requires a bit more finesse over exactly when to begin showing content. When that happens, making use of Appcues's JavaScript API to manually trigger flows can be a great option! 

                    Build Guide

                    This guide presupposes an active Appcues account with Appcues already installed in your application. If you have yet to install Appcues, check out our Installation Overview. 

                    Let's walk through triggering a flow manually using Appcues.show() from directly within your application's code.

                    Step 1: Decide what action in your application will trigger the Appcues flow

                    In this case, I've added a button in my application that I would like to use to trigger an Appcues flow when a user clicks on it. When clicked, it triggers the function, showMoney.

                    For now, nothing happens when you click it other than logging a message in the console.

                    Step 2: Find the flow ID of the flow you want to show

                    The flow ID can be found in the Appcues Studio in the URL while editing the flow, or by clicking on the permalink button, or in the sidebar while editing the flow in the Appcues Builder.

                    Step 3: Add the Appcues.show() call

                    In your application code, add a window.Appcues.show() call into the block of code that runs from the user's action. Remember to paste in the flow ID of your flow!

                    Once you've made this change, you'll need to make sure to push these changes to your live application environment where you're wanting the flow to show.

                    Step 4: Publish the flow

                    If you'd like this flow only to show from users clicking the button, set the flow's trigger to Only manually. 

                    As this will be manually triggered, the flow will ignore all page and targeting conditions and fire for anyone that clicks that button. 

                    Step 5: Test it out

                    With the flow published and the Appcues.show() call live in your code, the flow should begin showing whenever you take the appropriate action. 

                    And that's it! Happy building!

                     

                    Alternate methods:

                    Using Appcues.track() and Event Triggering

                    While the above method works just fine, it can be a bit brittle. If you decide you want to show a different flow, you will need to go into your application's code to change the flow ID. If you have Event Triggering included with your Appcues plan, you could instead track an Appcues event using Appcues.track(). 

                    Not only does this allow you to track how many users have clicked this button from the Events Explorer, but it also makes it easy to show Appcues content or not by setting that event as the trigger directly in the Appcues Studio. 

                     Using a permalink

                    A permalink can be a nice, quick way to launch a flow, especially if you're wanting to first send the user to another page in your application before the flow begins showing. In that case, you can add the flow's permalink into something like an anchor tag, like so:

                    Was this article helpful?

                    Yes
                    No
                    Give feedback about this article

                    Related Articles

                    • Welcome your Users with Appcues
                    • Welcome your Users with Personalized Paths
                    • Get Feedback from your Users with a Flow
                    • Create a Product Tour with Appcues
                    • Create a Step-by-Step Guide using Tooltips
                    DON'T TAKE OUR WORD FOR IT

                    Start building with Appcues for free

                    Try before you buy
                    No credit card required
                    Support included
                    Start building for freeBook a demo
                    or take an interactive tour
                    Appcues logo

                    Product

                    In-app messaging
                    Email
                    Push notifications
                    Workflows
                    Data
                    How it works
                    Pricing
                    What's new

                    Use cases

                    Onboarding
                    Free-trial conversion
                    Feature adoption
                    Feedback
                    Support

                    Integrations

                    Why connect
                    All integrations
                    All workflows

                    Company

                    About
                    Careers
                    HIRING
                    Why Appcues
                    Teams
                    Customers

                    Support

                    Request a demo
                    Start free trial
                    Developer Docs
                    Help Center
                    Customer Success
                    Contact

                    Resources

                    Product Adoption Academy
                    Courses
                    Workshops
                    Templates
                    Examples
                    Made with Appcues
                    The Appcues Blog
                    PLG Collective
                    Product-led Experience Report
                    The Product Experience Playbook
                    The Product-Led Growth Flywheel
                    © 2025 Appcues. All rights reserved.
                    SecurityTerms of ServiceWebsite Terms of UsePrivacy PolicyCookie Preferences
                    Expand