- Domain Address: The domain where the web chat will be deployed.
- Client Id: A unique key that identifies a specific Syllable AI target. For information on how to create a Client Id, please contact Syllable AI support at support@syllable.ai.
Installation
You have two options for installing Syllable Web Chat:NPM
To install via NPM, run the following command:npm install @syllableai/webchat
CDN
To include the web chat directly from our CDN, use the following script tag. Replace [VERSION] with the specific version you want to use (e.g., 1.0.0):<script async src="https://cdn.syllable.ai/scripts/webchat/syllable-webchat.
[VERSION]
.min.js" />
Alternatively, you can use the latest version:
<script async src="https://cdn.syllable.ai/scripts/webchat/syllable-webchat.latest.min.js" />
Usage
You have two options for using Syllable Web Chat. For either method, you should replace ‘MY_CLIENT_ID’with your valid Client ID.NPM using JavaScript or Typescript
CDN directly in HTML
Add this script above the HTML<body>
element:
Add Optional Container
Optionally, add a div container to your HTML where the Syllable Web Chat will be rendered (if not specified, Syllable Web Chat will be appended to the bottom of HTML body tag):<div id="syllable-webchat-container"></div>
You may need to adjust the z-index of this div container based on your layout.