Scan a Barcode in a Lightning Web Component (Beta)

Use the BarcodeScanner API to add barcode scanning to your Lightning web components. Scan UPC, QR, and other standard barcode types from Lightning web components running on a mobile device. Look up product details, record inventory scans, save contact details from a conference badge—your code, your way!

Where: This feature is available in Lightning web components when they’re running in the Salesforce mobile app or Mobile Publisher.

Note

Note

As a beta feature, BarcodeScanner is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time.

This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for BarcodeScanner in the IdeaExchange.

How: See Scan Barcodes with BarcodeScanner (Beta) in the Lightning Web Components Developer Guide.