Published at: 2025-10-30
How to Configure Conversion Rules
I. Key Steps
Step 1: Manage the conversion rule list
| Primary Buttons | Description |
|---|---|
| New | Create a blank new rule |
| Delete | Enabled rules cannot be deleted; disable them first |
| Enable/Disable | Enabled rules take effect immediately; disabled rules become inactive |
| Copy | Duplicate the source rule as an independent new rule. Subsequent changes to the source rule will not affect the copied rule |

Step 2: Maintain basic information
- Enable: New rules are enabled by default.
| Key Configuration Items | Description |
|---|---|
| Rule Name | Must be unique among conversion rules |
| Enable | Enabled by default for new rules; only enabled rules are executed |
| Remarks | Add a description for the rule |

Step 3: Configure conversion relationships
In this phase, the target object and source object must have an association (configured via lookup fields) to support business tracking and write-back.
| Key Configuration Items | Description |
|---|---|
| Source Object/Target Object | 1. Conversion rules cannot be configured without an association. 2. If both objects have Sub-objects, Sub-object mapping is available. Sub-objects must be associated for tracking/write-back. |
| Record Type Configuration | Map different record types to corresponding target objects. |
| Data Scope Configuration | Define the rule’s effective data scope. |
Step 4: Map object fields
Configure field mappings between Primary Objects and Sub-objects. At least one mapping is required.
- Value Assignment: Define how target fields derive values from source fields.
| Configuration Item | Key Configuration Items | Description |
|---|---|---|
| Value Assignment | Source Field | Directly use the source field value (field types must match) |
Step 5: Set write-back rules (optional)
- Write-back Timing: Defaults to post-save submission.
- Write-back Fields: Calculated or aggregated fields can be used as source fields.
II. Use Case Examples
2.1 Example Scenario
- Dept. A requests 3 laptops via a Purchase Requisition (Sub-object: Purchase Details).
- The procurement team receives a Purchase Order (Sub-object: Order Details) but can only fulfill 2 laptops initially (1 later).
- Mapping: Purchase Requisition → Purchase Order; Purchase Details → Order Details.
Key Fields:
- Total Procured: Sum of laptops purchased (e.g., initially 2, then 1).
- Remaining Quantity: Target Quantity - Procured Quantity (e.g., 3 - 2 = 1; later 3 - 3 = 0).
These fields (Total Procured, Target Quantity, Remaining Quantity) must be configured as write-back fields.

2.2 Close Logic
Scenario: When Remaining Quantity ≤ 0, mark the requisition as closed to exclude it from future procurement.
Example:
- Close Field: Purchase Completed (Options: Yes/No).
- When Remaining Quantity ≤ 0, update Purchase Completed from “No” to “Yes”.

III. Primary Object Close Strategies
- Close Primary Object after All Sub-objects Are Closed:
- Example: If Dept. A also ordered 4 monitors, the Purchase Requisition closes only after both laptops and monitors are fulfilled.
- Close Primary Object Immediately After Conversion:
- Applies if no Sub-object mapping exists.

IV. Overrun Check
Scenario: If the procurement team orders 2 more laptops (total procured: 4 vs. target: 3):
- Configure strict validation to block overruns (e.g., Target Quantity - Procured Quantity < 0).
- Write-back and source closure are blocked if overrun checks fail.

V. Frontend Usage
- A Convert button appears on the source record.
- The system auto-matches applicable rules:
- Multiple Rules: Displays a selection dialog.
- Single Rule: Auto-applies.
- If Record Type mapping exists, the system navigates to the corresponding create page.

Reference-Based Creation:
- Click Reference New to match conversion rules.
- Multiple rules trigger a selection dialog; single rules auto-apply.

