OCR, Bar Code and QR Code Functionality in Forms

1. Feature Overview

LeadSquared forms support Optical Character Recognition (OCR), Barcode, and QR code functionality. These features enable you to extract data from physical documents, scan product information, track delivery packages, and lots more. While Barcode and QR code operations are handled by us, the OCR feature requires you to integrate with an OCR third-party vendor.

To learn more about the forms feature, see How to Create a Form.

 

2. Prerequisites

  • You must be an administrator user of your LeadSquared account.
  • You must be registered with a third-party OCR vendor to use the OCR feature.
  • You must create a Custom Field Set (CFS) with file type fields where you can upload the documents, barcode/QR code images, etc. The CFS must be associated with a lead or an activity type.
  • Development effort is required. We suggest using LeadSquared Lapps for these features.

 

3. How It Works

These features are visible once you add a file type field (using a custom field set) to a form –

  1. While creating a form, add the custom field set (with file type fields) associated with leads or an activity.
  2. Select any file type field in the custom field set.
  3. The options for OCR (enable file export), Barcode and QR code will appear under Field Properties.

Forms file type CFS

 

4. OCR

To support OCR, we generate a file URL that can be passed to your OCR vendor. We suggest writing some custom code using LeadSquared Lapps to pass the file URL to your vendor, and receive the processed data. Using form rules, you can then populate the field values with the response from the OCR vendor.

Note: For security reasons, the file URL is only available for 30 seconds.

Here’s an example –
Let’s say you receive scanned copies of your lead’s PAN cards. You want to capture information from these scanned documents (PAN card number and date of birth) to your form. Here’s how you can set it up –

1. Write a Lapp
Write some code using LeadSquared Lapps to pass the PAN card documents from LeadSquared to your OCR vendor. The response should return the required fields – PAN card number and date of birth for example. This Lapp will be called by your LeadSquared form.

2. Add the Custom Field Set to Your Form
Add the CFS containing the file type fields to your form as shown above.

3. Enable File Export

  1. Select the file type field in your form.
  2. Under Field Properties, click the Enable File Export enable icon slider. 

enable file export OCR

4. Configure Form Rules
Navigate to the Rules tabs at the top of the page. Set up the condition as follows –

If PAN Card file is uploaded, then set value of PAN number and date of birth fields to ‘Data From Lapp’ (this calls the Lapp you wrote in step 1). Set the API response key fields to map the corresponding values returned from the OCR vendor. Click Add Rule when you’re done –

OCR Form Rule Set Up

For more details on form rules, see How to Create a Form.

 

5. Barcode and QR Code

LeadSquared supports barcode and QR code decoding. No third-party vendor is required for this service. The process is similar to the OCR set up listed above, with a few minor changes.

Here’s an example –
Let’s say you receive images of a barcode or QR. You want to capture information from these codes such as product details, price information, delivery tracking details, etc., to your form. Here’s how to set it up –

1. Write a Lapp
Write some code using LeadSquared Lapps to handle the information extracted by the barcode or QR code. This Lapp will be called by your form.

2. Add the Custom Field Set to Your Form
Add the CFS containing the file type fields to your form as shown above.

3. Enable Barcode Scanning or QR Code Scanning

  1. Select the file type field in your form.
  2. Under Field Properties, click the Enable Barcode Scanning or QR Code Scanning enable icon slider. 

QR Code forms integration

4. Configure Form Rules
Navigate to the Rules tabs at the top of the page. Set up the condition as follows –

If Product QR Code file is uploaded, then set value of Product Specification and Product Price fields to ‘Data From Lapp’ (this calls the Lapp you wrote in step 1). Set the API response key fields to map the corresponding values returned by the Lapp after barcode/QR code decoding. Click Add Rule when you’re done –

QR code scanning rules

 

Any Questions?

Was this article helpful? We’d love to hear your feedback in the comments section below.

Was this Helpful?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments