Configure Price Quote (CPQ) CPQ for SOAP API Developers API Reference CPQ Admin Web Service Current: Adding and Removing Attributes from an Attribute Group PDF Download PDF Download page Adding and Removing Attributes from an Attribute Group. Current page All pages Adding and Removing Attributes from an Attribute Group You can use this API to add or remove attributes from attributes groups.APISignatureupdateAttributeGroupwebService static Apttus_Config2.CPQAdminStruct.ProductAttributeResponseDO updateAttributeGroup(Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO prodAttrRequestDO)Request ParameterNameTypeDescriptionprodAttrRequestDOApttus_Config2.CPQAdminStruct.ProductAttributeRequestDOThe product attributes request data object.Request Data Object - Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDONameTypeDescriptionProductAttributeDOsList<Apttus_Config2.CPQAdminStruct.ProductAttributeDO>The list of product attribute data objects.ProductAttributeGroupMemberSOsList<Apttus_Config2__ ProductAttributeGroupMember__c>The list of attributes to be added to or removed from the attribute group.Data Object - Apttus_Config2.CPQAdminStruct.ProductAttributeDONameTypeDescriptionAttirbuteGroupIdIdThe ID of the attribute group.AttributeGroupNameStringThe name of the attribute group you need to associate attributes to.ProductAttributesToAddList <String>The API name of the attributes you want to add to the attribute group.ProductAttributesToRemoveList <String>The API name of the attributes you want to remove from the attribute group.ProductIdIdThe ID of the product.Response Parameter - Apttus_Config2.CPQAdminStruct.ProductAttributeResponseDOFieldTypeDescriptionProductAttributeGroupResponseMapList<Apttus_Config2.CPQAdminStruct.MapDO>The list of key-value pairs. The key refers to the attribute group name that you provided and the value contains the record ID.SuccessBooleanIndicates whether the attributes were added or removed successfully.Response Data Object - Apttus_Config2.CPQAdminStruct.MapDOFieldTypeDescriptionStringKeyThe name of the attribute group.StringValueThe value refers record of the attribute group updated.Code SampleThe sample code below enables you to add attributes in an attribute group public Boolean addAttributesToAttributeGroups(Id attributeGroupId, List<String> attributeList) { Apttus_Config2.CPQAdminStruct.ProductAttributeDO requestAttributeDO = new Apttus_Config2.CPQAdminStruct.ProductAttributeDO(); requestAttributeDO. AttributeGroupId = attributeGroupId; requestAttributeDO.ProductAttributesToAdd = attributeList; Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO requestDO = new Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO(); requestDO.ProductAttributeDOs = new List<Apttus_Config2.CPQAdminStruct.ProductAttributeDO> {requestAttributeDO }; Apttus_Config2.CPQAdminStruct.ProductAttributeResponseDO response = Apttus_Config2.CPQAdminWebService.updateAttributeGroup(requestDO); return response.Success; } CODE The sample code below enables you to remove attributes from an attribute group public Map<Apttus_Config2__ProductAttributeGroup__c> removeAttributesFromAttributeGroups(Id attributeGroupId, List<String> attributeList) { Apttus_Config2.CPQAdminStruct.ProductAttributeDO requestAttributeDO = new Apttus_Config2.CPQAdminStruct.ProductAttributeDO(); requestAttributeDO. AttributeGroupId = attributeGroupId; requestAttributeDO.ProductAttributesToRemove = attributeList; Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO requestDO = new Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO(); requestDO.ProductAttributeDOs = new List<Apttus_Config2.CPQAdminStruct.ProductAttributeDO> {requestAttributeDO}; Apttus_Config2.CPQAdminStruct.ProductAttributeResponseDO response = Apttus_Config2.CPQAdminWebService.updateAttributeGroup(requestDO); return response.Success; } CODE ×