Start a conversation

ServiceSpecification.json Not Generated on Service Records in CloudSense (R36 MR1) — Missing Specification Data

Overview

If ServiceSpecification.json attachments/files are not being generated on Service records after running specification generation in CloudSense (UI-driven or via csedm.API_1.generateSpecifications(...)), the most common cause is missing prerequisite catalog/specification data in the org.

In the reported scenario (CloudSense R36 MR1 in a Sandbox), the issue was resolved by restoring missing csedm__Specification__c records and ensuring required relationships existed (including OE PCs linked to the parent PC). No hotfix or engineering patch was required.

Solution

Issue / Symptom

Symptom: “ServiceSpecification.json attachments aren’t getting generated on Service records.”

This may be observed after running specification generation where the expected JSON attachment/file never appears on the Service record(s).

Affected Environment

  • CloudSense package version: R36 MR1 (as reported)
  • Commonly seen in: non-prod orgs (Sandbox / DEV / FAT) after org refresh, partial data loads, or incomplete configuration/data migrations

Root Cause

Specification generation depends on prerequisite CloudSense records and relationships. If they are missing, ServiceSpecification.json will not be generated.

  • No OE PCs linked to the parent PC, so the engine has nothing to generate specifications from.
  • Missing csedm__Specification__c records (Specification records) that should exist for Product Definitions.

How to Diagnose

1) Confirm whether csedm__Specification__c records are missing

Run the following SOQL query (for example, in Developer Console or Workbench) and validate you get the expected rows for your catalog:

SELECT Id,
       csedm__Product_Definition__r.Name,
       csedm__Product_Definition__r.cscfga__Active__c
FROM csedm__Specification__c

What to look for:

  • If this returns no rows (or far fewer than expected), the environment likely lacks required Specification records.
  • Validate that referenced Product Definitions are active where appropriate.

2) Check OE PC linkage to the parent PC

Using debug logs and/or record inspection, confirm whether OE PC records exist and are linked to the relevant parent PC used by your order/basket/service flow.

  • If no OE PCs are linked, specification generation cannot proceed.
  • Note: Exact object/field navigation may vary by implementation; the key condition is that an OE PC exists and is correctly related to the parent PC.

Resolution Steps

  1. Restore prerequisite Specification data

    Import/add the missing csedm__Specification__c records into the org using your standard data migration approach (for example, a controlled data load from a known-good source environment).

    Important notes:

    • Ensure the imported csedm__Specification__c records correctly reference the intended Product Definitions.
    • Ensure any required related records that drive OE PC creation/linkage are also present (as applicable to your implementation).
  2. Re-run specification generation

    Re-test using your standard method. If using Apex, a typical pattern is:

    List<Id> subscriptionIdList = new List<Id>{ '<subscription_id_1>', '<subscription_id_2>' };
    List<Id> deliverableIds = new List<Id>();
    Boolean isRegenerateSpecs = true;
    
    String result = csedm.API_1.generateSpecifications(subscriptionIdList, deliverableIds, isRegenerateSpecs);
    System.debug('Result: ' + result);
  3. Verify output on the Service record
    • Open the relevant Service record(s).
    • Confirm the ServiceSpecification.json attachment/file is now created as expected.

Validation Criteria (What “Fixed” Looks Like)

  • The generation run completes and the expected ServiceSpecification.json is present on the Service record(s).
  • Repeated runs continue to generate/refresh the attachment when isRegenerateSpecs = true (or an equivalent regeneration option is used).

Frequently Asked Questions

1. How do I know I’m experiencing the same issue?

You see the symptom “ServiceSpecification.json attachments aren’t getting generated on Service records” after running specification generation (UI or csedm.API_1.generateSpecifications(...)), and the Service records never receive the expected JSON attachment/file.

2. Is this a CloudSense product defect that requires a hotfix or upgrade?

In this case, no. The resolution was to restore missing prerequisite org data (not to apply a code fix). If your org has the correct data and the issue persists, collect fresh logs and investigate separately.

3. What query should I run to check whether required Specification records exist?

Run:

SELECT Id,
       csedm__Product_Definition__r.Name,
       csedm__Product_Definition__r.cscfga__Active__c
FROM csedm__Specification__c

If this returns no rows (or fewer than expected), your org may be missing required csedm__Specification__c records.

4. What should I verify after importing the missing csedm__Specification__c records?

Re-run specification generation and confirm:

  1. OE PCs are present and linked to the parent PC, and
  2. ServiceSpecification.json is created on the Service record(s).
5. What if I import the records but ServiceSpecification.json still doesn’t generate?

Re-check the following:

  • Whether OE PCs are actually being created/linked to the parent PC in your flow
  • Whether the imported csedm__Specification__c records correctly reference the intended Product Definitions
  • Whether additional prerequisite configuration/data (specific to your implementation) is missing in the target environment

If the symptom persists, capture fresh debug logs around a single reproduction and compare record creation/linking steps to a working environment.

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

  2. Posted

Comments