Resolve the document id from the incoming message