Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference CPQ Admin Web Service Current: Creating New Categories PDF Download PDF Download page Creating New Categories. Current page All pages Creating New Categories You can use this API to create new categories with the minimum required parameters like name, type, and label.APISignaturecreateCategories()webService static Apttus_Config2.CPQAdminStruct.CategoryResponseDO createCategories(Apttus_Config2.CPQAdminStruct.CategoryRequestDO categoryRequestDO)Request ParameterNameTypeDescriptioncategoryRequestDOApttus_Config2.CPQAdminStruct.CategoryRequestDOThe category request data object.Request Data Object - Apttus_Config2.CPQAdminStruct.CategoryRequestDONameTypeDescriptionCategoryDOsList<Apttus_Config2.CPQAdminStruct.CategoryDO>The list of category data objects.Response Parameter - Apttus_Config2.CPQAdminStruct.CategoryResponseDOFieldTypeDescriptionCategoryDOsList<Apttus_Config2.CPQAdminStruct.CategoryDO>The list of category data objects.CategoryResponseMapList<Apttus_Config2.CPQAdminStruct.MapDO>The list of key-value pairs. The key refers to the category name that was passed in the request and the value refers to the Id of the category.Data Object - Apttus_Config2.CPQAdminStruct.CategoryDONameTypeDescriptionLabelStringThe label of the categoryNameStringThe name of the categoryOptionalFieldsList<Apttus_Config2.CPQAdminStruct.MapDO>The list of optional field values. You can use this parameter to associate additional field values with the category.TypeString Type of the category. You can use the following values:OfferingOption GroupBothResponse Data Object - Apttus_Config2.CPQAdminStruct.MapDOFieldTypeDescriptionStringKeyThe name of the category.StringValueThe value refers to the Id of the category.Code SampleThe below sample enables you to create categories. You can also add optional fields, add the namespace to the field names. /** * The below code create categories of type Option Group and Offering */ Public void createCategories() { Apttus_Config2.CPQAdminStruct.CategoryResponseDO categsResponse = null; Apttus_Config2.CPQAdminStruct.CategoryRequestDO categsRequest = new Apttus_Config2.CPQAdminStruct.CategoryRequestDO(); Apttus_Config2.CPQAdminStruct.CategoryDO categDO = null; List<Apttus_Config2.CPQAdminStruct.MapDO> mapDOList = null; Apttus_Config2.CPQAdminStruct.MapDO mapDO = null; // CREATE 3 CATEGORIES: // CREATING 1ST CATEGORY // necessary fields categDO = new Apttus_Config2.CPQAdminStruct.CategoryDO(); categDO.Name = 'CategoryOptionGroup1'; categDO.Label = 'CategoryOptionGroup1'; categDO.Type = 'Option Group'; mapDOList = new List<Apttus_Config2.CPQAdminStruct.MapDO>(); // additional fields // 1st mapDO = new Apttus_Config2.CPQAdminStruct.MapDO(); mapDO.Key = 'Apttus_Config2__GuidePage__c'; mapDO.Value = 'a page'; mapDOList.add(mapDO); // 2nd mapDO = new Apttus_Config2.CPQAdminStruct.MapDO(); mapDO.Key = 'Apttus_Config2__Active__c'; mapDO.Value = 'true'; mapDOList.add(mapDO); // add categDO to categsRequest categDO.OptionalFields = mapDOList; categsRequest.CategoryDOs.add(categDO); // CREATING 2ND CATEGORY // necessary fields categDO = new Apttus_Config2.CPQAdminStruct.CategoryDO(); categDO.Name = 'CategoryOffering1'; categDO.Label = 'CategoryOffering1'; categDO.Type = 'Offering'; // add categDO to categsRequest categsRequest.CategoryDOs.add(categDO); // CREATING 3RD CATEGORY // necessary fields categDO = new Apttus_Config2.CPQAdminStruct.CategoryDO(); categDO.Name = 'CategoryOptionGroup2'; categDO.Label = 'CategoryOptionGroup2'; categDO.Type = 'Option Group'; // add categDO to categsRequest categsRequest.CategoryDOs.add(categDO); // create categories categsResponse = Apttus_Config2.CPQAdminWebService.createCategories(categsRequest); } CODE ×