Barcoding in CRM

Barcoding in CRM

Is there any way to add a field in CRM contacts or deals that would allow us to scan a barcode to populate data for that field? I would like to track checked out samples with customers and would like it where staff can simply scan a barcode on the sample and have it populate in CRM.

Thanks!