Chat Widget Parameters
Required Data Attributes
data-curatu-user-id
Description: Unique identifier for each user, system automatically generates it.
Example: data-curatu-user-id="528sc37d-e6x5-*******"
data-curatu-knowledge-base
Description: Identifier for the knowledge base that the chat widget will interact with, ensuring relevant responses and information are available during chat sessions. System automatically generates it.
Example: data-curatu-knowledge-base="hgsh3245-xns3-********"
data-curatu-api-key
Description: API key used to authenticate requests from the chat widget to the backend services. This is essential for maintaining security and integrity of data exchanges. System automatically generates it.
Example: data-curatu-api-key="xcets2233*****"
Optional Data Attributes
data-curatu-image
Description: URL of the image to be used for the chat icon.
Default: If not specified, default image will be displayed.
Example: data-curatu-image="https://images.ctfassets.net/bedcewdch232/cdewghdew26372362/jhcdhewjdvewjdvewdhew/[icon_name].png"
data-curatu-image-width
and data-curatu-image-height
Description: Width and height of the chat icon image in pixels. The value provided must only include number. Do not include px.
Default: 140px
for both width and height if not specified.
Example: data-curatu-image-width="100"
, data-curatu-image-height="100"
data-curatu-notification-message-title
and data-curatu-notification-message-body
Description: Title and body of the notification message that appears when the widget loads. If you leave this empty it will not show notification message.
Example:
data-curatu-notification-message-title="Welcome to Curatu Support!"
data-curatu-notification-message-body="Hello! 👋 Need help or have questions? Just ask away!"
data-curatu-notification-message-delay
Description: Delay in milliseconds before the notification message is displayed after the widget is loaded.
Default: 15000
milliseconds (15 seconds) if not specified.
Example: data-curatu-notification-message-delay="7000"
Integration Example
Here is an example of how you can integrate the Curatu Chat Widget with all the attributes discussed:
<script
data-curatu-user-id="528sc37d-e6x5-*******"
data-curatu-knowledge-base="hgsh3245-xns3-********"
data-curatu-api-key="xcets2233*****"
data-curatu-image="https://images.ctfassets.net/bedcewdch232/cdewghdew26372362/jhcdhewjdvewjdvewdhew/[icon_name].png"
data-curatu-image-width="100"
data-curatu-image-height="100"
data-curatu-notification-message-title="Welcome to Curatu Support!"
data-curatu-notification-message-body="Hello! 👋 Need help or have questions? Just ask away!"
data-curatu-notification-message-delay="7000"
></script>
When you copy the script from the API section of the dashboard, it will only include the required parameters. You can add additional parameters as per the options listed above.
Example code from API section
<div id="curatu-root"></div>
<script
src="https://static.curatu.ai/static/0.0.8/export.js"
data-curatu-user-id="528sc37d-e6x5-*******"
data-curatu-knowledge-base="hgsh3245-xns3-********"
data-curatu-api-key="xcets2233*****">
</script>
Chatbot widget will be loaded inside this div<div id="curatu-root"></div>
. src
attribute loads required JS and CSS files.