Refactor externalKey to be of type string (uuid representation)