Version: English

WeChat Mini Program

1.Overview#

DM Hub supports access to mini programs and is used in WeChat scenarios. Currently, it is mainly used to serve the following scenarios: Official account custom menu jump, WeChat template message jump, and reply after scanning the QR code (more scenarios will be supported later). If user want to access the user and access data of the mini program, user needs to download the SDK for embedding. Order data, etc., need to be docked through Api. For details, see Mini Program Monitoring

2.Ensure the association between the Mini Program and the official account#

All scenarios that want to jump to Mini Program through WeChat Official Account must be under the circumstances that WeChat Official Account and the Mini Program have been associated. The official WeChat document "shopping-guide.getGuideMassendJobList", log in to the WeChat Official Platform. Check whether the Official Account is connected to the Mini Program in Management Mini Management.

img

3.How to bind WeChat Mini Program#

[Settings Center]—[Marketing Contacts]—[WeChat Mini Program]

img

Click [Bind Mini Program], and ask the mini program administrator to scan the code for authorization, in the authorization pop up page.

img

As shown in the figure below, the mini program administrator needs to scan the QR code to authorize at this time (note: it must be an mini program administrator, and long-press recognition on the phone through the screenshot of the QR code cannot be authorized, user need to use WeChat to scan )

img

To ensure that the Mini Program can be used normally in the DM Hub, please ensure that the Mini Program has been associated with the corresponding official account (only the Mini Program associated with the Official Account can realize the Mini Program for the Official Account Custom Menu Jump, WeChat Template Message Jump and other functions), and authorize the following permissions:

  • Account management permissions
  • Customer service message management permissions. Note: Do not authorize the Mini Program development authority to the DM Hub, because this authority can only be authorized to one third-party organization. Once authorized to the DM Hub, the actual developer will not be able to develop it.

4.How to unbind the Mini Program#

Log in to the Mini Program on the WeChat official account platform, as shown in the figure below, click in turn: Settings-Third Party Authorization Management-Stop Authorization

img

Note: Unbinding is the removal of the authorization of the Mini Program to the DM Hub, which is completely different from the removal of the association relationship between the Mini Program and the official account.

After stopping the authorization, go back to DM Hub to delete it, as shown in the figure below:

img

5.Preparation for SMS and WeChat Page Jump#

WeChat has opened up the ability to jump to mini program from external pages, and now SMS and WeChat Page have also supported setting jump links for mini program

Calling the interface that generates the jump link of the mini program requires the developer authority of the mini program, and the developer authority can only be authorized to one third-party, which is generally authorized to the mini program developer. DM Hub does not ask for the developer authority when the mini program is authorized. Therefore, the docking can be achieved in the following ways:

Note: Scheme will be divided into short-term effective Scheme and long-term effective Scheme according to whether it is expiration valid and expiration time parameters: a single mini program can generate a maximum of 500,000 Schemes per day (including short-term effective Scheme and long-term effective Scheme). The effective time exceeds 31-day scheme or permanently effective scheme is a long-term effective scheme. A single mini program can generate a total of 100,000 long-term effective schemes. Please be cautious to call a scheme with an effective period of no more than 31 days as a short-term effective scheme. There is no upper limit for a single mini program generates a short-term effective scheme. For details, please refer to the Mini Program Development Document.

1.Manually generate it through the "Tools"-"Generate URL Scheme" in the mini program management (this method is recommended if there are not many links).

img img

2.The mini program developer shall follow the mini program development document,call the interface to generate the mini program jump link, and then directly fill in the corresponding position in the DM Hub;

3.DM Hub calls the interface to generate, but user need to contact the DM Hub assistant to configure the appid and secret of the mini program in DM Hub. When DM Hub generates an access token based on the provided appid and secret, the original token of the developer will become invalid. The mini program developer needs to be compatible with the token invalidation and re-acquire the token, otherwise impact will be caused when calling other interfaces of the mini program.

4.Realization through integrated service docking requires both parties to carry out a certain docking development. If user need to adopt this solution, please contact Convertlab account manager. The mini program developer provides the interface to obtain the access token and connects to the service to generate the mini program link, or the mini program developer directly provides the interface for generating the min ptogram link, which is called by the integrated service.