ABBY Vantage Package

Latest Version 1.0.0.0
Latest Release Date 2021-12-1
Author Automation Studio Team
Supports Automation Studio Versions From 7.5

This topic provides information on how to integrate ABBY Vantage into an automation solution in Automation Studio. For information on how to set up and use ABBY Vantage, see the ABBY Vantage documentation.

Description

Use this package to integrate an automation solution with ABBY Vantage. Specifically, this package allows you to send files to ABBY Vantage for analysis and receive the information generated.

ABBYY Vantage is a comprehensive Content Intelligence platform that provides AI-powered cognitive services and pre-trained and trainable skills that can "understand" business documents and extract actionable data and insights.

Before Using this Package

To use ABBY Vantage, you will need:

  • An ABBY Vantage license and user account

  • A Client ID and Client Secret

Before you can start processing documents using ABBY Vantage, you must:

  1. Create ABBY Vantage skills

  2. Configure ABBY Vantage skills

For instructions for all of the above, see ABBY Vantage documentation.

Summary of Contents

This package includes four types, each with its own functions and properties. The main type is the ABBY Vantage type.

Summary of Use

The use of ABBY Vantage consist of the steps below:

  1. Connect to ABBY Vantage and get the skills

  2. Define and start a single transaction

  3. Monitor the transaction (optional)

  4. Download the result

Connect and Get Skills

Before your solution begins sending files to ABBY Vantage for analysis, it needs to connect and get the skills.

  1. Create a variable of type ABBY Vantage.

  2. Specify access details (Client Id, Client Secret, User Name, and Password) by populating the relevant properties of the ABBY Vantage variable.

  3. Use the Connect method to connect to ABBY Vantage.

  4. Get the skills using the Get Skills method. You will need to create a list variable of type Vantage Skills to store the skills received.

For security reasons, avoid using plaintext usernames and passwords. Instead, populate these properties with username and password data stored on the server, using an Application Login Info variable.

Define and Start a Single Transaction

A single transaction involves sending a single file for analysis and receiving the information produced.

Follow the steps below for each transaction:

  1. Create a new transaction using the Create Empty Transaction method.

  2. Attach a file to the transaction using the Add File to Transaction method.

  3. Start processing the transaction using the Start Processing Transaction method.

Alternatively, perform all three steps above using the Create Transaction and Process File method.

Monitor the Transaction

You can monitor the transaction using the Get Transaction Status method. You will need to create a variable of type Transaction Status to store the status information returned.

This method should not be used more often than once per second.

If an error occurs, details will be stored in the Error property of the Transaction Status variable. You can store those details in a variable of type Error Details.

Download the Result

Download the result using the Download Result method.

Sample Project

In this sample scenario, the automation solution sends fuel receipts to ABBYY Vantage. ABBY Vantage uses a pre-defined Fuel Skill to extract information from the receipt and then returns that information to the automation solution.

The three pieces of information that are collected are:

  • Nozzle number

  • Receipt number

  • Product

The solution interacts directly with ABBY Vantage and there is no need for an RT Server.

Download the Project

  1. Download the project files here.

  2. Unzip the downloaded file.

  3. Copy the folder ABBY Vantage AS to any folder, for example, the folder where you store other Automation Studio projects:

    %appdata%\Nice_Systems\AutomationStudio\Projects

  4. Copy the file sample_gas_receipt.jpg to any location.

Open the Project and Enter Account Details

  1. Open the downloaded project in Automation Studio.

  2. Set the initial values of the Password, User Name, Client ID, and Client Secret properties of the Abbyintegration variable.

Run the Project (Separated Steps)

The process below includes separate steps for creating an empty transaction, adding files, and starting the transaction.

  1. Click Start Project.

    The ABBY Vantage Home callout displays.

  2. On the callout, click Connect. Doing so runs the Connect method of the Abbyintegration variable.

    The Response property is now populated with the access token.

  3. On the callout, click Get Skills.

    Doing so runs the Get Skills method of the Abbyintegration variable.

    The list of skills is displayed in the List Of Skills callout.

  4. On the ABBY Vantage Home callout, click Create Transaction & Process.

    The ABBY Vantage Transaction callout displays.

  5. From the List of Skills callout, copy the ID of the FuelSkill.

  6. Paste that ID into the ABBY Vantage Transaction callout and click Empty Transaction. Doing so runs the Create Empty Transaction method of the Abbyintegration variable.

    The TransactionId property of the Abbyintegration variable is populated with the transaction ID for the transaction that was just created.

    The TransactionId is also returned in the Response property.

    Copy that value for future use.

  7. In the ABBY Vantage Transaction callout:

    1. Paste the full path to the file you want to load, e.g.

      C:\temp\sample_gas_receipt.jpg

    2. Paste the transaction ID.

    3. Click Add Files. Doing so runs the Add File to Transaction method of the Abbyintegration variable.

  8. In the ABBY Vantage Transaction callout:

    1. Paste the transaction ID.

    2. Click Start Transaction. Doing so runs the Start Processing Transaction method of the Abbyintegration variable.

    The ResponseCode property of the Abbyintegration variable is set to 200, indicating that transaction processing has started.

  9. In the ABBY Vantage Home callout, paste the transaction ID and click Trans Status. Doing so runs the Get Transaction Status method of the Abbyintegration variable.

    The Status property of the TransactionStatus variable is populated.

    At first, the status will be set to Processing.

    If you click Trans Status again after a short while, the status will be set to Processed, indicating that the transaction completed.

  10. Copy the value of the FileIDs property of the TransactionStatus variable.

    You can copy this value from the Response value.

  11. In the ABBY Vantage Home callout, paste in the transaction ID and File ID and click Download Result. Doing so runs the Download Result method of the Abbyintegration variable.

    The response is displayed in the Response callout.

    You can view the full response below.

