Web Widget
This feature enables you to seamlessly integrate your Copilot into your existing website, providing easy access for visitors.
General
-
Audio Transcription for converting voice to text.
-
The AI Web Call feature allows users to make calls directly from the web widget.
-
You can also adjust the Copilot Position on the Website.
Note: Activating this feature will consume platform credits with each call. Ensure that your account has sufficient credits to continue using this feature without interruptions.
-
Logged In Users Only
When the “Logged In Users Only" toggle is enabled, the widget will only be visible to users who have signed in. This means that only authenticated users can access the widget.
Set user context
- To activate this feature, you need to use the
setUser
event to provide the necessary user details to the widget for authentication. If the details are not passed, the user will not be able to interact with the Copilot chatbot. - Use the following event to provide the necessary information:
window?.copilot?.("event", "setUser", {
hostId: "12312", # Mandatory
email: "[email protected]",
name: `Rohan`,
additionalFields: {
orgId:123,
},
})
Note: Either the Email or Name field (or both) must be provided in addition to the Id. This ensures sufficient information for user identification and interaction.
Field | DataType | Description | |
---|---|---|---|
hostId | String | The hostId is a unique identifier assigned to each user, and it is mandatory to include this field. | |
String | The user’s email address. It's not necessary, but it's helpful for extra identification and communication. | ||
name | String | The user's full name, used to personalize interactions. | |
phone | Integer | The user’s phone number. It’s not mandatory but can be useful for contact purposes. | |
profilePicUrl | String | A URL to the user’s profile picture. It’s not mandatory but can enhance user profiles with a visual element. | |
Additional details | Object | Additional details like age, gender, and interests can improve your Copilot chatbot’s responses. You can also add other relevant information to better tailor interactions if needed. |
unsetUser
- When a user logs out, you’ll need to pass the necessary details using the
unsetUser
event to clear their session from the widget. - Use the following event to log out a user:
window?.copilot?.("event", "unsetUser")
Embed Code
To add the Copilot to your website, copy and paste the following code into your webpage: