Skip to main content

Use Alerts to Push Card Details to Individuals

Scenario

There is a project expiration table card on a dashboard. It lists projects that are about to expire or have already expired. The requirement is to push DingTalk alert messages to the corresponding project owners. The notification body must include key information such as owner name, project name, and remaining days, and clicking the notification should open the details directly. Alert rule: trigger an expiration alert when the remaining days are 15 days, 7 days, or 0 to 3 days.

Result

image.png

Implementation

Prepare the Card

In the example below, select the filter-linked card and set the default value to "Follow User Attribute" so that each user can only see their own data after opening the page.

image.png

Create a Card Dataset

Path 1: Data Center -- Dataset -- New Dataset -- Card. Select the card, then set the storage name and path and save it.

image.png

Path 2: In the upper-right corner of the card, click

-- Generate Card Dataset. This is supported only in version 4.10 and later.

image.png

Create a Calculated Field for the Trigger Rule

Path: Dataset Overview -- New Calculated Field

The expiration alert must trigger when the remaining days are 15 days, 7 days, or 0 to 3 days. This involves multiple conditions. Because dataset alert trigger conditions currently do not support triggering when "any rule is met" (this is already planned for optimization), create a new field to determine whether the data meets the expiration alert condition.

[Remaining Days] in (15,7) or [Remaining Days] between 0 and 3

image.png

Create a Dataset Alert

Path: upper-right app launcher -- Alert Center -- Dataset Alert -- Add Alert. Select the prepared card dataset and configure it as needed. The example in this article uses the settings shown below.

Key configuration items:

Rule: Click the plus sign, select the field "Expiration Check", and the system automatically fills in the rule as equals true. Click OK to save.

Recipient distribution condition: Precisely match the user attribute field with the dataset field to ensure each user only receives their own dedicated notification. If duplicate names exist, use a unique field such as employee ID for matching. This field must exist in the dataset.

Notification content: Click "+ Add Field" to customize the notification content.

Notification redirect link: Supports card detail pages, dashboard pages, mobile light app pages, and custom links. In this example, the card is controlled by page filters, so Dashboard Page is selected.

image.png

Notes

In dataset alerts, each row of data that meets the condition pushes a separate notification. If there are too many data rows, frequent pushes will reduce the effectiveness of the alert. In this case, further aggregate the data in ETL, output summarized data, and create an alert from the new dataset. In this example, you can aggregate the data to one row per person and set the notification content to: "XX, you have X projects about to expire. The nearest expiring project is XXX, with an expiration date of XXXX-XX-XX and only X days remaining. Please follow up promptly!" Then set the notification redirect link to the original detail card.

Q&A

Q: Can card alerts achieve the same effect?

A: No. Reasons: 1. Card alerts do not support displaying card field content. The notification content is fixed text, and users can only view data after opening the redirect link. 2. Card alerts cannot be distributed automatically. If the recipient is set to a user group, users who do not meet the alert trigger condition will also receive pushes. If recipients are individuals, you must create a separate alert for each user, and the rule configuration is more complex.