logical_id and product in session

finished changing test and session to logical_id and handled API for product name/version in session
`logical_id` should be optional. It should be `None` for records who don't receive it.