Dissociating Attribute Group and Products
You can use this API to remove the association attribute group and products.
|
API |
Signature |
|---|---|
| removeAttributeGroup |
webService static Apttus_Config2.CPQAdminStruct.ProductAttributeResponseDO removeAttributeGroup(Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO prodAttrRequestDO) |
|
Request Parameter |
||
|---|---|---|
|
Name |
Type |
Description |
| prodAttrRequestDO | Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO |
The product attribute request data object. |
|
Request Data Object - Apttus_Config2.CPQAdminStruct.ProductAttributeRequestDO |
||
|---|---|---|
|
Name |
Type |
Description |
| ProductAttributeDOs | List<Apttus_Config2.CPQAdminStruct.ProductAttributeDO> |
The list of product attribute data objects. |
| ProductAttributeGroupMemberSOs | List<Apttus_Config2__
ProductAttributeGroupMember__c> |
The list of attributes for the product attribute group. |
|
Data Object - Apttus_Config2.CPQAdminStruct.ProductAttributeDO |
||
|---|---|---|
|
Name |
Type |
Description |
| AttributeGroupName | String |
The name of the attribute group you need to dissociate with the product. |
| ProductAttributesToAdd | List <String> |
The API name of the attributes you want to add to the attribute group. |
| ProductAttributesToRemove | List <String> |
The API name of the attributes you want to remove from the attribute group. |
| ProductId | Id |
The ID of the product. |
|
Response Parameter - Apttus_Config2.CPQAdminStruct.ProductAttributeResponseDO |
||
|---|---|---|
|
Field |
Type |
Description |
| ProductAttributeGroupResponseMap | List<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. |
| Success | Boolean |
Indicates whether the attribute group was dissociated successfully or not. |
|
Response Data Object - Apttus_Config2.CPQAdminStruct.MapDO |
||
|---|---|---|
|
Field |
Type |
Description |
| String | Key |
The name of the attribute group. |
| String | Value |
The value refers record of the dissociated attribute group. |
Code Sample
The sample code below enables you dissociates products and an attribute group.
public List<Apttus_Config2__ProductAttributeGroupMember__c> disassociateAttributeGroups(Id attributeGroupId, Id productId)
{
Apttus_Config2.CPQAdminStruct.ProductAttributeDO requestAttributeDO = new Apttus_Config2.CPQAdminStruct.ProductAttributeDO();
requestAttributeDO.AttributeGroupId = attributeGroupId;
requestAttributeDO.ProductId = productId;
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.removeAttributeGroup(requestDO);
return response.ProductAttributeGroupMemberSOs;
}
