WalkMe API

Updated on April 28, 2019 Download PDFDownload as PDF
Download PDF

WalkMe APIs enable you to incorporate WalkMe actions, such as opening the Player Menu, starting a Walk-Thru, playing a resource, or launching TeachMe course. APIs can be used to launch WalkMe items directly from your site and allows you to re-purpose elements that already exist on your page.

The Short Version

WalkMe APIs can be used after the Snippet has been added to your environment. APIs will help you integrate WalkMe actions directly onto your website elements, such as a button or a drop down.

APIs work well in situations in which you are trying to repurpose an existing website element. The WalkMe API call to open the Player Menu can be integrated into a help icon that is no longer being used or redirects to an old page. By using the API, you can integrate your performance support options such as Walk-Thrus and Resources in to your site. WalkMe API can also start Walk-Thrus with existing tooltips. You can replace your current guidance with Walk-Thrus that are easy to update.

How It Works

WalkMe API uses the same actions the WalkMe or TeachMe player does. By default, WalkMe calls on the server to display WalkMe items. Using API is equivalent to the action of starting a Walk-Thru from the Player Menu, with the exception that the action is hard coded on your environment. WalkMe still communicates with the server to load the item itself, but the call is based from an element on your site.

WalkMe includes APIs which allow you to perform an action, such as start or stop a Walk-Thru, and monitor events which mark specific action within WalkMe, such as the menu opening and closing.

The walkme_ready() Function

The walkme_ready() function can be added to the window via the scripts in your website/application.

It can be implemented as follows:

window.walkme_ready = function() {

// function implementation here:


When WalkMe has fully loaded on your website/application, the walkme_ready() function will be called and executed to do whatever you have programmed it to do.

The WalkMe API 

APIs can be used in combination with events.
For example, we can use an API call to start a Walk-Thru after the menu has been opened:

window.walkme_player_event = function(event) {
      if (event.Type == "BeforeMenuOpen") {

Multiple calls can work together to perform more advanced actions. For example, we can verify that the menu is opened before opening it:

if (WalkMePlayerAPI.isMenuOpen() == false) {

WalkMe API Calls

Check Menu Status WalkMePlayerAPI.isMenuOpen();
Toggle Menu WalkMePlayerAPI.toggleMenu();
Enable/Disable WalkMe logs WalkMeAPI.log.enable()
Track Goals WalkMeAPI.enableLogs(3)
Untrack goals in logs WalkMeAPI.log.untrack(‘goals’)
Start a Walk-Thru from the console WalkMeAPI.startWalkthruById(XXXXX)
Start a Walk-Thru by its index WalkMeAPI.startWalkthruByIndex(1)
Stop running a Walk-Thru WalkMeAPI.stopWalkthru()
Get a list of Live Walk-Thrus WalkMeAPI.getWalkthrus()
View onboarding tasks WalkMeAPI.getTasks()
Get a List of Live Smart Walk-Thrus WalkMeAPI.getFlows ()
Start a Smart Walk-Thrus WalkMeAPI.startFlowById(XXXXX,XXXXX)
*Use Smart Walk-Thru ID followed by the step Node ID.
Stop a Smart Walk-Thru WalkMeAPI.stopFlow(XXXXX)
Start a Survey WalkMeAPI.startSurveyById(XXXXX)
Play a Resource WalkMeAPI.startContentById(XXXXX)

TeachMe API Calls

Open TeachMe TeachMePlayerAPI.toggleMenu(initiator)
Hide TeachMe Player TeachMePlayerAPI.hidePlayer(), TeachMePlayerAPI.hideWalkthruPlayer():
Show TeachMe Player TeachMePlayerAPI.showPlayer(), TeachMePlayerAPI.showWalkthruPlayer():
Remove Default TeachMe Player from Site  TeachMePlayerAPI.removePlayer(), TeachMePlayerAPI.removeWalkthruPlayer():
Remove Attention Grabber to TeachMe Player  TeachMePlayerAPI.removeAttenGrab():
 Redraw TeachMe Player TeachMePlayerAPI.redrawPlayer():
Start Quiz from Specific Course TeachMePlayerAPI.startQuizByCourseId(courseId):
Start Quiz by Quiz Id TeachMePlayerAPI.startQuizByQuizId(quizId):
Open Specific Course in TeachMe TeachMePlayerAPI.toggleCourse(courseId, initiator):
Course Completion Percentage for all Courses TeachMePlayerAPI.getOverallCompletion()
Course Completion for a specific Course TeachMePlayerAPI.getCourseProgress(courseId)
List of all Courses TeachMePlayerAPI.getCourses():
List of Courses with Quiz TeachMePlayerAPI.getCoursesWithQuiz():
List of all Quizzes TeachMePlayerAPI.getQuizzes()

Entering APIs In The Console

WalkMe APIs can be tested and used by entering them into the browser Console while the editor is in preview mode. The Snippet must be embedded on your site, or the editor must be open in order to use APIs through the console. For example, you can check how many Walk-Thrus are currently Live on your implementation.

  1. Open the Console by pressing F12 on your keyboard.
  2. Enter the API command into the console input line

Finding Walk-Thru ID And Index

The Walk-Thru ID can be found by following these steps:
1. Open the Walk-Thru
2. Open the Walk-Thru Settings
3. Open Advanced Settings
4. Find the Walk-Thru ID

The Walk-Thru and ID can also be found with the API Command:  WalkMeAPI.getWalkthrus()
This API will retrieve all published Walk-Thrus in the environment and return the ID and Index.

Types Of Events

To Listen to a WalkMe event, include a callback function in the the windows scope. WalkMe will try to call the function every time an event is fired. The function needs to be declared before the event happens and can be declared even before WalkMe is loaded into the page. There are two different functions that can be written in order to listen to the events:

  • window.walkme_player_event: This will have all the events associated with the Menu
  • window.walkme_event: Events related to WalkMe items and internal WalkMe functionality

In the example below we are waiting for a user to complete a task before displaying an alert.

var importantTaskId = 123456;
window.walkme_event = function(eventData) {
    if (eventData.Type === "SurveyCompleted") {
        if (eventData.ExtraData.TaskId == importantTaskId) {
            alert("Important task completed");

If you need to listen to multiple events, you need to do it inside the same function like so:

window.walkme_player_event = function(eventData) {
     if (eventData.Type === "BeforeMenuOpen") {
       console.log("I'm about to open the menu")

else if (eventData.Type === "AfterMenuOpen") {
     console.log("I warned you... the menu is open.");


Before menu is Opened BeforeMenuOpen
After menu is Opened AfterMenuOpen
Before menu is Closed BeforeMenuClose
After menu is Closed AfterMenuClose
Walk-Thru started WalkthruSelected
Player finish initialization PlayerInitComplete
Next Step Shown NextStepShown
Launcher is Shown LauncherIsShown
Task Completed TaskCompleted
Tasks Loaded TasksLoaded
Launcher Clicked LauncherClicked
Survey Completed SurveyCompleted
Survey Played Survey Played
Balloon Created BalloonCreated
Walk-Thru Stopped Accidentally WalkthruAborted
User Clicks X UserStoppedWalkthru
User Stops Smart Walk-Thru FlowStopped
User Stops Walk-Thru UserStoppedWalkthruAfterStop
Walk-Thru Failed to Start WalkthruFailedToStart
Back Button Clicked BackButtonClicked
Next Button Clicked NextButtonClicked
Done Button Clicked DoneButtonClicked
BBcode Link Clicked BBCodeLinkClicked

Was this article helpful?

Related Articles