Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Deleting data point values

Deleting data point values

The DataPointValueService class provides the DataPointValueService.removeValues() method to delete one or more data point values. You can provide one or more DataPointValue instances corresponding to the data points that you want to delete. A DataPointValue instance has a unique uidPk value corresponding to the location of the data point value in the database. When you use the DataPointValueService.removeValues() method to delete data point values, such as cart gift certificates, order data, or customer profile, the system deletes data point values from the database. For example, when you use the DataPointValueService.removeValues() method to delete your street address, the system deletes the street address from the database.

Note: For data point values, such as IP addresses, order payment gift certificate, email addresses, the values are set to -.
To remove data point values, run the following method with the collection of data point values that you want to remove:
int numOfRemovedDataPointValues = dataPointValueService.removeValues(dataPointValues);
.
The dataPointValues is the collection of data points that you want to remove.
The system returns the number of the data point values removed from the system.