Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Optical character recognition scanning in the Pega Sales Automation SAPlus sample application

Updated on May 10, 2021

You can demonstrate optical character recognition (OCR) scanning by using the Pega Sales Automation SAPlus sample application.

Pega Sales Automation Implementation Guide Pega Sales Automation Implementation Guide Pega Sales Automation Implementation Guide

Pega Sales Automation includes a sample application package that you can use to demonstrate the application's features. If you are using the Pega Sales Automation mobile app, you can use OCR technology to scan a business card and create a contact in the Pega Sales Automation application. You use your mobile device's camera to take a picture of a business card and send it to a third-party OCR software vendor, where it is parsed into a standard output, such as XML or JSON. The result is then mapped back to Pega Sales Automation to create a new contact record.

Creating account for third-party OCR software

To demonstrate the OCR functionality, the sample package uses the software company Abbyy as the third-party OCR software vendor.

After you create an account and an application, Abbyy sends an email to the email address that you used to register the account. The email contains the application ID and password that you need to use when defining parameters for the getCardData Java API method. The Abbyy OCR functionality is available in the sample application when the Abbyy application configuration is complete.

  1. Access the Abbyy website at http://cloud.ocrsdk.com.
  2. Click Register.
Result: This creates an account where you can specify an application name.

Pega Sales Automation extension points for OCR

Pega Sales Automation uses the GetCardData activity and the BusinessCardParseData data transform extension points to manage OCR scanning functionality.

In the sample application, the GetCardData activity calls the getCardData Java API method, which accepts the following arguments:

  • File content
  • Abbyy project name
  • Abbyy project password

The file content is passed into the GetCardData activity from the ScanBusinessCard activity, which contains the image of the scanned business card.

The Java API method getCardData comes from a custom Java JAR file called PegaCRMAbbyy.zip, which is a Java wrapper application that calls the Abbyy software. It is included in the SAPlus sample application RAP.

The BusinessCardParseData data transform maps the data that is returned from the third-party software vendor to the contact work object in the Pega Sales Automation application. Abbyy returns an XML structure after processing the file image that is received from the app. In the sample application, the data in the XML structure is placed in the data structure PegaCRM-Int-BusinessCard-Abbyy- by using the following subclasses:

  • DocumentType
  • BusinessCardType
  • FieldType
  • CharactersType
  • CharType
  • FieldComponentsType
  • FieldComponentType

The BusinessCardParseData data transform then maps the data from the XML data model to the contact data structure and makes it available in the application.

  • Previous topic Demonstrating lead capture from web forms in the Pega Sales Automation SAPlus sample application
  • Next topic Application stack

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us