Build your own UI

Learn how to build your own mobile Chat UI with the Kustomer Core SDK.

If you want to build your own chat widget, but still send information into Kustomer APIs, this guide shows you how to get started with the Kustomer Chat 2.0 Core SDK.

The Core SDK sits between your custom chat widget and the Kustomer APIs, making it easier for you to build a custom chat experience.

Initialize chat

To get started with KustomerCore, you can copy the following code snippet and insert the script before the closing body </body> tag in the HTML file for the web page:

  • Replace YOUR_API_KEY with your API Key
  • Replace YOUR_OWN_CHAT_WIDGET_JAVASCRIPT with your chat widget code
<!--Loads KustomerCore -->
<script
  src="https://cdn.kustomerapp.com/chat-web/core.js"
  data-kustomer-api-key="YOUR_API_KEY"
></script>

<!-- Make sure you load our core.js code first -->
<script src="YOUR_OWN_CHAT_WIDGET_JAVASCRIPT"></script>

Then in your own chat widget UI JavaScript, you would be able to call our KustomerCore methods.

// 
class YourChatWidget extends Component {
  constructor(props) {
    //...
  }
  
  componentDidMount() {
    KustomerCore.init();
  }
    
  render() {
    //...
  }
}