Skip to content

Enterprise WeChat Data Q&A Bot Configuration

Prerequisites

You need to configure the enterprise WeChat authentication method in the HENGSHI system. For detailed steps, refer to the Authentication Methods section regarding enterprise WeChat. Complete this configuration first before proceeding with the following steps.

Create a Bot App in Enterprise WeChat

1. Create an Enterprise WeChat App

In the Enterprise WeChat app management, create an app, set the logo, name, description, visibility scope, and other information. Click "Create App" to complete the creation.

Create Bot App

2. Obtain Enterprise WeChat AgentId, Secret, Token for Receiving Messages API, and EncodingAESKey

On the settings page of the newly created Enterprise WeChat application, copy the AgentId and Secret information and save them for later use in configuring the Q&A bot within the HENGSHI SENSE system. Click on the "Receive Messages" feature and select "Set API Reception." Randomly generate the Token and EncodingAESKey, and save them for later use in configuring the Q&A bot within the HENGSHI SENSE system. Since the server URL for receiving messages has not been determined yet, click "Cancel" to return.

Obtain AgentId and other information

Obtain Token and other information

Configure Robots in HENGSHI System

1. Configure Data Package and Bot Information

We have already obtained the AgentId, Secret, Token, and EncodingAESKey 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 the box for WeCom, and fill in the AgentId, Secret, Token, and EncodingAESKey information into the corresponding fields, then save. After saving, copy the URL field information and keep it for later use when setting the message callback address in the WeCom application.

Data Package Bot Settings

Data Package Bot Settings WeCom

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 outlined in HENGSHI ChatBI regarding "Enhancing the Understanding Capability of Large Models," including "Data Vectorization," among others.

2. Configure Data Permissions

Users logging into HENGSHI SENSE via Enterprise WeChat are granted view-only permissions by default, and datasets are not readable by default. You can authorize 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 into HENGSHI SENSE via Enterprise WeChat. Permissions can also be configured based on user attributes. For more information, please refer to the documentation related to HENGSHI SENSE data permissions.

Continue Setting Up Bot Applications in WeCom

1. Set Up Enterprise WeChat to Receive Messages

On the settings page of the newly created Enterprise WeChat application, click the "Receive Messages" feature and select "Set API Reception." Enter the Token and EncodingAESKey you just saved, along with the URL obtained from the HENGSHI SENSE system, into the corresponding fields. For the message event types, check "User Sent Regular Messages" only; other events can be left unchecked. Then click "Save."

Configure Message Reception

2. Set Enterprise Trusted IPs

The enterprise WeChat application receiving messages needs to configure a list of trusted IPs for the enterprise. This list consists of the outbound IPs of the server where HENGSHI SENSE is located. Multiple IPs can be set, separated by semicolons. Failure to configure this list will result in communication failure between enterprise WeChat and HENGSHI SENSE.

Set Enterprise Trusted IPs

Chat with the Bot in the WeCom Chat Window

In WeCom, search for the bot by the name of the WeCom app you just created. You can find the bot under "App Notifications" and start chatting.

Search Bot

The chat interaction looks as follows:

Chat Interaction

User Manual for Hengshi Analysis Platform