Overview
The Compare Case Attributes enrichment performs equality comparisons between two case attributes and creates a boolean result attribute indicating whether they match. This logical operator enables you to validate data consistency, verify business rules, and identify discrepancies in your process data by comparing any two attributes at the case level. The enrichment provides essential capabilities for quality checks, compliance validation, and process conformance analysis.
This enrichment is particularly valuable in process mining scenarios where you need to verify that different data points align correctly or identify cases where expected matches don't occur. For instance, you can compare planned versus actual values to identify deviations, validate that different system fields contain consistent information, or check whether manual entries match automated calculations. The comparison works across different data types, automatically handling type conversions when comparing numeric values, dates, or text fields, making it a versatile tool for data validation and quality assurance.
Common Uses
- Validate that invoice amounts match purchase order values for financial compliance
- Compare planned delivery dates with requested dates to identify scheduling conflicts
- Verify customer information consistency across different system fields
- Check if approved budgets match actual spending authorizations
- Identify cases where manual entries differ from system-calculated values
- Validate that product codes match between ordering and shipping systems
- Compare start and end locations in logistics processes to identify round trips
Settings
New Attribute Name: Specify the name for the boolean attribute that will store the comparison result. Choose a descriptive name that clearly indicates what is being compared. For example, "Amount_Matches_PO" when comparing invoice amounts to purchase orders, or "Delivery_Date_Consistent" when comparing planned and actual delivery dates. The attribute will contain True when the values match and False when they differ.
Case Column 1: Select the first case attribute to compare. This dropdown shows all available case attributes in your dataset, including both original attributes and those created by other enrichments. The attribute can be of any data type - text, numeric, date, or boolean. The enrichment will handle appropriate type conversions during comparison.
Case Column 2: Select the second case attribute to compare against the first. Like Case Column 1, this dropdown presents all available case attributes. The enrichment will compare the values of these two attributes for each case and determine if they are equal. Null values are handled appropriately - two null values are considered equal, while a null compared to any non-null value results in False.
Examples
Example 1: Invoice and Purchase Order Validation
Scenario: In a procure-to-pay process, you need to validate that invoice amounts match the original purchase order values to identify discrepancies that require investigation or approval.
Settings:
- New Attribute Name: Invoice_Matches_PO
- Case Column 1: Invoice_Amount
- Case Column 2: PO_Amount
Output: Creates a boolean attribute "Invoice_Matches_PO" with values:
- True: When Invoice_Amount equals PO_Amount (e.g., both are 5,000.00)
- False: When values differ (e.g., Invoice_Amount is 5,250.00 but PO_Amount is 5,000.00)
- False: When one value is null and the other is not
Insights: This comparison helps identify invoices requiring additional approval due to amount mismatches, enables automatic routing of matching invoices through straight-through processing, and provides metrics on supplier invoice accuracy.
Example 2: Delivery Date Consistency Check
Scenario: In a logistics process, you want to verify that the promised delivery date communicated to customers matches the planned delivery date in your scheduling system.
Settings:
- New Attribute Name: Delivery_Dates_Aligned
- Case Column 1: Customer_Promise_Date
- Case Column 2: System_Planned_Date
Output: Creates a boolean attribute "Delivery_Dates_Aligned" showing:
- True: When both dates are identical (e.g., both show 2024-03-15)
- False: When dates differ (e.g., promised 2024-03-15 but planned for 2024-03-17)
Insights: This enables identification of cases where customer expectations don't match internal planning, helps measure communication accuracy, and highlights process areas where scheduling conflicts occur frequently.
Example 3: Data Quality Validation in Healthcare
Scenario: In a patient care process, you need to verify that the attending physician recorded in the admission system matches the physician listed in the discharge summary.
Settings:
- New Attribute Name: Physician_Records_Match
- Case Column 1: Admission_Physician_ID
- Case Column 2: Discharge_Physician_ID
Output: Creates a boolean attribute "Physician_Records_Match" indicating:
- True: When both IDs are identical (e.g., both show "DOC-12345")
- False: When physician IDs differ, indicating a handover or data entry error
Insights: This comparison helps identify cases with physician handovers, validates data consistency across systems, and supports quality audits for continuity of care documentation.
Example 4: Manufacturing Specification Compliance
Scenario: In a manufacturing process, you need to verify that the actual material grade used matches the specified grade in the production order.
Settings:
- New Attribute Name: Material_Grade_Compliant
- Case Column 1: Specified_Material_Grade
- Case Column 2: Actual_Material_Grade
Output: Creates a boolean attribute "Material_Grade_Compliant" with:
- True: When the specified grade matches what was actually used (e.g., both are "Grade_A")
- False: When different grades were used (e.g., specified "Grade_A" but used "Grade_B")
Insights: This enables quality control tracking, identifies production batches that may not meet specifications, and helps calculate compliance rates for different production lines or time periods.
Example 5: Round Trip Detection in Logistics
Scenario: In a transportation management process, you want to identify shipments that are round trips by comparing origin and destination locations.
Settings:
- New Attribute Name: Is_Round_Trip
- Case Column 1: Origin_Location
- Case Column 2: Final_Destination
Output: Creates a boolean attribute "Is_Round_Trip" showing:
- True: When origin and destination are the same (e.g., both are "Warehouse_NYC")
- False: When locations differ (e.g., from "Warehouse_NYC" to "Store_Boston")
Insights: This comparison helps identify round trip patterns for route optimization, enables different pricing strategies for round trip versus one-way shipments, and supports fleet utilization analysis.
Output
The Compare Case Attributes enrichment creates a single new boolean case attribute with the name specified in the settings. This attribute contains True when the two compared attributes have identical values and False when they differ. The comparison is performed for each case independently.
The boolean attribute can be displayed in different formats depending on your visualization preferences - as True/False, Yes/No, 1/0, or with custom labels. This attribute integrates seamlessly with other mindzieStudio features:
- Filtering: Use the boolean result to filter cases, showing only matches or only mismatches
- Conformance Analysis: Identify the percentage of cases where values match versus mismatch
- Process Flows: Split process paths based on whether attributes match
- Calculators: Use in logical expressions with AND/OR operators for complex validation rules
- Dashboards: Create KPIs showing match rates and trends over time
The enrichment handles null values appropriately - two null values are considered equal (returning True), while a null compared to any non-null value returns False. This ensures consistent behavior in data validation scenarios where missing data is significant.
This documentation is part of the mindzie Studio process mining platform.