定时报告/对子客户安排报告
模板定义了报告中的内容,而调度程序则确定报告的交付时间和对象。
在本指南中,我们将逐步介绍在 ThingsEye 中使用报告的基本步骤,并为两个不同的客户创建一个配置了自动交付的报告模板。
1. Create the report template
默认你已知晓如何创建报告模板,如果不清楚请查阅这个WIKI:Create report
2. Scheduling the report for customers
正确调度的要点
为确保正确生成报告并包含准确的数据,您必须指定:
- 报告收件人 – 将接收生成报告的用户(例如,经理或客户)。
- 用户帐户 – 将用于生成报告的帐户。这定义了应用于报表的数据范围和权限。
例:
- 如果报告应仅包括客户 A 拥有的设备,则必须在计划报告时将用户字段设置为属于客户 A 的用户的电子邮件地址。同样,要为客户 B 收件人安排报告,请在用户字段中使用客户 B 用户的电子邮件地址。
这可确保报告仅显示该特定用户可访问的设备和数据。
2.1 Scheduling a report for CustomerA users
首先,我们将为所有客户 A 用户设置自动发送报告。 该报告将代表该客户的管理员 Alec 生成。
- 转到“报告”页面上的“计划”选项卡。
- 点击右上角的“+ 计划报告”以创建新的计划程序事件。
- 在计划对话框中,提供以下详细信息:
- 为您的日程安排事件指定一个清晰的标题,例如:Report for CustomerA
- 事件类型 - 始终设置为“创建报表”。
- 报告模板 – 选择之前创建的每日设备警报报告模板。
- 用户 – 指定将代表其生成报告的用户帐户:Alec@thingseye.io (Alec— 客户 A 管理员)。
- 设置收件人:
- 在“收件人”字段中,单击新建以创建新的收件人组。
- 输入通知接收方组的名称。
- 选择客户用户筛选器。
- 将客户设置为客户 A。
- 单击“添加”。
- 在“收件人”字段中,单击新建以创建新的收件人组。
- 通知模板和发送方式:
- 选择现有通知模板(定义报告的传递方式)并对其进行编辑。
- 将电子邮件添加为与 Web 一起的传递方式。单击“下一步”。
- 添加将附加 PDF 报告的电子邮件通知的主题和正文文本。单击“保存”。
3. Set up the schedule
Go to the Schedule tab.
- Start time – set the date and time of the first run.
- Time zone – choose the applicable time zone.
- Enable Repeat:
- Interval – select Daily.
- End date – set an end date or leave blank for ongoing delivery.
- Finally, click “Create” to save and apply the scheduler event.
Now, every day at the scheduled time, all Customer A users will automatically receive a report with the latest information about their device alarms.
3. Scheduled events result
Each user from customerA receives their own individual report containing only the entities they have access to.
The system automatically sends the reports daily at the scheduled time, without any manual intervention.
At the time specified in the scheduled events, all users of Customer A will receive notifications along with the generated report on their device alarms.
Notifications will be delivered through two channels:
1. Web UI notification
- A notification about the generated report will appear in the ThingsEye Web UI.
- Tenant Users can open the report directly within the ThingsEye interface.
Important:
- Only Tenant Users can view generated reports directly in the ThingsEye Web UI.
- Customer users do not have access to reports in the Web UI — they can only receive them through Email or Slack.
If your recipients are customer users, make sure at least one of these delivery channels is selected.
2. Email notification
- An email will be sent to the user with the subject and message you configured in the notification template.
- The email will have the report attached as a PDF file, which can be opened and viewed in the browser or downloaded.