What is a shortcut entry (group plugin)
When a user clicks a plugin entry inside a group, the relevant group parameters are carried along, allowing developers to determine who clicked which specific plugin in which group at what time. Based on this, solution providers can deliver highly intelligent and clearly targeted business services.- Sign in to the DingTalk Developer Console.
- On the Developer Console page, select Scenario group and click Create group plugin.
-
Create a group plugin, click Create, and wait for approval.
Note
- Approval is completed within 12 hours on business days.
Build the shortcut entry link
A shortcut entry (group plugin) is a DingTalk link with business capabilities. Developers must assemble a shortcut entry link based on the actual scenarios of their micro app and the specific needs of users in the group. The shortcut entry name supports up to four characters. The shortcut entry link offers extensive capabilities, but developers must assemble them through link parameters. For example, the open method on the mobile side (push page, pop page, etc.) and the page navigation logic on the PC side (open a new container or slide the page left) are all implemented through link parameter configuration.-
Redirect to an H5 page
link (sidebar / container slide-out)
Example:
Parameter descriptions:
-
Redirect to a micro app
openapp (such as workbench, browser, or left-slide panel)
Example:
Parameter descriptions:
-
Redirect to a mini program
-
Common parameters (supported by both open_micro_app and open_mini_app)
-
Common parameters (supported by both open_micro_app and open_mini_app)
Parameters supported when ddMode=float (floating window)
Parameters supported when ddMode=pop (pop layer)
-
Open a micro app scheme (scheme exclusive to enterprise mini programs)
Scheme:
dingtalk://dingtalkclient/action/open_micro_appBasic parameters are the same as in the common parameters list.The grayscale control logic should be placed in the handler of this scheme. PC-side test cases:-
Open a URL in the slide panel without a title.
-
Open a URL in the slide panel without a title.
-
Open a URL in the browser.
-
Open a URL in the slide panel with a title.
-
Open a URL in the browser.
-
Open a URL in the slide panel without a title.
-
Launch a mini program scheme (scheme exclusive to personal mini programs)
Scheme:
dingtalk://dingtalkclient/action/open_mini_appBasic parameters are the same as in the common parameters list. -
Mini program debug scheme
Scheme:
dingtalk://dingtalkclient/action/dev_mini_appMainly used to debug mini programs and develop with the appx framework. Mini programs opened in this way launch the main document directly through the URL. The package management process is not entered, and the keep-alive logic is not triggered. miniAppId is used only for interface verification and similar purposes.
Important
The parameters have all been encoded. Decode them before use.How to obtain source group information through the link
-
Specify a special open method.
A shortcut entry (group plugin) is a DingTalk link with business capabilities. Developers must assemble a group plugin link based on the actual scenarios of their micro app and the specific needs of users in the group. The plugin name supports up to four characters. The plugin link offers extensive capabilities, but developers must assemble them through link parameters. For example, the open method on the mobile side (push page, pop page, etc.) and the page navigation logic on the PC side (open a new container or slide the page left) are all implemented through link parameter configuration.
The following uses the shortcut entry for a project group as an example to explain in detail how a shortcut entry link is assembled.
<dingtalk://dingtalkclient/page/link?url=https%3a%2f%2fding-doc.dingtalk.io%2fdoc%23%2fpqkq0u%2feluagw%2f$CORPID$%2f$DOUBLE_ENCCID$>-
Developer’s target page address: https%3a%2f%2fding-doc.dingtalk.io%2fdoc%23%2fpqkq0u%2feluagw
- When you use the DingTalk unified redirect protocol, this part is used as a parameter of the “DingTalk unified redirect protocol” address, so URL encoding is required.
- When you do not use the DingTalk unified redirect protocol, you can use the original URL directly as the shortcut entry address. URL encoding is not required.
-
DingTalk unified redirect protocol (optional) dingtalk://dingtalkclient/page/link?url=
- This part determines how your specified page is opened. Currently supported methods include “open in browser”, “open in sidebar”, and more. The path of the unified redirect protocol differs for each method.
- Some unified redirect protocol paths are available only on certain platform clients. For example, “open in sidebar” is available only on the PC and Mac clients.
-
Shortcut entry address dynamic parameters (optional)
-
When these dynamic parameters are set, the corresponding parts in the URL are replaced with the group Context information (such as corpId and openConversationId) when a user clicks the shortcut entry to access the developer’s address.
The currently supported dynamic parameters are as follows:
The reason for the double URL encoding/decoding of is as follows: DingTalk uses an internal protocol with the “dingtalk://” prefix, which requires one round of encoding to be parsed. The business HTTPS protocol passed through after the URL parameters also requires another round of encoding/decoding when consumed by the downstream container. Because the consumer needs to perform two rounds of decoding, two rounds of encoding are required when generating the URL. Example of generating the URL: urlencode (DingTalk URL?xxx=xxx & url = urlencode (business URL)) Example of parsing the URL: a. urldecode (DingTalk URL) -> get the business URL; b. urldecode (business URL) -> get the usable parameters.
-
When these dynamic parameters are set, the corresponding parts in the URL are replaced with the group Context information (such as corpId and openConversationId) when a user clicks the shortcut entry to access the developer’s address.
The currently supported dynamic parameters are as follows:
-
Developer’s target page address: https%3a%2f%2fding-doc.dingtalk.io%2fdoc%23%2fpqkq0u%2feluagw