How to manage multiple identifiers?

How to manage multiple identifiers? Each IOT device has its own identifier. Kalix entity has its own identifier when ever it is created. When data is received from IOT it contains IOT identifier.
How can the entity be rehydrated using the external identifier provided by the IOT device.

You need build the system as such that there is a 1:1 relation between the IOT device and the Kalix Entity model.

When you receive data from the IOT device, you use its identifier to build the command that you will send to the entity.

If you are using a Protobuf SDK, then the identifier should be a field in message annotated with Kalix’ entity_key annotation.

If you are using the code-first SDK, the identifier needs to be part of the REST path you use to reach out to the Entity.