cancel
Showing results for 
Search instead for 
Did you mean: 

CPQ : How to get the total number of quotes in "preparing" status on a domain ?

agnesbaton
Explorer
0 Kudos
760

We need to get the number of quotes which are in status 'preparing" on a specific domain ? How should we proceed to get it ?

View Entire Topic
eacr
Discoverer
0 Kudos

This one is in tags

<*LIST(
-- To get the lis
SELECT CONCAT(FORMAT(c.USERID, '0000'), FORMAT(c.CART_ID,'0000'), '; ', osd.ORDER_STATUS_NAME, '; ', c.DATE_CREATED) 
FROM CART c
INNER JOIN ORDER_STATUS_DEFN osd ON osd.ORDER_STATUS_ID = c.ORDER_STATUS
WHERE osd.ORDER_STATUS_NAME = 'Preparing'
ORDER BY DATE_CREATED DESC
)*>


<*TABLE(
-- To get the count
SELECT COUNT(*) FROM CART c
INNER JOIN ORDER_STATUS_DEFN osd ON osd.ORDER_STATUS_ID = c.ORDER_STATUS
WHERE osd.ORDER_STATUS_NAME = 'Preparing'
)*>
agnesbaton
Explorer
0 Kudos

Could you explain where in cpq, I should put these lines to be executed ?

Thanks