Summary
The term "Multi-Page COA" refers to a one-Lot COA document with data that extends to a second page. This differs from a multi-Lot COA, in which a single page will have data for more than one lot. For more information on handling multi-Lot COAs, please see "Creating & Editing Multi-Lot OCR Templates".
For Multi-Page setups, you will create separate import templates for each page. Each page will be related to the other by identical Primary Keys. Common Primary Keys are PO number, MFG Date, and Supplier Lot ID. You will need the exact same Primary Keys on every page, and you will need at least 2 out of the 3 Primary keys to tie them together.
It is recommended that you create a New OCR template, select the Attach Entire Source File toggle button, and label the template name to indicate which page you are zoning. For example, if the COA is 2 pages, Page 1’s template would be called “Item123_SupplierABC_Page 1” and the second template would be called “Item123_SupplierABC_Page 2”. This will make it easier to address any errors that occur.
If a formerly-one-page COA suddenly starts coming in as a multi-page COA, leave the old template. They may revert to the previous version at any point. To address the new COAs, create a New OCR template, check attach entire source file, indicate the page number, and zone as normal.
First Steps
Step 1: Log into TraceGains and click on your customer tile.
Step 2: Hover over Configuration and click Import Templates.
Step 3: Once inside the Import Templates section, search to make sure that you do not already have an existing OCR template for the supplier item. To filter, type in the Item ID and Supplier ID in the appropriate cells and press enter. If you find a result, click the blue arrow rectangle. If no results appear, click 'New' and select 'OCR Template'.
Building Page One
Step 1: Process Type - Click the down arrow in the Process Type box and choose COA, CAR, or PO Data (You choose this every time you would like to do an OCR Template)
Step 2: Attach entire source file: This COA spans across multiple pages, and you would like those additional pages in the COA record.
The additional pages will not be zoned or scraped for data, this merely attaches the multi-page PDF to the COA record on your COA tab. You will have to zone each page as we describe below.
Step 3: Template Name: Include the Item ID, the Supplier ID, and Page number in the name of each template. For example: ItemID_SupplierID_Page1
Step 4: Skip Manage Key Phrases, this is addressed in the next section.
Step 5: When creating a new OCR Template, click 'New Zone File'. If this is a subsequent zone file, click 'Zone File Editor.'
Step 6: After clicking 'New Zone File' or 'Zone File Editor,' you enter the zoning screen. Click 'Browse' and select the saved COA file to upload. This time, the COA will load as an image.
Step 7: Once it has loaded, if the COA information is not on page one, click 'Page' and select the correct page number to zone it.
Step 8: If creating a new template, it's time to start drawing boxes around data and pairing to the appropriate attribute.
Step 9: Click 'Key Phrases' and select 'Text'
Step 10: Copy and paste your key phrase into the 'Add Phrase' field. Grab the phrases from the page number you are zoning.
Step 11: Click 'Add.'
Step 12: Repeat steps 10 and 11 to add additional key phrases. Capture:
- 3-6 key phrases (multi-pages may have fewer)
- 1-2 phrases for Supplier/Brokers/Distributors.
- 1-2 phrases for an Item
- 1-2 phrases for document type
Start Zoning
Step 1: Click Zoned Attributes.
Step 2: Select Draw
Start with the Primary Keys. The default in every customer site to PO Number, Supplier Lot ID, and MFG Date. You must have at least 2 out of 3 of the primary keys. They must be the same two on each page you are zoning, do not mix and match.
Step 3: Once you have added all the zone boxes and attributes to map, click Save.
Step 4: Click Back to return to the Manage OCR Template page.
Step 5: Click Save.
Zone the next page
Step 1: Click 'Current Templates' and select the template that you just made, then click 'New.'
Step 2: After clicking New Zone File, you enter the zoning screen. Click on the white 'Browse' button and select the saved COA file from your computer.
Step 3: Once it has loaded, if the COA info is not on page one, then click 'Page' and select the correct page number to zone it.
You are creating a new template, so Zone file should read 'Create New'.
Step 4: Click 'Key Phrases'
Step 5: Select 'Text'
Step 6: Copy and paste your key phrase into the 'Add Phrase' field. Grab the phrases from the page number you are zoning as they may be different from the first page.
Step 7: Click 'Add'
Step 8: Repeat steps 6 and 7 to add additional key phrases.
Step 9: Now you're ready to start zoning! Click 'Zoned Attributes'.
Step 10: Select 'Draw'.
Make sure that you are looking for at least 2 out of the 3 available. They must be the same two on each page you are zoning, do not mix and match.
Step 11: Once you have added all the zone boxes and attributes to map, click 'Save'.
Step 12: Click 'Back' to return to the Manage OCR Template page.
Step 13: Click 'Save.'
Repeat for all pages of the Multi-Page COA. Test to make sure it works!
You will receive error messages for these types of templates in the COA mailbox if required attributes span across multiple pages. This is normal and expected. You may disregard these messages as long as the COA record on the COA tab reads 'Accepted.'
Normalization Scripts
Step 1: if you have micro results, you will need to add a normalization script. Click the edit gear to the right of the zoned attribute.
Step 2: Enter the value on the COA for the related field, and verify that the script will return your desired value by clicking the checkmark.
If you have required attributes that span across multiple pages, you will always receive error messages in the email logs. This is because TG will expect everything to be on one page. However, this is to be expected. You should receive a success message in the email logs after the following pages come through and are combined into one COA record on the COA grid. If you do not see the success message after the error message, you may need to troubleshoot further.
Step 3: Click save, then back, and then save again.
Step 4: Test in template tester. If successful, then send in as a final test that results come through as expected.
Adding More Pages to Existing COAs
Step 1: For this second example, let's say you have an existing OCR Template that you use for a certain Item's one-page COAs, but you know that your Supplier is going to go to two pages soon.
Step 2: When your Supplier has settled on their new multi-page COA format for the Item, obtain a digital sample from them.
Step 3: Go to Configuration > Import Templates, filter for the Supplier/Item combination involved, and click that row's arrow rectangle to open its "New OCR Template" page. Click the Current Templates drop-down and select the OCR Template you need to alter. The page-heading will change to "Manage OCR Template", and various fields will fill in. At the bottom of the page, you should be on the "Key Phrases" tab - MAKE NO CHANGES there!
Step 4: Go into the Zone File Editor and find and load the Supplier's new multi-page COA sample. You'll be on the COA's Page 1 at first. In the Zone File box select "1" to overlay the existing Zone file (designed for only one Page) onto Page 1.
Step 5: CHECK CAREFULLY that every Zone on Page 1 is still placed correctly over its data. Click and move any that are not, but DO NOT alter which box goes with which data. Delete any Zones whose data has been moved to Page 2. You'll re-Zone them there.
Step 6: Change the Zone File box entry to ** Create New **, since now you'll be adding a second Zone file to the Template. The Zone boxes for Page 1 will disappear and the checkmarks in the "Mapped Attributes" List will reset to arrow rectangles.
Step 7: From the Page drop-down, select Page 2. Now perform Steps 3 & 4 from the "Each Subsequent Page" section, above, on each Attribute you want to collect.