purchasebuilder returns purchase built from query string