Hi Everyone,
I am working on an ABBYY Vantage Advanced Designer implementation and wanted to check if anyone has implemented a reusable/common scripting approach across multiple document skills.
Currently, we have repetitive Advanced Script logic being used in several document skills, especially around table/repeating group processing and field normalization. We are exploring whether we can create reusable/common JavaScript functions and call them from different document skills instead of duplicating the same code everywhere.
Example scenario:
- Read values from extracted fields
- Pass those values into a common function
- Perform shared logic/validation/transformation
- Return processed result back to the document skill
Something like:
function normalizeCarrier(value1, value2) {
// common reusable logic
return result;
}
Then from each document skill:
var result = normalizeCarrier(field1, field2);
A few questions:
- Has anyone implemented reusable/common Advanced Script logic successfully in Vantage?
- Is there any recommended way to maintain centralized/common scripts instead of copying functions into every document skill?
- How are people handling situations where field names differ slightly between document skills?
- Has anyone tried a utility/helper-function approach for repetitive table extraction logic?
- Are there any limitations or best practices around modular scripting in Advanced Designer?
We are currently considering:
- Generic reusable helper functions
- Wrapper logic per document skill
- Conditional handling based on document/vendor type
Would appreciate any guidance, architecture suggestions, or examples from others who have implemented something similar.
Thanks!
Comments
2 comments
A common helper-function approach should work well, with each document skill using a small wrapper to map its specific field names.
I’d keep the shared validation/normalization logic centralized and avoid duplicating complex table-processing code across skills.
Hi Aparna,
I'd look at placing the script/helper function in a custom activity script in a process skill. This gives you access to all document skills, fields, and documents being processed. The approach I would take:
Define a configuration section where fields per document type are defined, then have a number of helper functions to perform the changes needed on the fields.
However, I note from your comment that you are looking at extraction, transformation and validation options of the helper function. These do need to sit in separate places:
Extraction - I would place this directly in a document skill.
Transformation - Can be done within the custom activity as stated above.
Validation - Business rule level on a document skill.
If you can share more context on this that could be great, also please don't forget to look at our documentation site docs.abbyy.com where you can connect to our MCP server to query the documentation:
https://docs.abbyy.com/vantage/getting-started/docs-mcp-server
Nick
Please sign in to leave a comment.