There isn't really much of anywhere to wait before immigration the times I've come into Shanghai. They might not let you just loiter in empty halls for that long, you never know.
And I assume everyone is using an electronic ticket these days, at least for an international flight. So that means that you should bring a copy of the invoice.