Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference CPQ Admin Web Service Current: Retrieving of Product Hierarchy PDF Download PDF Download page Retrieving of Product Hierarchy. Current page All pages Retrieving of Product Hierarchy You can use this API to retrieve the product hierarchy for a given product in JSON array.APISignaturegetProductStructurewebService static Apttus_Config2.CPQAdminStruct.HierarchyResponseDO getProductStructure(Apttus_Config2.CPQAdminStruct.HierarchyRequestDO hierarchyRequestDO)Request ParameterNameTypeDescriptionhierarchyRequestDOApttus_Config2.CPQAdminStruct.HierarchyRequestDOThe hierarchy request data object.Request Data Object - Apttus_Config2.CPQAdminStruct.HierarchyRequestDONameTypeDescriptionProductIdIdThe Id of the product for which you want to retrieve hierarchy.Response Parameter - Apttus_Config2.CPQAdminStruct.HierarchyResponseDOFieldTypeDescriptionProductStructureJSONsList<Apttus_Config2.CPQAdminStruct.MapDO>The product hierarchy structure in JSON format.SuccessBoolean Indicates whether building hierarchy was successful or not.Response Data Object - Apttus_Config2.CPQAdminStruct.MapDOFieldTypeDescriptionStringKeyThe Id of the product.StringValueThe value refers to the JSON string of the product tree.Code SampleThe below sample code returns the product hierarchy for the given product in JSON array. //The below method returns the entire product hierarchy for the given product in JSON Array public List<Apttus_Config2.CPQAdminStruct.MapDO> getProductStructure(String productName) { Product2 bundleProduct = [SELECT Id, Name FROM Product2 WHERE Name = :productName LIMIT 1]; Apttus_Config2.CPQAdminStruct.HierarchyRequestDO request = new Apttus_Config2.CPQAdminStruct.HierarchyRequestDO(); request.ProductIds.add(bundleProduct.Id); Apttus_Config2.CPQAdminStruct.HierarchyResponseDO response = Apttus_Config2.CPQAdminWebService.getProductStructure(request); return(response != null && response.ProductStructureJSONs.size() > 0 ? response.ProductStructureJSONs : null); } CODE ×