loading

Customizing the messenger

Enchant Messenger comes with a JavaScript Messenger API to customize the behavior of the messenger. You can use this to make the messenger do different things based on the page the customer is viewing or when a visitor interacts with your website.

Pass customer name and email to the messenger

You can use the API to specify a name and email that will be used to pre-fill the live chat form and contact form. This allows you to pass the information without requiring the customer to enter it manually. It makes sense to do this if you already know who the customer, for example when they are logged-in to your website.

Use a custom launcher button

Sometimes, you want to have a more prominent launcher or have the launcher appear at a certain spot on your website. For this you can create your own custom launcher button that can open the messenger when clicked using the API methods.

Hiding the default launcher

API enables you to hide the default messenger launcher. You might want to hide the launcher and only show it in certain cases. Or perhaps, you need to hide the launcher because you're using your own custom launcher.

Hiding the knowledge base from messenger in certain conditions

Sometimes, you have multiple places where you're using the same messenger and don't want the knowledge base shown for all of them. For example, inside your app, you've the knowledge base enabled to help existing customer find answers when they have a question. But you may want the messenger to only show chat/contact options on your marketing site to encourage new visitors to reach out. JavaScript API provides a way to disable knowledge base on some pages.

See the full selection of available methods and code samples to help you get started on the Messenger API page.