The uploaded receipt is shown below. Information collected is indicated.

The table below indicates on which line each collected piece of information is returned in the full response.

Data

Response Line NUmber

Value

Nozzle Number 75 04
Receipt Number 135 00010
Product 105 Petrol

Run the Project (Merged Steps)

To run the same process as above but with fewer steps:

  1. Follow steps 1 to 5.

  2. In the ABBY Vantage Transaction callout, paste in the skill ID and the full path to file to upload.

  3. Click Create & Process Transaction. Doing so runs the method of the Abbyintegration variable.

  4. Continue with the above process at step 9.

ABBY Vantage Type

The ABBY Vantage type is the main type in this package.

Properties

Property

Description

Type

Client ID

The ABBYY Vantage API application identifier.

This should be created by a user with the Tenant Administrator role in ABBYY Vantage. See the ABBYY Vantage Administrators Guide.

Text

Client Secret

The ABBYY Vantage client secret.

This should be created by a user with the Tenant Administrator role in ABBYY Vantage. The client secret value is only available when it is being created. Store it in a secure location. See the ABBYY Vantage Administrators Guide.

Text

Error

Stores any errors returned by ABBYY Vantage (Detail, Instance, Status, Title, and Type).

Error Details

Exception

The exception event.

 

Grant Type

Specifies the grant type. For example, 'password'.

Text

Password

The ABBYY Vantage password.

Text

Response

The API call response from the following functions:

Connect: The ABBYY Vantage access token

Get Skills: The list of skills

Create Empty Transaction: The transaction ID

Monitor Transaction: The transaction ID, the status, the result Files including the fileId (required to download the results), and more.

Download Result: The ABBYY Vantage results.

Text

ResponseCode

The API call response code:

l200 for successful.

l201 for an error.

l404 for no document with ID found.

Number

Scope

Specifies the permissions scope. For example, 'openid permissions global.wildcard'.

Text

Status

The API call status. Completed once done.

Text

URL

The ABBYY Vantage URL:

https://vantage-eu.abbyy.com/

Text

User Name

The ABBYY Vantage user name.

Text

Methods

Method

Description

Return

Add File to Transaction

Adds a file to an ABBYY Vantage transaction.

None

Connect

Connects to the ABBYY Vantage API.

Boolean

Create Empty Transaction

Creates an empty ABBYY Vantage transaction.

Text

Create Transaction & Process Ffile

Creates an ABBYY Vantage transaction and processes the file.

Text

Download Result

Downloads the result of the file processing from ABBYY Vantage.

Boolean

Get Skills

Gets a list of skills from ABBYY Vantage.

List of Vantage Skills

Get Transaction Status

Gets the transaction status.

Transaction Status

Start Processing Transaction

Starts processing an ABBY Vantage transaction.

None

Response

The response is returned in a JSON array. The contents of the response differ for each of the functions listed above. The main properties in that array are described below.

Property

Description

Id

The ID of the transaction.

SkillId

The ID of the applied skill.

SkillName

The name of the applied skill.

Documents

The list of the Documents objects, together with the processing results.

  • Id: The documents ID.

  • ExtractedData: Information about the extracted fields. This structure includes the RawValue of each of the Fields.

  • Pages: Information about the pages of the source document.

For more information, refer to the JSON schema on the ABBYY Vantage Developer's Guide.

CreationTime The time of the transaction.
SourceFiles

The list of SourceFile objects, together with information about the source files submitted for processing. ABBYY Vantage currently only supports one file per transaction.

  • Id: The source file ID.

  • Name: The source file name.

Response to Get Transaction Status

The following is a sample response for the Get Transaction Status method. Use the fileId from this response as an input parameter for the Download Result method.

Response to Download Result Method

The following is a sample response for the Download Result method.