Summary
To automate uptake of the extensive data collected on COAs, from early on we've used a process we call Zoning. The physical process of Optical Character Recognition guided by Zoning is still the most-used method of data acquisition from image-like documents such as DOC, DOCX, PDF, and TIF/TIFF files. The tools we provided for performing these procedures were the best available at the time, but they were complex and sometimes difficult. Now technology has provided some new tools, so we have rebuilt our Zone Editor and also added optional artificial intelligence to help accelerate the Zoning process still more over time.
Example of In-Process Zone Editor:
AI Zoning Editor Walkthrough
Creating a New OCR Template
For this article, we will be starting with a New OCR Template.
Steps:
Step 1: Hover your cursor over the Configuration tab at upper right and click Import Templates.
Step 2: Search that page to ensure you do not already have an existing OCR Template for the Supplier or Item by typing the Item ID or Name and Supplier ID or Name in the appropriate Filter cells and pressing Enter.
Step 3:
- If you find a result, click the blue arrow rectangle at far left on that Template's grid row. This will load the existing Template from that row, and allow you to edit it.
- If NO results appear, click the blue New button at upper right and select OCR Template.
Step 4: To fill in the New OCR Template form, set the following configurations as needed.
- Attach entire Source File - Click this if you have a COA that is more than one page, and you'd like those additional pages to be available in the COA record. The additional pages will not be Zoned or scanned for data.
- Multi-Lot - Toggle this ON if you have an OCR-able COA which has multiple lots on one page. This will allow you to create multiple Zone files linked to the one OCR Template to capture the data on the various lots recorded on that single COA document. For more information on this, go to "Creating & Editing Multi-Lot OCR Templates".
- Template Name - For easier recognition, include both the Supplier ID and the Item ID in the Name of each Template. If you have more than one Template for the same Item, adding the Template version number to it will also help in identification: Example: Supplier ID - Item ID - v1. You can use any identifier you want, but something similar to this pattern will be easiest to work with in the long run.
- Document type - Does not apply to OCR Templates. You may skip this every time.
- Email FROM Address or Domain - If the COAs arrive from a single email address, then enter that full email address here. If multiple people at the Supplier company send in these COAs, then simply enter their email domain. Domain Example: @FiveStarSupplier.com
- Supplier ID - Enter part of your Supplier's ID and select it from the drop-down list that emerges. (You must select the Supplier ID from the drop-down, to set the identification info into the box in such a way that the system can recognize it). If no Supplier IDs appear, then the Supplier does not yet exist in your system, you have mistyped the Supplier ID, or the Supplier is Inactive. You cannot create a Template when the Supplier is Inactive, so you'll need to Activate the Supplier and Item:
- Go to the Suppliers tab.
- Filter either the Supplier Name or ID column to find the desired Supplier row.
- Checkmark the box at the far-left end of that Supplier's row.
- Click the blue hamburger menu at top right.
- Click Activate in the drop-down list.
- Item ID - Enter part of the Item ID and select it from the drop-down that appears. (As above, you must select the Item ID from the drop-down). If no Item ID appears, then the Item does not yet exist in your system, you have mistyped the Item ID, or the Item is Inactive. You cannot create Templates when the Supplier and/or Item is Inactive; you'll need to Activate the Supplier and Item. See instructions for Supplier ID, above.
- Process Type - Choose COA, CAR, or PO Data. (You must complete this step every time you create a new OCR Template.)
The “Supplier or Item Document” option is used to create OCR Templates for Supplier Documents that are NOT COAs, for attachment to the Suppliers or Items Supplied pages. That will not be covered in this instruction.
Step 5: Now you have a choice to make. You can either:
- (Recommended) Leave this page (your entries on it WILL NOT be lost) by clicking the "Zone File Editor" button on the right side of the page. This will take you into the Editor where you can load an image of your COA for reference and add the Key Phrases AND Zone the Attributes, all at the same time. Don't bother to try to Save your work at this point - the system won't allow you to Save the OCR Template you're creating until the Key Phrases and Zoned Attributes are in.
- Or you can stay on this New OCR Template page and add your Mapped Attributes and Key Phrases here by clicking the appropriate tabs near the bottom of the page. You'll need to have a copy of the COA handy, to read from while creating the Key Phrases.
Zone File Editor
Click the button, Zone File Editor to be redirected to another screen to identify Key Phrases and Map Attributes.
Use the Browse box at top center of the Editor page to find and load the COA document you want to Zone. Loading may take a few seconds.
In the top right area of the Editor page, notice the "Page" box has been set to "1". This indicates that you're now viewing page 1 of your COA document. The "Zone File" box will have ** Create New ** as its default and only entry for the moment.
On the upper left side of the Editor page, you'll see a list of configuration sections you'll need to complete.
- "General" holds the Name of this OCR Template, the Supplier ID / Location, and the Item ID / Name.
- "Key Phrases" is to list bits of COA text that will identify this COA uniquely in the system.
- "Email Attributes" capture data from the email this COA came in on, but not available in the COA itself.
- "Zoned Attributes" will list the names and Zones of the Item Attributes whose values you'll be capturing.
General
Click "General" and you'll get a pop-up like this. Provide any Name you like for this brand-new OCR Template, then in the "Supplier ID" and "Item ID" boxes type enough of the ID characters for each to cause the system to suggest a Supplier and an Item in their respective drop-downs. If there is more than one entry in the drop-down, click the appropriate one (you MUST CLICK the entry, do not try to just type it in the box). It will be moved to the main box.
If you want to attach the complete COA to the Template record, or the COA is a Multi-Lot, checkmark as appropriate.
Key Phrases
"Key Phrases" form the unique identification of the COAs that come from a particular Supplier and are for a specific Item that Supplier provides. You can use any words, numbers, or phrases on the COA that will not change over time on that Supplier/Item combination. All the COAs that you receive for that Supplier/Item MUST have exactly the same Key Phrases on them.
To add your Key Phrases, do the following:
Step 1: Click the "Key Phrases" link to display the "add phrase..." box just below it..
Step 2: At upper center on the page, click "Text". Wait for the system to create a text-based image you can copy from. Ignore the formatting, it's only to make copying easier.
Step 3: As in any text editor, click-and-drag to mark the EXACT TEXT you want to use as a Key Phrase. Try not to include any spaces at the beginning or end of your marked string. Partial words or numbers are OK to use.
Step 4: Ctrl-C / Ctrl-V to copy the marked string into the "add phrase..." box.
Step 5: Click Add or hit Enter to add the string to your Key Phrases list.
- Notice that the texts I've selected for this example WILL NOT CHANGE with the next COAs that come in for this specific Supplier/Item combination. That's why they can act as Key Phrases.
- These Phrases are intended to identify COAs for this Supplier/Item ONLY - try not to use common strings or strings you would find on another Supplier/Item's COAs.
- Key Phrases MUST NOT be a value that you want to Zone on the COA - those values are expected to change frequently.
- If you're Zoning a Multi-Page COA, all the identical Phrases MUST be present on EVERY page.
- Key Phrases themselves do not need Zoning because the system scans each entire document page looking for them.
You must provide at least two Key Phrases, but the more the better for quick, accurate searching by the system. Three or four Phrases are typical and effective.
Mapping Attributes
Email Attributes
In some cases, you may want to capture data that's in the email your Supplier sent this COA on, but not in the COA itself. You can get that data by setting up Attributes to receive any (or all) of the four main types of email data: "To", "From", "Subject", and "Body". You must create these Attributes and set them all to "Applies to All Items" before attempting to set up your Email Attributes. We suggest you use Names like "COA Email To", "COA Email From", etc. for clarity.
Steps:
Step 1: Click the "Email Attributes" link to display four more links below it, named as above.
Step 2: Setting up "To", "From", and "Subject" will simply be a matter of clicking the link then selecting your appropriate "COA Email..." Attribute from the drop-down list. If you want only a certain part of any of these strings, you'll need to use a simple Normalization Script.
Step 3: Using the Attribute for "COA Email Body" may be somewhat more complex, unless all you want to do is capture the entire Body section of the email in that one Attribute. You can certainly do that if needed.
Sometimes, however, you'll only want to get "bits and pieces" of data from the email Body. In that case, you'll need to create a Normalization Script to scan the Body text and select the parts you want. For more information on Normalization Scripts, see our "Normalization Scripts for Import Templates in SC" article. For more complicated Norm Scripts, please contact your CSM.
Zoned Attributes
COAs are all about a Supplier's compliance with your needs. OCR reads the COA Attribute values (text, numbers) that you define by drawing Zone boxes. Drawing a Zone adds a new drop-down box to the Zoned Attributes list, and each box will have to be filled by an Attribute Name selected from its drop-down.
Steps:
Step 1: Note the ultra-simple directions for the Zoned Attributes link - "Draw zones to add attributes" - it really is almost that easy. Pick the first Attribute whose data you want to collect and draw a box around its value (NOT its title). Be sure to leave a bit of space around the value (if possible), and consider that the Supplier may make their PO Numbers longer in the future.
If the COA happens to have very small text, blocks of text that are tightly packed, or is very close to the lines of a table, you'll find Zoom buttons and a small drop-down of options at far upper-right.
When you release the cursor, the box and its numeric label will remain. In the panel to the left, a drop-down box and some icons will appear.
Step 2: Click the drop-down and you'll get a list of all Attributes available for Zoning. Select the Attribute this Zone is to represent, and it will appear in the main drop-down box.
The list will only contain Attributes that are set to "Applies to all Items". If you do not see your expected Attribute in the drop-down, go to Configuration > Attributes and set that Attribute to Apply to All.
Step 3: Continue drawing Zones and linking them to Attributes until you've covered all the values you want to capture.
You can also apply multiple Attributes to a single Zone. This means that the data captured from that one Zone will be used to fill in ALL of the Attributes you list under it. A Normalization Script is no longer required to accomplish this. You MUST, of course, have all the Attributes you want to fill created, ready to receive data. Be sure to review our new Lasso feature, detailed below! It's another tool to make Zoning easier.
Artificial Intelligence
Now we'll switch to an example of a Multi-Lot COA.
The principles of AI can be applied to many, many things. In our system, we have used it to automatically make Zone suggestions for any COA document. It starts out making its best guess based on its original programming, then, as it sees more of the final-edited Zone files you Save, it learns many of your Zoning "habits" and begins to refine its suggestions based on them.
Let's say you have a Multi-Lot COA like the following. Each column to the right of the Reference/Sublots column is a list of data for the Sublot identified by the number at the top of the column ("12" through "17"). You would need to create six Zone files to gather all these Sublots of data.
Steps:
Step 1: As you can imagine, if done manually, this would be a lengthy and error-prone process. This is where our AI comes in. At top center above the COA image, there is a checkbox named "Show AI Suggestions" - mark the checkbox to "turn on" the AI.
- You must be in either the "Draw" or "Lasso" tool, at far upper-right in the image below, to see this checkbox.
- You will need to adjust the size or placement of any Zone that includes part of a vertical table-line.
After a few seconds of deliberation, your COA image will look something like this:
Each of the orange-outlined boxes is a potential Zone suggested by the AI. As you can probably see, some of the potentials are not cells that you would want to Zone, such as the Specification and Reference columns. Remember, since you've never used this AI before, this is its "first-guess" based on its initial programming.
Step 2: Pick the first Zone you want to use by clicking inside its orange box.
- The box will turn light blue and a label-number will pop up beside it. When you move your cursor out of the Zone-box, the number will pop down into the box.
- If you need to adjust the size or placement of the box, just click inside it again to get the handles for it.
- An Attribute drop-down will appear below the Zoned Attributes heading, on the left. Note that it has the same label-number as the Zone box.
Step 3: Continue selecting Zones in the same column. Do NOT select Zones from any other column. Very shortly, your COA image and Zoned Attributes list would look like this.
Step 4: Now add the Attribute Names in the Zoned Attributes list. Open each drop-down and select the Attribute Name that corresponds to its Zone number.
Rather than picking directly from the drop-down, you can type the first letter/number of the Attribute Name you're looking for into the box, and with each further press of that letter or number, the system will run through the entire subset of Attribute Names beginning with it. When you get to the right name, simply click on the drop-down box containing it to lock it in.
Step 5: When each of your Zones has been related to an Attribute Name, Save your work. If anything is lacking or incorrect you'll get an error-list. Simply fix the errors and Save again.
If you're going to use this feature, you'll likely want it to learn. The only way this can happen is if you use it every time you Zone, so that it has many examples to refer to.
Lasso Tool
As mentioned above, our current example is a Multi-Lot COA, and you will need to create six Zone Files for it in total. At this point, you've created Zone File "1" for Sublot column "12" - now you need to produce Zone File "2" for the next Sublot, "13", and so on. Here's where our Lasso tool becomes invaluable. It can "grab" a whole group of Zones in the COA image and allow you to copy or move them to:
- Another spot on the COA,
- Another page in a Multi-Page COA
- Or in this case, a brand-new Zone File
This is especially nice when you're Zoning Multi-Lot COAs where the data is arranged in tables. You might want to review the article "Creating & Editing Multi-Lot OCR Templates" for more details.
Steps:
Step 1: Click the blue drop-down beside the Save button at upper right. The "Copy to New File" option will be active. Click it to create Zone File "2" using the initial positions of the Zones you've created. You'll be asked to confirm, then the Zone File box will change to "2".
Step 2: Click the "Lasso" button at top center of your page. Nothing will change appearance, but the Lasso is now ready to use.
Step 3: Click-and-drag to draw a box that completely surrounds any Zones you want to copy to a new position. In this case, that's ALL the current Zones. You don't have to be exact with the box - just make sure it completely contains all the Zones you want to copy (and in this case, vertical lines do not matter). As you stretch the Lasso box, note that each of the Zones gets an animated outline to show that it's selected.
Step 4: When you release the cursor, the Lasso box will disappear but all the selected Zones will still be animated and showing their numbers.
- At this point, DO NOT CLICK OUTSIDE any of the selected Zones, or the Lasso function will assume you want to start a NEW grouping and the current grouping indicators (the animated outlines and ID numbers) will disappear, undoing your group.
- You can, however, click-and-hold INSIDE any of the grouped Zones to move the entire group with your mouse/touchpad (but see Pro Tip, below). As you move over the grouped Zones, any selected Zone will display the "plus-shaped-arrows" cursor; any other box will show the "hand" cursor and a tag saying "Add Suggestion".
Move lassoed zones around with arrow keys. These will give you much more precision in positioning the group.
If you do want to add any of the "Add Suggestion" cells to the data you'll be capturing, just click on that cell. The box will gain an ID number and a new drop-down will be added to the Zoned Attributes list - but since you've changed the group contents you'll have to re-Lasso the desired Zones again.
Step 5: Now you have seven Zones selected. It will look like the image above, but without the Lasso box.
Use arrow keys to move the group to the right until they line up with the same cells in Sublot column "13". Be as accurate as possible - you may want to Zoom in before doing this. Each press of an Arrow Key will move the group just one pixel. You can hold the Arrow Key down to move more quickly, and you can also use Shift-Arrow to move the group a larger distance with each press.
Step 6: Click Save. This will Save your Zone File "2" with the positions to which you moved the Zones. It will not alter anything about Zone File "1".
Step 7: So here are the steps:
- Copy to New File
- Lasso your Zones
- Move them to the new location
- Save
Continue with this procedure until all six Sublot data columns have their own Zone File. Do a final verification by loading each Zone File to review its configuration and position.