boardme allows you programmatic access to Flows. The API calls help you gain fine-grained control over your user onboarding process.
To use the API you need to have boardme installed into your website or application!
In your application code, you can find boardme on the window object. It is in the global scope.
// To store it you could do:const boardme = window.boardme;// To use it within TypeScript projects could could do:declare const boardme: any;// It is a good idea to play it safe when importing external packages.// A quick check before using the API is good practice!boardme && boardme.apiCall();
You can add boardme to your project by executing the command below in your terminal.
npm install boardme --save
If you are using the boardme API through the installed package, all your calls will be handled gracefully and you don't have to worry about a script import error crashing your application.
You can display flows programmatically by calling this API method. When calling it you have to pass in the unique identifier of the Flow as a string.
flowIdentifier - unique identifier of the Flow as a string.
const flowIdentifier = "aa5d7d44-132e7-4029-8b1a-e44ff75701eg";boardme.renderFlow( flowIdentifier );
You can clear all the onboarding artifacts (Flows, Guides) rendered on the screen by calling this API method.