Regarding order decomposition

WataruS
Tera Expert

Hello community!

If anyone knows anything about order decomposition, please let me know.

 

If a bundled offering is further bundled, an error occurs in order decomposition when creating an order specifying that offering, and no order task is generated.

For other offerings that are not in a multi-tiered structure, order decomposition is performed without any problems.

Is there a specification that prevents order decomposition from working correctly in this multi-tiered structure?

1 ACCEPTED SOLUTION

Hi Wataru 

You are welcome. Follow up on your questions below. 

  • When I checked the order disassembly flow, I found the attached error. Do you have any idea what the cause of this is?
    • This error is related to a “null pointer” exception in the OM TMT engine. It is trying to execute a Decomposition Rule, but is looking for a specific data property named “existing” on an object that doesn’t actually exist, it’s “undefined” . It looks like there is a mismatch between your Product Catalog configuration and the actual data in the Customer Order Line Item in ORDL0005154 displayed in the screen shot.  It could be either a scripted Decomposition Rule or a Mapping Rule. 
  • Likely Causes:
      1. Look for Missing Relationship data since the rule is trying to check if a service or resource “exists” for this customer. When it tries to access product.existing but the product object wasn’t found or loaded, it throws that error. 
      2. Another thing to look for is if your decomposition logic relies on a specific Order Line Item Characteristic ( “existing service ID” ) and that field is empty or missing from the payload, the script might fail if it doesn’t have a “null check”. 
      3. Last thing is contextual variable failure: The "Decompose Customer Order Line Item" action ( in your screenshot) expects a fully populated record. If the record ORDL0005154 is missing a mandatory reference to a Product Specification, the decomposition engine "breaks" because it doesn't know which rules to apply.
  • Troubleshooting:
    1. Check the "Runtime Value": Click the link for ORDL0005154 in your screenshot. Check the Characteristics tab. Is there an "Existing Service" field that is blank when it should be filled?
    2. Inspect Decomposition Rules: Navigate to Order Management > Decompositions > Decomposition Rules. Look for rules associated with the Product Specification of that order line. Look for any scripts containing the word .existing.
    3. Validate the Product Specification: Ensure the Product Specification (and its associated Product Offer) is "Published." Sometimes a "Draft" status prevents the decomposition engine from building the object tree correctly.
    4. Add a Null Guard (If you are the developer): If you find the script, ensure it checks if the object exists before looking for the property.
    • Bad: if (item.existing == true)
    • Good: if (item && item.existing == true)
  • I haven't created any Decomposition Rules in particular, but when I looked at the creation screen, I saw that I needed to create one for each Characteristic associated with the Standard plan. Is that correct? 
    • I would say you do need Decomposition Rules (or scripts)\ Mapping Rule. They are the “brains” that determine which sub-orders are created based on the attributes of the customer’s request. 
  • This is the first time I've heard of Decomposition Explorer. Where can I find it?
    • I was referring to the Decomposition Map, Staggered Decomposition and Decomposition Rules. 

Let me know if this helps. 

As always, don't have a good day. Have a great day!

Brandi

 

View solution in original post

7 REPLIES 7

When you have a multi-tiered structure (a Bundle within a Bundle), the decomposition engine can fail for a few specific reasons. Here is what might be causing your error based upon the information provided:

 1. Missing Decomposition Rules at Mid-Levels

ServiceNow does not "skip" levels automatically. If Bundle A contains Bundle B, and Bundle B contains Service C, you need a clear chain of Decomposition Rules:

  • A rule to decompose Bundle A → Bundle B.
  • A rule to decompose Bundle B → Service C.

If the rule between the parent and the mid-level bundle is missing or improperly mapped, the "parent" doesn't know how to pass the attributes down to the next level, and the decomposition stops, preventing the Order Task from being generated.

2. Specification Relationship Types

Check the Specification Relationships for the "Standard Plan" (which you circled).

  • Ensure that the relationship type is correctly set to "Bundled With" or "Composed Of." If the system sees a Product Offering pointing to another Product Offering without a valid Decomposition Rule (sn_ind_tmt_orm_decomposition_rule), it will throw an error because it doesn't know if it should treat the child as a standalone item or a sub-component.

3. Circular Dependencies or Depth Limits

While ServiceNow supports multi-tier structures, there are sometimes system properties that limit the depth of the decomposition tree to prevent infinite loops.

  • Check if your hierarchy exceeds the default depth (though usually, 3-4 levels as shown in your image is fine).
  • Ensure "Standard Plan" isn't accidentally referencing a parent specification, creating a circular logic loop.

