
Have you come up with new ideas for a conversational assistant but only have chat set up in a production environment?
If so, you’re in the right place! In this blog, I’ll guide you through creating a quick and easy HTML file to test different brands and assistants.
Setting this up is straightforward and doesn’t require much coding experience. Here’s how to get started:
.html extension.Now that you have your HTML file ready, it’s time to add the basic structure needed for your chat code. You only need a simple heading tag to allow the chat to render. Here’s what it should look like:
<h2>Test Chat</h2>
Feel free to add some content to make the page look less blank! For example, you can use:
<h2>Test Chat</h2>
Next, head over to your chat SDK code from the SDK tab on the chat configuration page. Don’t forget to create an API key by clicking the “Generate API Key” button.
Once you have your SDK code, copy it and paste it below the <h2> tag in your HTML file. After that, save your file.
Open your HTML file in a web browser to see if the chat loads correctly.
If the chat doesn’t load, there might be some configuration issues preventing it from running locally. The most common cause is related to settings on the Domains tab of the chat setup page.
Once your chat is up and running, create a new “test” assistant. After creating it, copy the assistant ID (you can find where to do this in the screenshot provided).
The last step is to add the assistant ID into your Kustomer.start() method in the SDK. Your final code should resemble this:
Kustomer.start({
assistantId: 'YOUR_ASSISTANT_ID'
});
Once your code looks like this, open the file in your browser again, and you’ll be ready to test your chat!
Happy testing!