List view
Understanding Nobi
Understanding Nobi
Getting Started
Getting Started
Implementing Nobi On Your Site
Implementing Nobi On Your Site
Ecommerce Merchandising
Ecommerce Merchandising
Reporting & Analytics
Reporting & Analytics
Beta Products
Beta Products
Developers Guide
Developers Guide
References
References
Javascript API For Launching Nobi
The JavaScript API lets you open and close Nobi from your own code instead of using Nobi's built-in components. This gives you complete control over when and how the chat modal appears.
When to Use the JavaScript API
- Custom buttons or UI elements - Trigger Nobi from your own buttons, links, or interface elements
- Complex user flows - Open Nobi based on specific user actions or conditions (scrolling, time on page, exit intent)
- Form submissions - Take input from your own forms and pass it to Nobi
- Navigation integration - Launch Nobi from menu items, dropdowns, or custom navigation
- Conditional triggering - Show Nobi only to certain users, on certain pages, or under specific conditions
The JavaScript API is for developers who want full control over Nobi's behavior beyond what the standard components provide.
How It Works
Load the Nobi script and initialize it with your merchant ID. Then use simple JavaScript commands to open or close the chat modal:
// Load and initialize Nobi Nobi.initialize({ merchantId: "YOUR_MERCHANT_ID" }); // Open the chat Nobi.openChat(); // Close the chat Nobi.closeChat();
You can call these methods from anywhere in your code: click handlers, form submissions, timers, scroll events, or any other JavaScript trigger.
See the JavaScript API Technical Reference to learn more.