# Abbyy Vantage: Process documents within a conversation

**Cognigy Support**  
November 14, 2023

****  
Source: https://static4.abbyy.com/abbyycommedia/31534/vantage-visual-2560x506.jpg

**This tutorial** will explain **how to integrate** an organization's **Abbyy Vantage** instance **to a Cognigy.AI virtual agent** in order to process user documents during a chat/voice conversation.

- [Source Code](https://github.com/Cognigy/Extensions/tree/master/extensions/abbyy-vantage)

The provider itself describes Vantage as the following:

> ABBYY Vantage is a comprehensive platform of cognitive services that applies AI to understand your documents in a fast and simple way. Vantage makes today’s digital worker and processes smarter by delivering cognitive skills that read, understand, and extract insights from documents, helping enterprises accelerate digital transformation ( [Abbyy](https://www.abbyy.com/vantage/?itm_source=abbyy-internal-search-product), 2021).

---

# Table of Contents

1. [Video Description](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01FF4N8ZFVH9ADC7SVG1RZRNHP)
2. [Install the Abbyy Vantage Extension](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01F35G1EZ8B9T7DGEDJSE9T1M3)
3. [Create an OAuth Connection](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01F330NS152GKEXBSRDXFZ5MGM)
4. [Authenticate the process](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01FE3JRP5VQ6TZWBG336CB3SRV)
5. [Create an Instance Connection](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01FE3JRXGBGMQGC036ZRTCECPD)
6. [Run a Skill as Transaction](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01FE45402Z3RGG4085Q71CE07V)
7. [Check if the process is authenticated](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01FE4546KSNX1ZVM3W8HRAKG4F)
8. [Start a Skill and display the results](https://support.cognigy.com/hc/en-us/articles/4405741734802-Abbyy-Vantage-Process-documents-within-a-conversation#h_01FE454AWW1QX6BM3C4RB9SXAE)

## Video Description

How to install the Abbyy Vantage Extension - YouTube

Tap to unmute

[How to install the Abbyy Vantage Extension](https://www.youtube.com/watch?v=iGD5CFSmB8g) [NiCE Cognigy](https://www.youtube-nocookie.com/channel/UCR2RYQDd-z23CN2iu4LhjKQ)

NiCE Cognigy 2.97K subscribers

## Install the Abbyy Vantage Extension

The first step is to install the required integration. In this case, a so-called [Extension](https://docs.cognigy.com/docs/extensions) is installed to Cognigy.AI. Thus, navigate to the **Extensions Marketplace** inside of the Virtual Agent and add the **Abbyy Vantage** Extension by clicking on the **Install** button. Now follow [this installation guide and upload the Extension to Cognigy](https://support.cognigy.com/hc/en-us/articles/360016505680-Extensions-Installation#upload-an-extension-0-2), where it will be displayed as the following:

**Congrats! The installation of the Extension is finished!**

## Create an OAuth Connection

In this step, a so-called [Connection](https://docs.cognigy.com/docs/connections) will be created. If one, in Cognigy.AI, clicks on the previously uploaded Extension, the following details can be observed:

The red-marked part in the above figure shows that there are two Connections required. Therefore, they need to be created and filled with the OAuth and instance information. In order to do so, two initial Flow Nodes have to be added to a Flow. First, one can start with the OAuth Connection:

1. Create a new Flow in Cognigy.AI
2. Inside of the Flow Chart, click on **+** and navigate to the Abbyy Vantage Extension:

3. Add the **Authenticate** Flow Node by clicking on it:

4. In order to edit the Flow Node and create the Connection, please click on it. An _Edit Node_ menu will be opened on the right side of the screen:

5. Right next to the Connection field (the first one at the top), one needs to click on the + button. The Connection menu will be opened at the center of the screen:

6. Please contact your Abbyy Vantage administrator in order to provide the following OAuth credentials. Insert the related credentials/information of the organization to the fields:
   1. **clientId**  
      The Abbyy instance client ID
   2. **clientSecret**  
      The Abbyy instance client secret
   3. **username**  
      The administrator's user name
   4. **password**  
      The administrator's password
   5. **url**  
      The Abbyy authentication URL  
      e.g. [https://vantage-preview.abbyy.com/auth/connect/token](https://vantage-preview.abbyy.com/auth/connect/token). This URL could change for different types of Abbyy Vantage installations.
7. Click on the **Create** button

### Authenticate the process

With the above Connection provided, the **Authenticate** Flow Node can be executed in order to store the required **Abbyy Access Token** into the Cognigy [Context](https://docs.cognigy.com/docs/context):

The result looks like the following:

```
{
    "abbyy": {
        "auth": {
        "access_token": "eyJh...",
        "expires_in": 2592000,
        "token_type": "Bearer",
        "scope": "openid permissions"
        }
    }
}
```

In all other related Flow Nodes, such as **Get Skills**, this information must be provided with CognigyScript

```
{{context.abbyy.auth.access_token}}
```

or a Token

## Create an Instance Connection

To go back to the aforementioned **Get Skills** Flow Node, another Connection can be seen in the edit menu:

In this case, the **Abbyy Instance** information is requested, while this information is used by:

1. The **Get Skills**
2. **Run Transaction**
3. and **Get Transaction** (Results) Flow Node.

The _instanceUri_ can be extracted from the **Abbyy Vantage** URL that a person opens in order to access the software:
- e.g. vantage-preview.abbyy.com
- _Please make sure to remove the last "/" from the URL_

With this information, a transaction can be started in the next steps.

## Run a Skill as Transaction

Finally, the Flow is ready to run an Abbyy Skill as a transaction and process user documents. In order to get started, a basic template for such a Flow could look such as:

### Check if the process is authenticated

In this example, the Flow starts with an If Node, checking the existence of the Abbyy Access Token which tells the system if the current conversation is authenticated for further Abbyy actions:

Therefore, the Flow can execute the **Authenticate** Flow Node based on this condition:

### Start a Skill and display the results

Otherwise, any Abbyy **Skill** can be executed within the Cognigy.AI system, while the conversation could wait until the results are available. Last but not least, a Say Node can display the response in a human-readable way:
