Skip to content

QR Code Scanning Integration with scanQrCode(onfetch)

Overview

Merciglobal Cloud ERP supports dynamic QR Code scanning to streamline workflows and enhance operational efficiency. The scanQrCode(onfetch) function allows applications to scan a QR code and immediately trigger a data fetch or callback process. This document is designed for:

  • 👩‍💻 Internal Developers
  • 🧑‍💼 Sales Team Members
  • 🧑‍🔧 Technical Support Staff
  • 🤝 Clients leveraging QR-based workflows

What is scanQrCode(onfetch)?

The scanQrCode(onfetch) function is an event-driven utility that activates the device camera, reads a QR code, and executes a custom function once the scan is successful.

Key Features:

  • Triggers device camera for QR scanning
  • Invokes onfetch callback after scan
  • Works seamlessly with Merciglobal Cloud ERP modules
  • Enhances mobile-first interactions

Usage Example

scanQrCode(async (result) => {
    console.log("QR Code Data:", result);
    const data = await fetchCustomerData(result);
    renderCustomerDetails(data);
});

Explanation:

  • result: The decoded string from the QR code
  • fetchCustomerData(result): Custom fetch function using scanned data
  • renderCustomerDetails(data): Renders the fetched result on the UI

Use Cases in Merciglobal Cloud ERP

  • 📦 Warehouse Management: Scan QR codes on inventory to update stock in real-time.
  • 🛒 Sales Orders: Quickly pull customer orders using QR codes on invoices.
  • 🚚 Logistics & Dispatch: Track packages and deliveries through QR scanning.
  • 🧾 Finance & Billing: Authenticate bill details or scan receipts linked with QR codes.

Security Notes

  • 🔒 All scanned data is processed securely in the client session.
  • 🧼 Sanitize and validate all QR outputs before making backend calls.

Developer Tips

  • Ensure HTTPS is used when accessing camera features.
  • Handle permission errors gracefully.
  • Add loading states during onfetch processing.

Sales Team Insights

  • 🎯 Highlight how QR scanning cuts down manual data entry.
  • ⏱ Demonstrate faster workflows during client demos.
  • 📱 Showcase mobile-first capabilities of Merciglobal Cloud ERP.

Need Help?

For technical support or custom integration needs, contact the Merciglobal Cloud ERP Support Team at support@merciglobal.com.


🚀 Embrace seamless data capture with QR technology inside your ERP workflows!