1. Detailed introduction of aggregation rules
1.1 Preset scene
- all:
- The person in charge is the current user or his subordinates
- or related team members include the current user or his subordinates
- Or the responsible data of the department responsible for the approval of the current user as an order management or order financial role (for example, user A has the role of "order finance" and is responsible for approving the order records submitted by department B, then user A can view all responsible persons belonging to department B order records).
- Or configure the "Data Sharing" rule of the sales order in "Data Rights Management" to share the data of the person in charge or the department of the person in charge with the current employee or the department of the current employee or the user group of the current employee
- or "My department's" data.
- I am responsible for: The owner of the order is the current user
- I am involved in: The current user is included in the relevant team members
- my subordinate is in charge of: the person in charge of the order is the subordinate of the current user
- My Subordinates Participated in: The relevant team members include the user's subordinates
- Shared to me: Configure the "Data Sharing" rule of the sales order in "Data Rights Management" to share the data of the person in charge or the department of the person in charge with the current employee or the department of the current employee or current employee's user group
- I am in charge of the department:
- The current user is the department head of the main department
- At the same time, the main department of the relevant team members in the record is this department.
- Remarks: Whether the responsible department includes all subordinate data is determined by "CRM Management-Rule Settings-Basic Settings-Superior Visible Data Scope".
Remarks:
- "CRM Admin" can view all data.
- All records whose status is "Obsolete" can only be seen by "CRM administrator", and other personnel are not visible.
1.2 Business operations of aggregation rules
1.2.1 Create new aggregation rules

- Aggregate Type:
- It is mainly used to select the time range of the documents to be aggregated. The options include "Current Order" and "History", and the options will affect the fields of [What needs to be counted];
- Aggregation result type:
- Used to select the type of aggregation, different types of aggregation values can be applied in different positions;
- "General aggregation value": can be used as a judgment condition, such as what conditions the order meets before the promotion/rebate is executed;
- "Product Combination": It is only used for price policy combination promotion; it can be used to identify the range of promotional products, and it can also be used as an order condition.

-
Aggregate Object:
- used to select the objects under the document to be aggregated;
- When [Aggregation Type] is "Current Order", [Aggregation Object] can be selected: "Order Product", "Quotation Details";
- When [Aggregation Type] is "History", [Aggregation Object] is optional: "Sales Order", "Quotation", "Order Product", "Quotation Details".
Remark: When only counting the object of the document slave object, the history can count the master object and slave object of the document.
-
Aggregated fields:
- Used to select the fields under the document object to be aggregated;
- Select the field under [Aggregate Object].
-
Aggregation Dimension (optional when [Aggregation Type] is "History"):
- Specific dimensions used to select aggregated documents;
- Optional "Customer Name", "Partner".
-
Aggregation method:
- used to select the calculation method of the aggregation field;
- Defaults to "Sum" and cannot be modified.
-
Aggregation Date Field (optional when [Aggregation Type] is "History"):
- time field for selecting documents to be aggregated;
- Optional "Created Time", "Date Time", "Last Modified Time", "Date".
-
Time Range (optional when [Aggregation Type] is "History"):
- It is used to select the specific time range of [Aggregation Date Field] of the documents to be aggregated.

- Data Range (Aggregation Condition):
- The data range is based on the data generated by the configured options in [Basic Information] [What needs to be counted], and the range is further limited by adding aggregation conditions. The results will only display the part of the data that "conforms to the configuration and meets the aggregation conditions";
- Data ranges can be used to limit product ranges.
2. Application of Aggregation Rules
2.1 Application of price policy
2.1.1 The modification type is: main object (whole order promotion)
- [Rule conditions] Aggregation rules can be applied as judgment conditions, that is, what conditions are met by the order before the promotion is executed

- [Execution Result] can use the aggregate rule as the judgment condition for executing every full condition

2.1.2 The modification type is: From object (product promotion)
Single Product Promotion:
- [Rule conditions] Aggregation rules can be applied as judgment conditions, that is, what conditions are met by the order before the promotion is executed

Combination Promotion:
- [Rule conditions] Aggregation rules and combination rules can be applied as judgment conditions, that is, what conditions are met by the order to execute the promotion

- [Execution Result] can use combination rules for each full condition as the judgment condition for executing each full

2.2 Application of Rebate Order Rules
- It can be used in 【Conditions for using rebates】 as a judgment condition, that is, what conditions are met by the order to use rebates

- It can be used for: [Using rebate amount] - [Calculate by every full amount], as the judgment condition for each full amount

- It can be used for: [use rebate amount] - [calculate by full amount] [calculation formula], as the value participating in the calculation

3. Examples of application scenarios
(1) Cleaning products are promoted for a discount of 20 yuan when the purchase is over 100 yuan
The page settings are as follows:
- Basic Information - [Aggregation Type: Pawn Order], [Aggregation Result Type: Product Combination];
- What needs to be counted-[Aggregation Object: Order Product], [Aggregation Field: Price List Subtotal];
- Data range - [product name/category] is equal to [cleaning category].
(2) Milk tablets + milkshakes + coconut milk combination quantity 20 boxes free 3 boxes, of which milk tablets must have 1 box to promote
Two aggregate values are required:
- [A+B+C combination quantity over 20 boxes]

- Basic Information - [Aggregation Type: Pawn Order], [Aggregation Result Type: Product Combination];
- What needs to be counted - [Aggregation Object: Order Product], [Aggregation Field: Quantity];
- Data range - [product name] belongs to [milk tablets] + [milk shake] + [coconut juice].
- A greater than or equal to 1 box:

- Basic Information - [Aggregation Type: Pawn Order], [Aggregation Result Type: Regular Aggregation Value];
- What needs to be counted - [Aggregation Object: Order Product], [Aggregation Field: Quantity];
- Data range-【Product Name】belongs to 【Milk Tablets】.
- Remark:
- The functions of the rebate aggregation rules are the same, they are all used to aggregate the specified fields of the specified object (temporarily only "summation")
- The data range is optional and can be configured according to the situation.