Demo Task - Sales Report Distribution

1 About the Task: Sales Report Distribution

To assist you in understanding the configuration method for the information distribution function of SQLMessenger, after the system installation is complete, you can find a task named "(Demo) Sales Report Distribution" on the MainPage.

This task's function is to query sales reports for various regions from the sales_stat table (the demonstration data table of SQLMessenger) in the default data source and send the reports to the corresponding regional managers via email.

An email generated by the task

This task will query the sales reports for the following regions and send the reports to the managers of those regions.

Recipient list for the task

You can see the contents of this list in the "Recipient List (Loop Data) Config" of the task.

View the recipient list for the task in the task editor

2 How to Run This Task?

You can right-click on the task icon on the MainPage and then click the "Run task" menu item in the context menu to run this task. Alternatively, you can click on the task name in the Task Manager to run this task.

Run the task using the context menu

Start the task by clicking the task name in the Task Manager

The demo task is provided to help you understand the system functions of SQLMessenger. To prevent the system from sending out emails generated by the task, the "Emails generated by this task must be reviewed by me before sending" option is enabled in the demo task. Once the task is completed, the system will not send out the emails generated by the task. You can reject these emails in the Message Review.

The "Emails generated by this task must be reviewed by me before sending" option is enabled in the task

Reject the emails generated by the task in the Message Review

About SQLMessenger Console, Task Manager, Message Review

3 How to Create a Similar Task?

You can use the Clone feature to create a new task identical to this one and modify the new task to implement your own information distribution functionality.

Clone the task configuration in the Task Manager

After the Clone operation is completed, the system will create a new task with the same configuration as this one. The new task will be in a "Disabled" state, which means the system will not automatically run this new task according to its "Task Schedules" configuration. Once you have finished modifying and testing the new task, you can enable it. After the task is enabled, the "Task Schedules" configuration will take effect.

The status of the new task is "Disabled"

Enable the new task

4 How to Modify the Configuration of the Task?

You can modify the configuration of the cloned new task to implement your own information distribution functionality.

The content to be modified may involve the following aspects:

(1) Recipient List. You can set your recipients by modifying this list. The system will run a query for each record in the list and generate a report email.

Set Recipient List for the task

Configuring the Recipient List (Loop Data)

(2) Email Body Template. You can modify the email body template to accommodate your report content.

Modify the email body template of the task

Designing Body Template

(3) SQL Query Statements. You can modify the task's query statements to generate your own report content.

Modify the task's query statements

Using SQL Query in Templates, Using SQL Statements in Tasks

(4) Task Schedules. If you need to run this task automatically at specific times, you can add Task Schedules for the task. The system will automatically start the task at the times specified in your Task Schedules configuration.

Configure Task Schedules for the Task

Using Task Schedules

(5) Deselect the "Emails generated by this task must be reviewed by me before sending" option. If you need to send the emails generated by the task directly without review after the task is completed, please deselect this option in the task's advanced settings.

Deselect the "Emails generated by this task must be reviewed by me before sending" option

Advanced Options for Tasks

5 Considerations During Operation

(1) After modifying the task configuration, you need to click the "Deploy" button for the new configuration to take effect.

Deploy the modified task configuration

(2) If Task Schedules are configured for the task and the task status is "Disabled", you need to "Enable" the task for the Task Schedules to take effect.

Enable the task

For more information about information distribution tasks, please refer to the SQLMessenger manual.

SQLMessenger Manual, Using Information Distribution Task

Last updated on June 23, 2024