Skip to content

DingTalk Data Q&A Bot Configuration

Prerequisites

It is necessary to configure the DingTalk authentication method in the HENGSHI system. For detailed steps, refer to the DingTalk section in Authentication Methods. Complete this configuration before proceeding with the following steps.

Please note that in scenarios where the DingTalk Data Q&A bot is enabled, the CorpId field must be filled in the DingTalk authentication configuration in the HENGSHI system. Additionally, if DingTalk users have not logged into the HENGSHI system before, the HENGSHI system's address will be required for redirecting to the login application. Therefore, you need to configure the HENGSHI system's Base URL.

Create a Bot App in DingTalk

1. Create DingTalk Application

In the DingTalk Open Platform backend management, under Application Development, create an enterprise internal application in DingTalk Application Management. Set the logo, name, description, and other information, then click "Save" to complete the creation.

Create Bot Application

2. Obtain DingTalk Client ID, Client Secret, and Other Information

On the "Credentials and Basic Information" section of the newly created DingTalk application settings page, copy the Client ID and Client Secret information and save them. These will be needed later when configuring the Q&A chatbot in the HENGSHI SENSE system.

Obtain Client ID and Other Information

3. Add DingTalk App Bot Capability

On the newly created DingTalk app settings page, in the "Add App Capability" section, add the "Bot" capability.

Add Bot Capability

4. Configure DingTalk App Bot

The bot capabilities added in the previous step need to be configured. Please turn on the "Bot Configuration" switch and configure it as required. Select "Stream Mode" for the "Message Receiving Mode." After completing the configuration, click "Publish" to publish the bot.

Bot Configuration

5. Publish App

DingTalk apps need to be published before they can be used, and they must pass the review process.

Publish App

Configure Robots in HENGSHI System

1. Configure Data Package and Bot Information

We have already obtained the Client ID, Client Secret, and other information above. These details need to be configured in the HENGSHI system and bound to the HENGSHI data package. In the bot settings on the data package settings page, check DingTalk, fill in the Client ID and Client Secret information into the corresponding fields, and save.

Data Package Bot Settings

Data Package Bot Settings DingTalk

Once the data package is selected, all datasets under the package are bound, and the data required to answer user questions will be queried from these datasets. Note that the data package needs to be preprocessed according to the steps in HENGSHI ChatBI regarding "Enhancing the Understanding Capability of Large Models," including "Data Vectorization," among others.

2. Configure Data Permissions

Users who log in to HENGSHI SENSE via DingTalk are granted view-only permissions by default, and datasets are not readable by default. You can grant the "Viewer" permission for datasets to the ALL_USERS user group, which is a quicker method but offers a coarser level of control. Alternatively, you can set data permissions individually for each user who has logged in to HENGSHI SENSE via DingTalk. Permissions can also be configured based on user attributes. For more information, please refer to the documentation related to HENGSHI SENSE data permissions.

Chat with the Bot in DingTalk Chat Window

Search for the bot in DingTalk using the name of the DingTalk app you just created. Once found, select the bot to start a conversation.

Search Bot

The conversation will look like this:

Conversation Effect

User Manual for Hengshi Analysis Platform