With Browser Web Apps
Overview
This guide provides a step-by-step description of integrating the Cuvo Chat Agent into your browser web app.
It covers essential aspects such as configuring the account on the Cuvo platform, including the script in your code base and customisations during integration.
It also provides APIs and properties that can to be used in the Cuvo Chat Agent integration to control it programatically.
Configuring the Product on Cuvo Platform
To configure the product on the Cuvo platform, follow the steps given below.
1. Register and configure an account on the Cuvo portal. For more information, refer to Registering in Cuvo and Creating an Account. After the account is created Configure Chat and Knowledgebase.
After the Chat agent is configured and saved, the Integration Steps section is displayed.

2. Click GENERATE API KEY.
The API Key is generated.

Note: You can regenerate the API Key at any point by clicking the Regenerate icon.
3. Select Web from the Platform dropdown list.
4. Select the language/framework of your app from the Technology dropdown.
5. Navigate to the Code Snippet box under the Agent Integration Details section.
The Code Snippet box has the code necessary for integration with your web application. Here is the sample code snippet.
Note: The actual code might look different from this.

6. Copy that script manually or click the Copy to Clipboard icon on the top right corner of the Code Snippet box.
Now you need to include this CuVo component in your code base.
Including the Cuvo Component in Your Codebase
Once you have successfully created the Widget Script, you must include the Cuvo component in your code base.
1. Open your code base.
2. Paste the widget within the tags of your static index.html page to incorporate it since this is a simple Javascript.
Here is a sample of the pasted script.
Note: The actual code might look different from this.

3. Test the widget to see if the Chat icon is displayed on-screen.

Customizing Additional Options During Integration
At the global window level, an integral object called Cuvo is created to maintain the data and state of the Cuvo feedback agent.
You can use the APIs and Properties of the Cuvo object for the following purposes:
- To display the Cuvo form through your own action elements, such as buttons or other links on your pages.
- To trigger the display of the Cuvo form on actions such as page change, timeout, lack of user activity, etc.
- To submit custom data about the user or application context along with feedback, bug, or request submissions.
- To set customized values in the form, eliminating the need for users to enter them while submitting feedback, bugs, or requests.
For more information, refer to the following sections:
- APIs
- Properties
APIs
The following Cuvo APIs can be used to interact with the Agent at runtime after the app has been loaded:
| API | Purpose |
| Cuvo.hide() | To hide the Chat button on particular screens |
| Cuvo.show() | To show the Chat button again after it is hidden |
| Cuvo.open() | To open the Chat dialog |
| Cuvo.close() | To close the Chat dialog |
| Cuvo.setUserDetails({ email: ‘somebody@somewhere.com’, : , // where key is a string and value is any object … }) | To set details of the user including the email. Example: Window.Cuvo.setUserDetails({ email: ‘somebody@somewhere.com’, id: ‘user_1234567890’, guid: ‘36429hjhoruhf-rhu3uh-u3hfuh’, name: ‘Some Person’ }) |
| Cuvo.setContextDetails({ : , // where key is a string and value is any object … }) ) | To set details of the page context Example: window.Cuvo.setContextDetails({ page: ‘guide-page’, action: ‘guide-menu-click’, loadTime: ‘56390 millisec’ }) |
Properties
The following properties of the CuVo object can be used to pass values to the agent:
| Property | Types and Values | Use |
| ready | boolean Initially: false, When fully loaded: true | To check if the Cuvo feedback agent is fully loaded and available for API calls |
| hidden | boolean default value: false | Set to true if the agent has to start in a hidden state |
| string default value: ‘’ | The email of the user. This can be used when the setEmail API is not available | |
| userDetails | object default value: {} | To set the userDetails to be used during feedback/bug submission. This can be used when the setUserDatils API is not available |
| contextDetails | object default value: {} | To set the contextDetails to be used during feedback/bug submission. This can be used when the setContextDetails API is not available. |