Home > Article > WeChat Applet > C# Development of WeChat Portal and Application-WeChat Portal Application Management System Function Introduction
Recently conducted in-depth research on the WeChat interface. By encapsulating the underlying interface step by step, it gradually upgraded to automated configuration, automated response, and optimization and improvement of the background processing interface, striving to build a more complete and applicable WeChat Portal application management system.
The WeChat portal application management system adopts the route based on MVC+EasyUI. Since most domain name servers can only support .NET4.0, it uses MVC3 and C#4.0 as the development basis and can basically be deployed on on any .NET server.
In the WeChat portal system, the following functional operations are implemented:
1) Realize the dynamic configuration of the menu and update it to the server;
2) Dynamically define events and responses Messages to realize menu action responses to different industries and different needs;
3) Dynamic response instruction configuration processing to realize message processing of the entire response chain;
4) Obtain subscribers and users Group information, and can implement operations such as maintenance of user group information;
5) Manage and update multimedia files, graphic messages and other content to facilitate preparation for customer push messages.
6) Use the group messaging function to send messages to selected subscribers or groups.
Manage menus in the system and submit the menus to the server to achieve dynamic configuration and generation of menus, which can provide benefits for our system Adapt to various needs and achieve flexible processing.
The adding interface of WeChat menu is as follows.
The modification interface of the WeChat menu is as follows
The WeChat menu definition is stored in the database and can be submitted if needed To take effect on the WeChat server, you need to call the WeChat API interface for processing. I added a processing method to submit to the server in the Controller of the page.
On the portal of the WeChat service account, the menu performance is as follows.
For dynamically generated menus, in most cases it is used as a Click method, that is, each menu event needs to be defined. For the event response operation of the menu, if we use WeChat, we can understand that WeChat's processing events can generally respond to user text messages, picture messages, graphic messages, etc. Under normal circumstances, text messages or graphic messages are generally used.
In order to further realize the reuse of response content, we manage the event definition and content definition of the menu separately. The event definition can use multiple text messages or multiple graphic messages to combine, so that it can be achieved A more flexible usage environment.
Add event definition as shown below
The response content encoding of the event can be entered or selected from "Edit" button, when selecting the "Edit" button, the system pops up a dialog box for the user to select the response content encoding of the event.
After completing the selection, return to the original new interface, and you will see that the returned record is the record we selected.
#The editing interface of WeChat events is as shown below, similar to the content of the new interface.
As mentioned above, menu events are processed through associated event coding, and the event itself can combine multiple message contents , so the message content is the smallest unit in response to customer operations. They can be a text message, a graphic message, or a combination of multiple messages (of the same type).
In order to facilitate management, I divided the messages into graphic, instruction, and text types. If necessary, it can be refined into other types of messages as needed.
The interface for adding message content is as follows.
#The mobile interface effect of text message is as follows.
Whether it is a text message or a graphic message, we define the message according to the definition of graphic message. If it is a text message, we only need to get the description content as the message The main body is enough.
The editing interface of graphic messages is as shown below. The main thing is to fill in the complete content and pictures, as well as the detailed links to the page.
The above message of the customer relationship management system, the interface effect displayed on the mobile phone is as follows. Click the link to switch to the message jump link address.
The maintenance of response instructions is somewhat similar to event management. It mainly means defining some used instructions to facilitate construction. The response chain of the response system enables step-by-step operation instructions.
After setting the response command in the background, the system can process it according to the response command chain. First we need to provide a prompt interface for entering the response chain, as shown below.
But after we select the answering system in the menu, the system returns a text prompt interface, as shown below.
This interface prompts some buttons, including several fixed buttons and some business buttons. Enter a simple 1~6 to respond to the selection.
We see the above interface. After entering command 1, the system enters the next level of response command, and then lists several input keys and content prompts.
When we continue to enter business button 1, the response is a graphic message, which is also a detailed description of the button.
At this time, we can also enter the * key to return to the previous menu.
Enter 0 to enter the customer service dialogue mode. Any subsequent messages you send will be forwarded to the multi-customer service system.
When the user sends a message, the customer service assistant can receive the message in time and process the customer's response.
In order to more effectively manage subscriber and group information, we can obtain relevant information from the WeChat server for our understanding The following user information can also prepare for subsequent group messages.
The management of subscriber users is as follows. By default, you can view it through the user's region. The region is expanded according to the following levels: country-province-city. Click Sync Data to download user data on the server to the local for updating or writing.
Subscribers can also be viewed according to groups
Double-click to view subscriber information and view subscriber information The detailed information interface is shown below.
Create group The interface is shown below.
The editing group information interface is as shown below.
When the group is edited and saved, the system will remember the modified ones. During synchronization, the newly added local content will be created on the server; the modified group name will be modified on the server. Then perform synchronization list processing.
Multimedia management refers to uploading local files to the WeChat server for storage to facilitate the sending of information. Wait for the operation. WeChat requires that certain information must be uploaded to the server before it can be sent using its media ID.
After the file is successfully uploaded to the server, the "File Upload Identity" in the list is a string of BASE64 encoded data, and there is also an upload timestamp (because the WeChat server only retains 3 days of media data, Data that has expired will be automatically deleted.
At the same time, there are two important functions above the list: uploading selected records and re-uploading expired records to facilitate the updating of our own multimedia files. Operation.
The adding interface operation is as follows, which introduces the attachment upload control for file operation, which is very convenient. At the same time, the successfully uploaded files will be listed in the list. Out.
##Multimedia files can be in the following ways: pictures, voices, videos, thumbnails. The saved data records, file upload identifiers and timestamps are all empty. If we want to use them, we must upload them to WeChat's server, and then send the information based on its MediaId. The operation interface for uploading the selected records is as follows As shown.##After the multimedia file is successfully uploaded, the recorded information is as follows
##9. Pictures and texts. Message processing
Text messages are divided into single picture and text messages and multiple picture and text messages. Single picture and text messages are as follows Multiple picture and text messages. The text message is as follows:Like multimedia data management, graphic and text messages are also managed in the same way. They are uploaded to the server first, and then the message is sent. , multimedia messages also have time restrictions. The specific management interface in our WeChat portal platform is as follows
##The interface for adding graphic messages is as follows, save. After that, you can continue to add multi-image and text message content in the "Other Image and Text List" in the editing interface.
In the adding interface, select the thumbnail of the graphic message, which is specified by selection. Only the image or thumbnail resource has been uploaded to the server.
The added multi-image and text list can be viewed and managed.
After saving the record, then continue to upload. The uploaded record interface is as shown below. After success, an uploaded server ID and timestamp will be returned, otherwise an error will be prompted.
In order to facilitate recording customer input and sending information, we record user input data in the WeChat portal management platform, specifically The session message management interface is shown below.
We can double-click any record in the last 48 hours to send messages to the customers we are following. If the message is sent successfully, the user will see it in their WeChat account on the phone. You will receive relevant sent messages.
In order to carry out corresponding marketing operations for customers, sometimes we need to send group messages to designated group owners or personnel , allowing customers to regularly understand our product information and activities.
Due to group messaging, in addition to text messages, which can be directly edited and sent, other data must be multimedia files or graphic message content uploaded to the server, so the previous multimedia management and graphic message management are Mainly introduced for the purpose of group messaging. With the above multimedia and multi-image information, we can select records from the platform to send them, thus saving troublesome joint work and achieving efficient mass-sending operations.
# Mass messages can be viewed by group, or by message type, making it easier for us to manage.
#To add graphic messages, you can choose text messages, graphic messages, picture messages and other contents. Depending on the content, the interface provides different selection operations.
There are two types of mass sending of messages. One is based on groups, so just select the corresponding group from the platform; the other is sent based on the user's OpenID and provided for user input. The main operation interface is as follows.
More C# development of WeChat portal and applications-WeChat portal application management system function introduction For related articles, please pay attention to the PHP Chinese website!