HCL Commerce Version 9.1.12.0 or later

Check the number of order lines

You can run an SQL query to check how many order lines of each type are present in your system. If you have custom order statuses, you might need to adjust the status clause of the query accordingly.

Enablement of HCL Commerce License Metrics

To find out the number of orderlines of each type you have after the HCL Commerce License Metrics is enabled, run the following SQL queries:
  • For Order Items:
    select sum(linecount) from ordaudit where 
    timeplaced > startTime and timeplaced < endDateTime;
    Note: startDateTime and endDateTime represent the time range of interest.
  • For Order Modifications:
    SELECT SUM(COUNT) FROM METRICSUM WHERE METRIC_ID = -2 AND LASTUPDATED >= 'startTime' AND LASTUPDATED <= 'endDateTime';

    For example: SELECT SUM(COUNT) FROM METRICSUM WHERE METRIC_ID = -2 AND LASTUPDATED >= '2021-10-10 10:10:10.000' AND LASTUPDATED <= '2022-10-10 10:10:10.000';

  • For Appeasements:
    SELECT SUM(COUNT) FROM METRICSUM WHERE METRIC_ID = -3 AND LASTUPDATED >= 'startTime' AND LASTUPDATED <= 'endDateTime';

    For example: SELECT SUM(COUNT) FROM METRICSUM WHERE METRIC_ID = -3 AND LASTUPDATED >= '2021-10-10 10:10:10.000' AND LASTUPDATED <= '2022-10-10 10:10:10.000';

  • For Returns:
    SELECT SUM(COUNT) FROM METRICSUM WHERE METRIC_ID = -4 AND LASTUPDATED >= 'startTime' AND LASTUPDATED <= 'endDateTime';

    For example: SELECT SUM(COUNT) FROM METRICSUM WHERE METRIC_ID = -4 AND LASTUPDATED >= '2021-10-10 10:10:10.000' AND LASTUPDATED <= '2022-10-10 10:10:10.000';

Pre-enablement of HCL Commerce License Metrics

If you are using a HCL Commerce version older than the Version 7 Fix Pack 9, then run the following SQL query to determine the number of orderlines from the version prior to HCL Commerce Version 7 Fix Pack 9:

select count(orderitems_id) from orderitems where orders_id in (select orders_id from orders
where status not in ('P', 'N', 'Q', 'T', 'W', 'Y', 'Z', 'NEW', 'RDY', 'CAN') and timeplaced is not null 
and timeplaced > startDateTime and timeplaced < endDateTime);

startDateTime and endDateTime represent the time range of interest.