Start a conversation

CloudSense “Clone Bundle” Creates Extra Product Configurations (PCs) Due to Package GUID Reuse

Contents

Overview

You may see CloudSense Clone Bundle create far more Product Configurations (PCs) than expected (for example, 2 PCs becoming 6, or up to ~4x expected). In some environments, cloning may also surface an error such as System.NullPointerException: Attempt to de-reference a null object.

The “extra cloned PCs” symptom occurs when multiple root Product Configurations share the same cscfga__Package_Guid__c. CloudSense uses cscfga__Package_Guid__c as the grouping key for a package instance, so Clone Bundle will clone all root PCs with that shared GUID—making the results look like duplicates.

Solution

1) Identify whether you are in the “duplicate PCs on clone” scenario

You are likely affected if one or more of the following are true:

  • Running Clone Bundle returns N clones where you expected fewer.
  • Product Configurations include multiple root PCs sharing the same cscfga__Package_Guid__c across one or more Sales Orders.
  • You use custom cloning/copy logic that duplicates Product Configurations or copies fields wholesale.
  • Observed behavior may vary by data state (example reported: when PCs have Validation Status = “Valid”, cloning produces extra PCs; when “Requires Update”, the clone count is as expected).

2) Understand the cause

CloudSense bundle cloning groups a package instance by cscfga__Package_Guid__c:

  • If cscfga__Package_Guid__c is not unique per package instance, Clone Bundle will treat all root PCs with that GUID as part of the same package and will clone them together.
  • The Sales Order Summary UI also treats a non-null cscfga__Package_Guid__c as a signal that the configuration belongs to a bundle/package, which can force bundle layout rendering even when you did not intend the order to be bundle-based.

3) Confirm Package GUID reuse with a query

Run a query like the following (placeholders shown):

SELECT Id, Name, CreatedDate, Sales_Order__c, cscfga__Package_Guid__c,
       cscfga__Root_Configuration__c
FROM cscfga__Product_Configuration__c
WHERE cscfga__Package_Guid__c = '<package_guid>'
AND cscfga__Root_Configuration__c = null
ORDER BY CreatedDate

If you see multiple root PCs sharing the same cscfga__Package_Guid__c where you expected only a single package’s root set, this explains the “duplicates” (over-cloning).

4) Fix custom cloning logic to follow CloudSense Package GUID expectations

If you have custom cloning/copy logic that creates or duplicates Product Configurations, align it to the following rules:

  • If the configuration is NOT part of a bundle/package:
    • Set cscfga__Package_Guid__c to null.
  • If the configuration IS part of a bundle/package:
    • Generate a new unique UUID for the new package instance.
    • Assign that same new UUID to all PCs that belong to that new package instance.

Important: Do not populate cscfga__Package_Guid__c with an arbitrary/random non-null value for non-bundle items. Any non-null Package GUID may cause the UI to treat those items as bundled and render them using bundle layout.

Validation

  1. Identify a Sales Order that contains a bundle and run Clone Bundle.
  2. Confirm the number of cloned PCs now matches expectations.
  3. Re-run the Package GUID query and confirm:
    • Each package instance uses a unique cscfga__Package_Guid__c.
    • Package GUID values are not shared unexpectedly across different orders/packages.
  4. Confirm Sales Orders that do not contain bundles render normally (no unintended bundle layout).

Frequently Asked Questions

1. How do I know if “Clone Bundle” is cloning by Package GUID in my case?

If multiple root Product Configurations share the same cscfga__Package_Guid__c, CloudSense will clone all root PCs with that GUID together. Query root PCs (where cscfga__Root_Configuration__c = null) by cscfga__Package_Guid__c to confirm.

2. We didn’t customize cscfga__Package_Guid__c directly—how can it still be wrong?

Any custom cloning/copy process that duplicates Product Configurations (or copies fields wholesale) can accidentally preserve cscfga__Package_Guid__c. If the same GUID is carried across multiple package instances, bundle cloning will pick up all of them.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Matej Storga

  2. Posted
  3. Updated

Comments