How to set unique id and extract it to perform custom actions

Yes, you can! This other forum post has some guidance on how to do this.