Create a parser and configure with learning instance

After creating a credential and locker for the custom package and uploading it to the Control Room, create a parser using the custom SDK and configure it with a learning instance in Document Automation.

Prerequisites

Ensure that your custom Package you want to integrate with in Document Automation, fulfills these requirements:
  • The Automation Anywhere IQ Bot Administrator role to configure the parser in Document Automation.
  • A Document Workspace license to configure the parser and integrate with a learning instance.
  • When you create a Package, a defined command variable with inputFilePath must contain the input file path.
  • If the package requires credentials to connect to the external service, the variable name must be same as the attribute defined in the Credential Vault.

    For example, if there is a credential in the Credential Vault with the serviceAccount attribute, then the variable name defined in the command must be serviceAccount to capture the Credential Vault key value .

Configure a third-party parser with a learning instance and use it to process documents in Document Automation.

Procedure

  1. Create a parser.
    To create a parser, provide an input and output contract for the parser package that you want to integrate with Document Automation. For more details, see Sample codes for parser contracts.
  2. Configure a parser with a learning instance.
    After creating a parser, configure it with a learning instance in Document Automation. To configure a parser,
    1. Navigate to AI > Document Automation, and click Configure Parser.
    2. On the Parser Configuration page, click Create Parser Configuration.
    3. Enter the following details for parser configuration and click Next.
      • Name: Provide a parser name. The allowed limit of characters for a parser name is 50.
        Note: Special characters such as ", [, \, ?, <, >, :, $, |, *, /, ] are not supported for a parser name.
      • Description: This is an optional field. Enter a description.
      • Package and Version: Select the relevant package and version from the list.
      • Provider: Select the provider you want to use with the learning instance for document extraction.
      • Document type: Select the document type.
      • Language: Select language and click Add.
      • Credentials: This is an optional field. For the Credentials field, select the Pick a credential option and select the locker, credential, and attribute.
    4. Click Browse to upload a JSON file that contains form and table fields for the parser and click Create.
      Following is the sample schema for a JSON file which contains fields for a parser:
      
      {
      "parserFields": [
      {
      "fieldName": "invoice_number",
      "dataType": "TEXT",
      "fieldType": "KEY_VALUE"
      },
      {
      "fieldName": "invoice_date",
      "dataType": "DATE",
      "fieldType": "KEY_VALUE"
      },
      {
      "fieldName": "total_amount",
      "dataType": "NUMBER",
      "fieldType": "KEY_VALUE"
      },
      {
      "fieldName": "total_price",
      "dataType": "TEXT",
      "fieldType": "TABLE_HEADER"
      }
      ]
      }
      The required parser with the associated package SDK is created and displays in the Parser Configuration list. See the reference project: Amazon Textract.
  3. Create a learning instance and integrate the configured parser with the learning instance. See Create a learning instance in Document Automation.

    The following video demonstrates how to configure a parser and integrate it with a learning instance:

    Consider the following points when working with a parser (such as: create, edit, or delete a parser):
    • You can edit the parser details such as parser name, parser description, and version.
    • You can change the parser details such as document type, language, package name, and field names only when the parser is not used in a learning instance. However, you can add new languages and field names.
    • While editing a parser, when you change the package version in the parser, it might impact the existing document extraction capability of the associated learning instance.
    • If a parser is used in a learning instance, you cannot delete it until the associated learning instance is deleted.
    • While integrating a parser with a learning instance, you are required to create form and table fields that map to the parser fields.
    • When you migrate the learning instances, you also need to migrate the associated third-party parser configuration. If multiple learning instances with the same parser configuration are migrated, then the corresponding parser configuration is migrated only once. If a target configuration exists for the parser, the same is updated with that of the source parser configuration.