Deleting attribute values associated with rule-based sales categories
You can delete or remove attribute values used as filters in an RBSC without impacting the RBSC itself.
About this task
Procedure
- Identify the attribute values that need to be deleted.
-
Retrieve the corresponding
ATTRVAL_IDs from theATTRVALtable. -
Verify whether these attribute values are used in any RBSC by running the
following query.
SELECT * FROM DMELEMENTNVP WHERE DMELEMENTNVP.DMELEMENT_ID IN ( SELECT DMELEMENT.DMELEMENT_ID FROM DMELEMENT JOIN DMACTIVITY ON DMELEMENT.DMACTIVITY_ID = DMACTIVITY.DMACTIVITY_ID WHERE DMACTIVITY.NAME LIKE 'DynamicSalesCategoryActivity%' AND DMELEMENTNVP.NAME= 'filterValue' AND DMELEMENTNVP.VALUE = '7000000000000010577' );Where
DMELEMENTNVP.VALUEisATTRVAL_ID. -
After confirming the results above, delete the following rows:
DELETE FROM DMELEMENTNVP WHERE DMELEMENTNVP.DMELEMENT_ID IN ( SELECT DMELEMENT.DMELEMENT_ID FROM DMELEMENT JOIN DMACTIVITY ON DMELEMENT.DMACTIVITY_ID = DMACTIVITY.DMACTIVITY_ID WHERE DMACTIVITY.NAME LIKE 'DynamicSalesCategoryActivity%' AND DMELEMENTNVP.NAME= 'filterValue' AND DMELEMENTNVP.VALUE = '7000000000000010577' );Where
DMELEMENTNVP.VALUEisATTRVAL_ID.Note: Remove the reference toATTRVAL_IDin theDMELEMENTNVP.VALUEtable before deleting the corresponding attribute value from theATTRVALtable. -
Delete the attribute values from the
ATTRVALtable using a data load process to ensure accuracy and efficiency.- Prepare a data load file containing the
ATTRVAL_IDs to be deleted. - Use the appropriate data load utility or script to remove the attribute values from the system.
- Validate the deletion by checking if the
ATTRVAL_IDs no longer exist in theATTRVALtable.
Note: Ensure that the attribute values are not referenced in other areas before deletion to avoid system inconsistencies. - Prepare a data load file containing the