
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
08-26-2022 11:19 AM - edited 07-09-2025 11:21 AM
Using Document Intelligence with Flow Designer
Easily set up automation for Document Intelligence Data Extraction in Flow Designer. The key benefits are:
- Easy to embed Document Intelligence in Flow Designer to automate the end-to-end process
- Reduce time-to-value with a low-code setup
- Flows are created from the Use Case with pre-populated templates
This guide is part of a series, following the Introduction to Document Intelligence.
For a general overview start with the Quick Start Guide.
In this guide, we'll use Document Intelligence v3.1 with Document Intelligence Admin in a Vancouver instance.
Before starting
We are assuming here that there is an existing workflow where a document is processed manually. We are using Document Intelligence to automate this process.
Work is routed via an Invoice Task record (extends Task table) with its attachment. After processing, the values are captured in the same record.
We have string fields on the Invoice Task to capture the extracted values.
We are extracting table data, these values are stored in a second table (Invoice Line Item). We have string fields on the Invoice Line Item to capture the extracted values and a reference field to the Invoice Task.
Flow chart of the desired state: work is routed via an Invoice Task record and the document is processed with Document Intelligence
Best practice: Understand the entire workflow, define your business outcomes and benchmark your existing process so you are able to evaluate the value provided by the solution based on Document Intelligence.
Setting up the Document Intelligence Flows
Use Case and Fields
Navigate to Document Intelligence > Document Data Extraction Administration > Use Cases and create a new Use Case (or open an existing one).
When creating the Use Case, a Target Table can be specified, this is the table used to receive the document from and store the extracted values. It is important to set the value of the Target Table (in our case Invoice Task), to leverage all the capabilities of the Flows when we configure the integration.
Create the Fields from the Fields tab.
There are different types of Fields and their behavior differs in regards to how they are handled by the Flow.
|
|
Each Field can be mapped to a Target Field on its selected Target Table and can be assigned a Data Type.
Selecting a Data Type greatly simplifies the conversion (or normalization) of a piece of text into typed data. The supported Data Types are:
- Text
- Date
- Integer
- Decimal
- Float
- Checkbox
Now, let's look at our example.
Single Fields
For each Single Field, set the Type and Target Field on the Target Table where the value will be stored.
In this example, we create four Fields: one for the invoice number (Text), one for the name of the company that sent the invoice (Text), one for the invoice date (Date) and one for the total amount of the invoice (Decimal). We map them to the fields on the Invoice Task table.
Table
Create a Table from the Fields tab. Add the Target Table, this is the table used to store the extracted values. Use the Parent mapping to field to select the reference field on the Target Table that will store the relationship with the record that triggered the DocIntel task.
In this example, we use the Invoice Line Item table. We'll want one new record on that table for each line in the table to be extracted. In order to keep track of where these items came from, we have a Reference field to the Invoice Task table (called Invoice Task).
(It also allows to use a Related List to easily display the Line Items related to an Invoice Task).
Create one Column per attribute to extract. For each one, set up the Data Type and the Target Field on the Target Table where the value will be stored.
In this example, we create 3 Columns: one for the item name, one for the quantity and one for the amount of the line item. We map them to the fields on the Invoice Line Item table.
Adding Flows
Now that we have created all the Fields and mapped them to existing Tables and Fields on the Now Platform, we can create the Flows.
Navigate to the Integrations tab, click on New integration.
There are two types of integration:
- Process Task. This integration is used to trigger document processing when a new record from the Use Case's Target Table is created (the attachment should be on this record). It creates a new Document Task and starts the AI recognition and predictions.
- Extract Values. This integration is used when a Document Task has been completed (whether automatically or with review), to copy the values to the target record(s) as per the mapping defined on our Fields.
Checking the Create Flow box will create a Flow that is specific to this Use Case based on the templates and populate it with the relevant information from your Use Case.
Now, let's look at our example.
Process Task Flow
Create a new Integration. For the Type, select Process Task and check the Create Flow box.
We could add a Condition to only trigger Document Intelligence after some conditions have been met, for example, the State is Work in Progress or Active is True.
Then Save.
Once created, the Integration is visible in the list.
The Flow needs to be Activated
Open the link to the Flow or by navigating to Flow Designer.
Review the Flow that was created and Activate it.
Extract Values Flow
Close the browser tab and navigate back to the Document Intelligence Admin with your Use Case open.
Create a new Integration. For the Type, select Extract Values and check the Create Flow box.
Once created, the Integration is visible in the list.
The Flow needs to be Activated
Open the link to the Flow or by navigating to Flow Designer.
Review the Flow that was created and Activate it.
Note that the Flow actions used in the templates are also available from the Actions list for your custom Flow developments.
Using the Flows
Once the setup is complete, let’s look at how well it works.
Navigate to the Invoice Task list and create a new Invoice Task with the attachment (you can use the document attached to this article).
Navigate to Document Intelligence > Document Data Extraction > Document Tasks and notice that the Document Task is created as a result of our first Flow.
Wait for the task to be processed (Is Processed=true), and then Show In DocIntel to extract and validate the values. Open the Document Task and, using the Source Record field, notice that the values are extracted and copied over to the Invoice Task as a result of the second Flow.
Notice also that each line in the table is a new record in the Invoice Line Item table with a reference to the Invoice Task.
Troubleshooting
The Document Task is not created after the record in the Target Table is created
Check that the Use Case's Target Table is set properly and the Process Task flow is created and activated.
The Document Task is not processed, the Is Processed field doesn't change to True
Check if any error message appears in the Document Task.
The Document Task is processed but values are not written in my target record after the extraction
Check that the Document Task status changed to Done. Check that the Use Case's Target Table is set properly, that the Fields are mapped properly, and the Extract Values flow is created and activated. The Extract Values flow behaves like any artifact based on GlideRecord, check that the security on your table is set appropriately (ACLs, Cross-scope, Application access, etc.).
For more, check out the FAQ, see the link below.
|
You know how to use Document Intelligence with Flow Designer! |
References
Documentation |
|
FAQ |
- 5,286 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Loic1
Thanks for the Clear Explanation!
Just we started exploring the Document Intelligence. We Followed the same process and Designed flow for the certain use case.
Now we had a question like, Once the document is trained, For some random reason, Doc Intel extract & stored wrong information in target table from the Document which we uploaded, how come we come to know that value is wrong. Is there any review task to be generated using flow Designer?
How to handle the errors with automation?
Regards,
Haseena
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Is it possible to set variables on a catalog item after extracting the values from pdf using document intelligence?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Srikanth Varma Yes it is possible, though not supported by the OOB Flow so it would require some custom scripting to make it work but I've it done. Thanks!

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Haceena Shaik This is most likely a caused by your threshold value, I'd encourage you to take a look at it. Feel free to create a Case if you run into issues that requires technical support. Thanks!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Looks like the document requires a specific format, going through which it trains based on the location/area of particular value within the pdf and reads that value and stores it to an exisitng configured table. However, what happens if the value doesn't have a specific location and can be randomly found anywhere in the pdf?
Basically, my requirement is to scan the entire document and come up wth a key value pair based on the most relevant value for the key/field/column.