get correct plan id (not plan detail id)