Problem
When attempting to decompose an order (split a single order into multiple orders based on business rules), the operation fails with an error similar to:
Order decomposition failed: Unable to process price adjustment attributes
or
Error during decomposition: Price adjustment attributes not recognized at product level
This prevents the order from being split correctly and blocks downstream fulfillment or billing processes.
Root Cause
The issue occurs when Price Adjustment attributes (e.g., __Price_Adjustment_Recurring__, __Price_Adjustment_OneTime__) are configured with an incorrect is_product_level_discount__c flag.
Background:
Order decomposition logic relies on attribute metadata to determine how to split and allocate charges, discounts, and adjustments across the resulting child orders. The is_product_level_discount__c flag indicates whether a price adjustment should be:
- TRUE: Applied at the product/line item level (decomposed and allocated to each child order)
- FALSE: Applied at the order/basket level (not decomposed, kept at parent order level)
When Price Adjustment attributes are incorrectly flagged as FALSE (order-level), the decomposition engine:
1. Attempts to process them as order-level adjustments
2. Fails to allocate them correctly to child orders
3. Throws an error because the adjustment cannot be split or is missing required metadata
Resolution Steps
Step 1: Identify the Problematic Price Adjustment Attributes
-
Review the decomposition error logs to identify which attributes are causing the failure
-
Common price adjustment attributes that may be affected:
__Price_Adjustment_Recurring____Price_Adjustment_OneTime____Price_Adjustment_Usage__-
Any custom price adjustment attributes in your implementation
-
Note the attribute names for correction
Step 2: Locate the Attribute Definitions
- Navigate to Attribute Definition Setup in Salesforce:
- Go to Setup > Custom Settings > Attribute Definitions
-
Or navigate to Setup > Custom Metadata Types > Attribute Definition
-
Search for the price adjustment attributes identified in Step 1
-
Open each Attribute Definition record
Step 3: Correct the is_product_level_discount__c Flag
-
Locate the is_product_level_discount__c field on the Attribute Definition record
-
Check the current value:
-
If it is FALSE or unchecked, this is likely the cause of the decomposition failure
-
Update the value to TRUE:
- Check the is_product_level_discount__c checkbox
-
Or set the field value to TRUE
-
Save the Attribute Definition record
-
Repeat for all price adjustment attributes that were identified in Step 1
Step 4: Verify Attribute Configuration Across Solution Definitions
- Check if the attribute is used in multiple Solution Definitions:
- Navigate to Setup > Custom Settings > Solution Definitions
-
Search for Solution Definitions that include the corrected attribute
-
For each Solution Definition:
- Open the Solution Definition record
- Verify that the attribute configuration is consistent
-
If the Solution Definition has a cached version of the attribute metadata, consider incrementing the version or clearing the cache
-
If your implementation uses a separate metadata table or custom object for attribute definitions, ensure the flag is updated there as well
Step 5: Retry Order Decomposition
-
Open the affected Order record in Salesforce
-
Trigger the decomposition process:
- This may be a button click (e.g., "Decompose Order")
-
Or an automated process that runs on order submission
-
Monitor the decomposition logs to confirm the operation completes successfully
-
Verify the child orders:
- Check that the price adjustment attributes are correctly allocated to each child order
- Verify that the total adjustment amounts across child orders match the original order
Verification
After correcting the flag:
- Query the Attribute Definition to confirm the change:
SELECT Name, is_product_level_discount__c
FROM Attribute_Definition__c
WHERE Name IN ('__Price_Adjustment_Recurring__', '__Price_Adjustment_OneTime__')
- Expected result:
-
is_product_level_discount__c = TRUEfor all price adjustment attributes -
Test decomposition with a sample order containing price adjustments:
- Create a test order with price adjustment attributes
- Trigger decomposition
- Verify that child orders correctly inherit the price adjustments
Prevention
To prevent this issue in future implementations:
- Use consistent naming conventions for price adjustment attributes (e.g., prefix with
__Price_Adjustment_) - Document the is_product_level_discount__c flag in your attribute definition guidelines
- Test decomposition scenarios during attribute configuration, especially for any attributes that affect pricing
- Review attribute metadata after package upgrades or migrations to ensure flags are preserved
- Implement validation rules to ensure price adjustment attributes always have the correct flag set
Important Notes
- The
is_product_level_discount__cflag is critical for order decomposition logic - This issue can affect any order that includes price adjustments and requires decomposition
- Correcting the flag does not require reprocessing existing orders, but future orders will use the corrected logic
- If you have multiple price adjustment attributes, verify and correct the flag for all of them
- The flag may also affect other pricing calculations or reporting, so test thoroughly after making changes
- If your implementation uses custom decomposition logic, ensure it respects the
is_product_level_discount__cflag
Priyanka Bhotika
Comments