4. Attribute Mapping Errors

In nested bundles, attributes often need to be "propagated" from the top level down to the technical level.

  • If the bottom-tier Service Specification requires a mandatory attribute (e.g., SharePoint URL), but the top-level Product Offering doesn't have a mapping to pass that value down through the "Standard Plan" bundle, the decomposition will fail validation.

 Troubleshooting Steps

  1. Check Logs - Go to System Logs > Errors immediately after attempting to decompose. Look for "Decomposition Tree" or "Order Management" errors.

  2. Validate Rules - Open the Decomposition Rules list and filter by the Parent Specification of the "Standard Plan." Ensure a rule exists for every branch shown in your diagram.

  3. Verify "Standard Plan" - Navigate to the Product Offering "Standard Plan." Ensure it is Published and Active. A "Draft" specification in the middle of a hierarchy will break the chain.

  4. Use the Visualizer - ServiceNow provides a "Decomposition Explorer." Use it on a test order to see exactly at which node the red "X" appears.

 

Is it a "Specification" (limitation)?

Technically, no, ServiceNow is designed to handle multi-tiered bundles. However, the configuration overhead increases significantly with each tier. If "Standard Plan" is both a Product Offering and a Bundle Group component, ensure the decomposition rule targets the correct internal ID.

 

Let me know if this helps. 

As always, don't have a good day. Have a great day!

Hi @BrandiC2 

 

Thanks for the detailed information.

Please let me confirm the following points:

・When I checked the order disassembly flow, I found the attached error. Do you have any idea what the cause of this is?

・I haven't created any Decomposition Rules in particular, but when I looked at the creation screen, I saw that I needed to create one for each Characteristic associated with the Standard plan. Is that correct?

・This is the first time I've heard of Decomposition Explorer. Where can I find it?

 

Best Regards,

Wataru

Hi Wataru 

You are welcome. Follow up on your questions below. 

  • When I checked the order disassembly flow, I found the attached error. Do you have any idea what the cause of this is?
    • This error is related to a “null pointer” exception in the OM TMT engine. It is trying to execute a Decomposition Rule, but is looking for a specific data property named “existing” on an object that doesn’t actually exist, it’s “undefined” . It looks like there is a mismatch between your Product Catalog configuration and the actual data in the Customer Order Line Item in ORDL0005154 displayed in the screen shot.  It could be either a scripted Decomposition Rule or a Mapping Rule. 
  • Likely Causes:
      1. Look for Missing Relationship data since the rule is trying to check if a service or resource “exists” for this customer. When it tries to access product.existing but the product object wasn’t found or loaded, it throws that error. 
      2. Another thing to look for is if your decomposition logic relies on a specific Order Line Item Characteristic ( “existing service ID” ) and that field is empty or missing from the payload, the script might fail if it doesn’t have a “null check”. 
      3. Last thing is contextual variable failure: The "Decompose Customer Order Line Item" action ( in your screenshot) expects a fully populated record. If the record ORDL0005154 is missing a mandatory reference to a Product Specification, the decomposition engine "breaks" because it doesn't know which rules to apply.
  • Troubleshooting:
    1. Check the "Runtime Value": Click the link for ORDL0005154 in your screenshot. Check the Characteristics tab. Is there an "Existing Service" field that is blank when it should be filled?
    2. Inspect Decomposition Rules: Navigate to Order Management > Decompositions > Decomposition Rules. Look for rules associated with the Product Specification of that order line. Look for any scripts containing the word .existing.
    3. Validate the Product Specification: Ensure the Product Specification (and its associated Product Offer) is "Published." Sometimes a "Draft" status prevents the decomposition engine from building the object tree correctly.
    4. Add a Null Guard (If you are the developer): If you find the script, ensure it checks if the object exists before looking for the property.
    • Bad: if (item.existing == true)
    • Good: if (item && item.existing == true)
  • I haven't created any Decomposition Rules in particular, but when I looked at the creation screen, I saw that I needed to create one for each Characteristic associated with the Standard plan. Is that correct? 
    • I would say you do need Decomposition Rules (or scripts)\ Mapping Rule. They are the “brains” that determine which sub-orders are created based on the attributes of the customer’s request. 
  • This is the first time I've heard of Decomposition Explorer. Where can I find it?
    • I was referring to the Decomposition Map, Staggered Decomposition and Decomposition Rules. 

Let me know if this helps. 

As always, don't have a good day. Have a great day!

Brandi