set external_id properly