Cross Referencing QuoteWerks Quote, Order and Invoice Numbers

We’ve been asked several times by clients how to cross-reference the Quote, Order and Invoice numbers that are processed through QuoteWerks. While you can get the Converted Ref in QuoteWerks (so the Order or Quote an Invoice was Converted from or the Quote and Order came from) there’s no a way within the reporting to get all three numbers together.

However, if you’re feeling adventurous and would like to do a report in Excel with the QuoteWerks database as a remote data source, then try copy/pasting the following query in. It should return you all Invoice Document Numbers with the relevant Quote and/or Order Numbers.

We hope this is of use,

Steve and the Hilltops IT QuoteWerks team.

SELECT ISNULL(DHQ.DocNo, ‘None’) AS [Quote Ref], DHO.DocNo AS [Order Ref], DHI.DocNo AS [Invoice Ref]
FROM QuoteWerks.dbo.DocumentHeaders AS DHI WITH (NOLOCK)
INNER JOIN QuoteWerks.dbo.DocumentHeaders AS DHO WITH (NOLOCK)
ON (DHI.DocNo = DHO.ConvertedRef)
LEFT JOIN QuoteWerks.dbo.DocumentHeaders AS DHQ WITH (NOLOCK)
ON (DHO.DocNo = DHQ.ConvertedRef)
WHERE (DHI.DocType = ‘INVOICE’)
AND (DHO.DocType = ‘ORDER’)
AND ((DHQ.DocType = ‘QUOTE’) OR (DHQ.DocType IS NULL))
UNION
SELECT ISNULL(DHQ.DocNo, ‘None’) AS [Quote Ref], ‘None’ AS [Order Ref], DHI.DocNo AS [Invoice Ref]
FROM QuoteWerks.dbo.DocumentHeaders AS DHI WITH (NOLOCK)
LEFT JOIN QuoteWerks.dbo.DocumentHeaders AS DHQ WITH (NOLOCK)
ON (DHI.DocNo = DHQ.ConvertedRef)
WHERE (DHI.DocType = ‘INVOICE’)
AND ((DHQ.DocType = ‘QUOTE’) OR (DHQ.DocType IS NULL))

Related Stories

See all

Supercharging QuoteWerks Reporting with Excel & Power BI

Oct 01, 2025

QuoteWerks is a powerful tool for creating quotes, orders, and managing customer interactions, but when it comes to reporting, many users find themselves limited by its out-of-the-box capabilities. At Hilltops IT, we believe your data should work harder for you. That’s why we’ve created a new video that demonstrates how to unlock deeper insights by […]

READ MORE

To AI or not to AI, That is the Question

Sep 29, 2025

When I started to write this article, I hadn’t really anticipated what a ‘can of worms’ it was going to open for me – how far my mind would wander, how may rabbit holes there are to explore, and ultimately how long it was going to turn out! For those of you prospective readers that […]

READ MORE

To AI or not to AI, That is the Question (Summary)

Sep 29, 2025

Overview Summary Hilltops IT is considering the use of AI to enhance software support for QuoteWerks and ConnectIt Software. AI offers clear advantages such as faster responses, personalised assistance, and round-the-clock availability, while also helping support teams scale and operate more efficiently. However, the article also explores the risks, such as loss of human empathy, […]

READ MORE