CMIS Export (Export Definition)

From Grooper Wiki

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025 20232021

CMIS Export is an Export Definition available when configuring an Export Behavior. It exports content over a cloud CMIS Connection, allowing users to export documents and their metadata to various on-premise and cloud-based storage platforms.

CMIS Connections allow Grooper to standardize most, if not all, export configuration for a variety of storage platforms. This object can connect Grooper to both cloud based storage platforms, such as true CMIS content management systems, a Microsoft OneDrive account, or an Online Exchange email server, as well as on-premise platforms, such as a Windows file system or an on-premise Exchange server. It standardizes access to these platforms by exposing connectivity as if they were CMIS endpoints using the CMIS standard.

The CMIS Connection connects to an individual platform using a CMIS Binding, which defines the logic required for document interchange between Grooper and the storage platform. For example, the NTFS binding is used to connect to a Windows file system for import and export operations.

CMIS Export allows for the most advanced types of document export. It allows you to utilize document metadata and data Grooper extracts for export in a variety of ways. Many content management systems allow for document storage as well as storing metadata in fields in the storage platform. For applicable CMIS Bindings, CMIS Export document metadata and extracted data can be mapped to corresponding locations within the content management system, mapping a connection between objects or properties in a Content Model within Grooper (such as Data Fields in a Data Model) and their corresponding locations in the content management system (such as a column in a SharePoint site). Even for simpler platforms (like an NTFS file system) metadata can be used for file name and folder indexing.

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2024). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.


About CMIS+

"CMIS" stands for "Content Management Interoperability Services". It is an open standard that allows different content management systems to inter-operate over the Internet. Grooper expanded on this idea in version 2.72 to create our "CMIS+" architecture. CMIS+ unifies all content platforms under a single framework as if they were traditional CMIS endpoints.


Now, Grooper connects to all available external storage platforms by creating and configuring a CMIS Connection.

  • Once a CMIS Connection is created, Grooper can "interoperate" with these platforms.
  • "Interoperability " means Grooper has the same access to control the system as a human being does.
  • Grooper has a "one-to-one" connection to the platform, allowing full and total control.
  • Because we standardize connection to non-CMIS systems, this includes platforms like NTFS file systems (Windows) that are not CMIS servers.


Using this architecture, Grooper is able to create a simpler and more efficient import and export workflow, using a variety of storage platforms.

  • You now use CMIS Import providers and CMIS Export for any storage platform you can connect to with a CMIS Connection.
  • This also speeds up development for adding new connection types for import/export operations.

Anatomy of a CMIS Connection

When connecting Grooper to external storage platforms, you'll start by creating a CMIS Connection. There are three important parts to understanding a CMIS Connection:

  1. The CMIS Connection itself
  2. The platform it's connecting to. This is defined by the "CMIS Binding" (aka "connection type") selected for the CMIS Connection's "Connection Settings".
  3. Its child CMIS Repositories
    • "Repository" is just a general term for a location where data lives. Different systems refer to "repositories" in different ways.
      • A folder in Windows could be a repository. An email inbox could be a repository. A document library in SharePoint could be a repository. An application in ApplicationEnhancer (formerly ApplicationXtender) could be a repository.
      • "Repository" is a normalized way of referring to various terms used by various storage platforms.


For newer users, the difference between a CMIS Connection and a CMIS Repository can be confusing. The key distinction is as follows:

  • CMIS Connections connect to storage platforms.
    • It's the phone number you dial.
    • The specific platform you're connecting to is defined in its "Connection Settings".
  • CMIS Repositories represent a location within the connected platform.
    • It's the person on the other end of that phone number you want to talk to.
    • CMIS Repositories represent storage locations (typically folders) in the storage platform. They are added as children to a parent CMIS Connection.
    • The CMIS Repository nodes are what Grooper actually uses when configuring import/export operations.
      • You don't talk to a phone number. You talk to a person.
      • You don't reference the parent CMIS Connection when configuring CMIS Import or CMIS Export. Instead you reference a CMIS Repository.

Basic creation steps

There are three basic steps involved to connect Grooper to external storage platforms:

  1. Create a CMIS Connection
  2. Configure the "Connection Settings".
    • Choose what platform you want to connect to (the CMIS Binding).
    • Enter the connection settings required to connect to the platform (This will differ from platform to platform)
  3. Add child CMIS Repositories by importing the storage locations.
    • Importing a CMIS Repository is not the same as importing documents to a new Batch.
      • "Importing" here is more like importing a reference (or bringing the repository into a framework Grooper can use).
      • Upon importing the CMIS Repository, Grooper has full file access to that location in the storage platform.

CMIS Bindings (aka "connection types")

How you configure a CMIS Connection only differs based on what platform you're connecting to. Connection settings include folder paths, URL addresses or usernames or passwords.

  • Example: Connecting to a Windows folder requires a networked folder's UNC path.
  • Example: Connecting to a SharePoint site requires a URL address.
  • Example: Connecting to a email inbox requires an server host name.
  • Example: Connecting to Application Extender, Box, SharePoint, OneDrive, Exchange (Outlook) and more requires a username and password.


Each platform has its own connection requirements. These connection settings and the logic required to interoperate between Grooper and a specific platform are defined by the different "CMIS Binding"

Each CMIS Binding provides the settings and logic to connect Grooper to CMS platforms and file systems for import and export operations.

  • Example: The "Exchange" binding contains all the information Grooper uses to connect to Microsoft Exchange email servers (i.e. Outlook inboxes).
  • Example: The "AppXtender" binding contains all the information Grooper uses to connect to the ApplicationEnhancer (formerly AppXtender) content management system.
  • Example: The "NTFS" binding contains all the information Grooper uses to connect to a Windows file system.
  • And so on.


The first step in configuring a CMIS Connection is choosing what platform you want to connect to. You do this by selecting a "CMIS Binding".

  • You will commonly hear "CMIS Binding" referred to as a "CMIS connection type" or "connection type".
  • Or just "connection", as in an "Exchange connection".

Current CMIS Bindings (aka "connection types")

Grooper can connect to the following storage platforms using below using CMIS Bindings:

Most Commonly Used

Somewhat Commonly Used

Less Commonly Used

  • FTP (File Transfer Protocol) and SFTP (SSH File Transfer Protocol) servers.
  • IMAP mail servers

Least Used

  • Content management systems using CMIS 1.0 or CMIS 1.1 servers.
  • The FileBound document management platform.
  • The IBM FileNet platform.


Basic CMIS Export

CMIS Exports can range from very simple exports of Batch Folder content, to more complex exports, utilizing Grooper extracted content in a variety of ways. We will start with the most basic configuration of a CMIS Export. These steps will be largely applicable to any CMIS Export. By the end of this tutorial, we will export PDF files generated from the image and OCR text content of the Batch Folders in our Batch, as well as an XML metadata file generated from the extracted Data Model Elements for each Batch Folder.

Establish the CMIS Connection and CMIS Repository

Before configuring a CMIS Export, you must have created a CMIS Connection and imported a CMIS Repository. For more information on how to create a CMIS Connection and import a CMIS Repository refer to the CMIS Connection article.

For this example, we will simply export to a Windows folder on a local drive.

Click here for an interactive walkthrough

  1. We have created a CMIS Connection using the NTFS Connection Type
  2. We have imported a CMIS Repository connecting Grooper to a folder named "Grooper Import Export".
  3. And we will be exporting to this subfolder named "Export".

Add an Export Behavior and CMIS Export to a Content Type

CMIS Export is one of the Export Definition types for Export Behaviors.

The first step to configuring CMIS Export is adding an Export Behavior. Export Behaviors control how a document "behaves" when the Export activity runs, what files and data go to which storage location. Export Behaviors are configured by adding one or more Export Definitions, such as CMIS Export.

  • Export Behaviors define the export settings for a document based on its Content Type.
  • Export Behaviors can be added to any Grooper Content Type (Content Model, Content Category or Document Type).
  • They are often added to Content Models.
    • When adding an Export Behavior to a Content Model, all child Content Types (its Content Categories and Document Types) will inherit these export settings.
    • This will apply the Export Behavior to any Document Type in the Content Model (as long as the Document Type doesn't have its own Export Behavior configured).

Whenever the Export activity runs, Grooper will export a Batch Folder's document and/or data content according to the Export Definitions added to the Export Behavior. CMIS Export is the Export Definition added to Export Behaviors to export files and data to "CMIS Repositories" (storage locations connected to Grooper via CMIS Connections).

Click here for an interactive walkthrough

To add an Export Behavior:

  1. Select a Content Type (Content Model, Content Category or Document Type) in the node tree.
    • Content Types inherit Export Behaviors if they have none configured.
      • Ex: If you configure an Export Behavior for a Content Model, all Document Types will use those export settings (as long as they don't have their own Export Behaviors configured).
      • Ex: If a Content Type has an Export Behavior configured and a Document Type has an Export Behavior configured, the Document Type's Export Behavior will be used (not its parent Content Model's).
    • The Content Type also determines what Data Fields are accessible. See the section on "export mappings" and choosing the right scope below for more.
  2. Open the "Behaviors" editor (Press the "..." button)..
  3. In the Behaviors editor, press the "Add" button.
  4. Select "Export Behavior" from the dropdown list.

An Export Behavior is now added to the Content Type. However, an Export Behavior alone does nothing. Without configuring an "Export Definition", the behavior will do nothing when the Export activity runs. Export Definitions, like CMIS Export, will tell Export what kind of file or data to send to what storage destination.

FYI

While it is possible to configure Export Behaviors local to an Export activity, we do not advise doing so. It is best practice to configure Export Behaviors on Content Types (Content Models, Content Categories, or Document Types).

Add an Export Definition

Click here for an interactive walkthrough

  1. Going forward in this tutorial, we will scope our Export Behavior to the parent Content Model "Export Example Model - POs and Invoices".
    • What Content Type scope in your Content Model you choose will be paramount if you want to use extracted Data Element values for data mapping purposes. However, we do not need to concern ourselves with that for this tutorial. This is the most basic (or "unmapped") version of a CMIS Export. For more information on data mapping, visit the Perform a Mapped CMIS Export tutorial later in this article.
  2. We will choose to configure the Export Behavior using "Option 1", adding it to the Content Model's set of Behaviors properties.


Regardless if you choose to configure the Export Behavior on a Content Type object, or if you configure it local to to Export activity's configuration, your next step is adding an Export Definition.

  1. Once you've added an Export Behavior, select the Export Definitions property.
  2. To add an Export Definition, press the ellipsis button at the end of the property.
  3. This will bring up an Export Definition list editor to add one or more Export Types.

Add a CMIS Export

Export Definitions functionally determine three things:

  1. Location - Where the document content ends up upon export. In other words, the storage platform you're exporting to.
  2. Content - What document content is exported: image content, full text content, and/or extracted data content.
  3. Format - What format the exported content takes, such as a PDF file or XML data file.

Export Definitions do this by adding one or more Export Type configurations to the definition list. The Export Type you choose determines how you want to export content to which platform. In our case, we want to use a CMIS Connection to export content to a connected CMIS Repository. We will add a CMIS Export to the definition list.


Click here for an interactive walkthrough

  1. To do this, press the "Add" button.
  2. Choose CMIS Export from the list.
  3. This will add an unconfigured CMIS Export to the Export Definitions list.
  4. For all CMIS Export configurations, you must choose what CMIS Repository using the CMIS Repository property.
  5. Location! Location! Location! This is how Grooper knows where you want to export your document content. In our case, we want to export documents to a folder in the "Grooper Import Export" folder on this machine's Windows hard drive.
    • Using the drop down menu, we will select the "NTFS - Grooper Import Export" CMIS Connection's CMIS Repository named "Grooper Import Export".


Selecting an Export Subfolder Location

With a CMIS Repository selected, a set of Filing Location properties will appear.

  1. The Target Folder property allows you to select a subfolder in the repository as the export path, rather than just putting documents at the root of the repository.
  2. Selecting this property, you can press the ellipsis button at the end to bring up a navigation window to select a subfolder.
  3. This will bring up the following window. The CMIS Repository you selected for the CMIS Repository property will be at the root of this node tree. Expand the root and subsequent nodes to explore the folder structure of the CMIS Repository.
  4. In our case, we selected a subfolder named "Export"


Now that we know what location we're exporting to, we need to define what content we want to export and what format that content should take.

  • In a very general way, that's what the Object Data set of properties are all about.
    • More specifically, we will use the Export Formats property to export a simple PDF for each Batch Folder in our sample test Batch.

Configure Export Formats

Next, we need to tell Grooper what content we want to export and how we want to export it. Keep in mind, we're exporting to a Windows file folder. Regardless of the storage system, we are always in some way limited by the constraints of the storage system. Some have greater capabilities to house customized metadata fields, for example. The NTFS file system, however, is pretty basic. It is a hierarchical file system to store and organize files.

So, what can we export? Files. The good news is there's all kinds of different file formats out there. Even just exporting simple files, we can get Grooper processed content (the document's image, the document's full text data, and the document's index data) out of Grooper. To do this, we will add Export Formats to dictate what content exports to what file type.

There are a variety of Export Formats available to generate and export content from Grooper.


Click here for an interactive walkthrough


  1. PDF Format - This will output a PDF file from the Batch Folder content. This includes capabilities to embed full text data obtained from the Recognize activity.
  2. XML Metadata - This will output extracted Data Model values to an XML file.
  3. JSON Metadata - This will output extracted Data Model values to a JSON file.
  4. Simple Metadata - This will output extracted Data Model values to a text file.
    • This file formats Data Fields and their values as simple "key-value pairs"
  5. Delimited Metadata - This will also output extracted Data Model values to a text file.
    • This formats Data Field values as a delimiter-separated value array.
  6. TIF Format - This will output image content only as a TIF file.
  7. Text Format - This will output full text content only, generated from OCR data, as a text file.
  8. Attachment - For document files that were imported from a digital source, this will output the Batch Folder's attachment file. This option can also output any file attached to a Batch Folder by referencing a filename. This is how Grooper exports custom generated files from activities such as XML Transform or custom scripted activities.
    • If the Batch Folder has no attachment, this option will generate an image version of the document from all child Batch Pages in the folder.



We will export PDF files generated from the image and OCR text content of the Batch Folders in our Batch, as well as an XML metadata file generated from the extracted Data Model Elements for each Batch Folder.

  1. To add an Export Format, first select the Export Formats property.
  2. Press the ellipsis button at the end of the property.
  3. This will bring up the Export Formats collection editor.
  4. By default, there will always be an Attachment Export Format present in the list.
  5. We're going to use a different format. We will get rid of it by selecting it in the list, and pressing the "Delete" button.
  6. To add a new Export Format, press the "Add" button.
  7. Select the format you wish to output from the list.
    • We will first choose the PDF Format.
  8. This will add a PDF Format to the list of Export Formats.
  9. With an Export Format selected, the right panel will allow you to further configure the exported file.
    • For example, in our case, we've enabled the Searchable property under Build Options. This will embed the full text data generated by the Recognize activity in our Batch Process into each page in the PDF.


You can add as many Export Formats as you want. This allows you to export multiple files generated from the Batch Folder content in your Batch. For example, we've extracted data from our documents, using the Extract activity of our Batch Process. We can create an XML metadata file with all that data using the XML Metadata Export Format.

  1. To add a new Export Format to the list, press the "Add" button again.
  2. Select the additional file format you wish to output from the list.
    • We will choose XML Format.



Upon executing the Export activity, now two files will be exported for each Batch Folder in the Batch, one for each Export Format in our list.

  1. A PDF file generated from the PDF Format.
  2. An XML file generated from the XML Metadata.
  3. Press "OK" on this and all subsequent windows to save your changes.


More on Export Formats

Export Formats are critical to exporting documents. It determines what kind of file Grooper creates (PDF, TIFF, CSV, XML etc.) and what Batch Folder content is used to create that file (child Batch Page images, a file attached to the Batch Folder, or data collected from its Data Model).

There are too many Export Formats to detail fully in this article (You can visit the Export article for more information about Export Formats). However, there is one critical thing you should understand about Export Formats and CMIS Export.

One Export Format is added by default: "Attached File". With no further configuration, this will attach the Batch Folder's "main attachment file". Be aware of two common scenarios.

Common scenario 1: In Batch Processes where a Merge step runs before Export, this will export the file generated by Merge.
  • This is typically ideal.
  • In typical configurations, the Merge activity replaces the Batch Folder's "main attachment file" (if present) with the PDF or TIFF it generates. So, no further Export Format configuration is required to export a Grooper generated PDF or TIFF document.
Common scenario 2: In Batch Processes where a Batch is created by an Import Job and a Merge step is not present, this will export whatever file was imported at the start of the Batch Process.
  • This is not always ideal.
  • When an Import Job imports a file into Grooper, a Batch Folder is created and the file is attached to it. This is the Batch Folder's "main attachment file".
    • If you simply want to export the same file you imported to export location, no further Export Format configuration is required.
    • However, if you want to export a new file generated by Grooper you will need to (1) delete the Attached File format and (2) add one of your choosing (most typically a PDF Format).

Export the Documents

With the Export Behavior configured, we can now test our export.


Click here for an interactive walkthrough

  1. The Export activity in our Batch Process will apply our Export Behavior to every Batch Folder in the Batch.
  2. FYI: Because we configured the Export Behavior on our Content Model (using its Behaviors property editor), we do not have to configure the Export activity's local properties.
    • We've given Grooper all the information it needs to export content. The Export activity will go through every Batch Folder, one by one, in the Batch. It will see the Batch Folders are classified with one of the Document Types in our Content Model. Since we configured the Export Behavior on the Content Model, all child Document Types will use its configuration settings to export document content.
  3. Expand the Batch Process to reveal its child Batch Step nodes.
  4. Select the Export activity step.
  5. Switch to the "Unattended Activity Tester" tab.
  6. Press the "Process All..." button.
    • On the subsequent screen press the "Start" button to start processing the Batch. This will apply the Export activity, as configured in the Batch Process to all items in the activity's scope (Folder Level 1 in our case)
  7. All files are exported to the connected CMIS Repository location using our NTFS CMIS Connection.
  8. For each, Batch Folder, two files were exported for each Export Format added and configured.
    • A PDF file from the PDF Format
    • An XML file from the XML Format
    • This truly is about the most basic export you could do using CMIS Export. There's a lot more functionality available to CMIS Export to get data out of Grooper and use that data to index your documents better.
  • If nothing else, the these exported document filenames could stand improvement. Because these files were originally brought into Grooper as imported PDF files, as we configured CMIS Export, the generated filenames are simply copied from whatever the original file's name was.
  • In the next tutorial, we will introduce the concept of "data mapping". We will use extracted data to form folder levels and filenames, mapping Grooper extracted metadata to folder and file metadata upon export.

Intermediate CMIS Export: Folder Pathing and File Naming

A basic CMIS Export will export a file to a folder in a connected CMIS Repository. There's a lot more CMIS Export can do. Most users don't want to dump poorly named documents into unorganized folders. CMIS Export allows users to better organize their exports with two main features:

  • The "Subfolder Path" property - Using code expressions, this property will dynamically calculate a folder for the file to go into. If the folder does not exist, Grooper creates it for you.
  • The "Name" property mapping - This is your introduction to "mapped exports". Mapped exports use data collected in Grooper to define a file's properties or metadata fields in a content management system. Most commonly, you will use Grooper to intelligently name your exported files by mapping a Data Field or code expression to the Name property in the CMIS Export's "Write Mappings".
    • Nearly all platforms have a mappable "Name" property (IMAP and Exchange are notable bindings that do not). When mapped, this will be the exported file's filename. Be aware "Name" is the property's display name in Grooper. Different systems may refer to this property differently. It's "proper name" is "cmis:name". If you can't find a property named "Name", inspect the properties in the CMIS Repository's "Types" tab for the cmis:document type. Look for one whose "Id" is "cmis:name".

We will edit the CMIS Export configuration in the previous tutorial to do this.

The Subfolder Path property

Use the "Subfolder Path" property to dynamically place files in subfolders of the "Target Folder" assignment. This can use any combination of a document's data content (Data Field values or other data accessible by expressions), system data, plain text, or anything else a code expression can come up with to traverse a platform's folder structure. If the folder path does not exist, Grooper will create it.

Click here for an interactive walkthrough

  1. In the Filing Location set of properties of a CMIS Export property panel, select Subfolder Path.
  2. Press the ellipsis button at the end of the property.
  3. This will bring up a "Path Expression" editor window.
    • Using .NET expressions, you can dynamically path exports using document metadata available to Grooper.
  4. The expression here CurrentDocument.ContentTypeName would update the export path to a subfolder whose name matches the exported Batch Folder's Document Type assigned during classification.
    • For example, our export path before was C:/Grooper Import Export/Export. Now, Grooper will export documents assigned the "Invoice" Document Type would export to C:/Grooper Import Export/Export/Invoice.
    • Furthermore, if the folder does not exist, Grooper will create a new folder for the exported files.
  5. Additional subfolder levels can be created with a simple addition to the expression.
    • To path the export to another subfolder (or create a new one) add the following to the end of the expression:
    • + "/" +
  6. As you type the expression, IntelliSense will help you along to complete the code. It will show you potential code snippets you could add to complete the expression.
    • For example, any Data Elements available for use. We could use the "Document Date" Data Field for our next folder level, creating a new subfolder for every document from the date Grooper extracts during the Extract activity.
  7. The complete expression here CurrentDocument.ContentTypeName + "/" + Document_Date.ToString("yyyy-MM-dd") would path the export to an additional subfolder level, based on whatever the Batch Folder's Document Type is and extracted "Document Date" Data Field's value is.
    • For example, if you have a purchase order (assigned the "Purchase Order" Document Type) and Grooper extracted the purchase order date as "01/31/2021" it would be exported to the following folder path:
    • C:/Grooper Import Export/Export/Purchase Order/2021-31-01
    • FYI: The .ToString("yyyy-MM-dd") portion of the expression converts the Document_Date value from a date value type a string value type and reformats the date to a "year-month-date" format.
  8. Once satisfied with your expression, click OK.
  9. Upon executing the Export activity documents will be dynamically placed in folders according to the Subfolder Path property's expression.
  10. In our case, first in a folder for the Batch Folder's Document Type.
  11. Then in a second folder level from the Batch Folder's' extracted "Document Date" value.

Write Mappings for file naming

Use the "Write Mappings" to dynamically name the exported files. This can use any combination of a document's data content (Data Field values or other data accessible by expressions), system data, plain text, or anything else a code expression can come up with to help name the files.

  • Different CMIS Repositories have access to different readable and writable properties and metadata.
    • This is determined by the CMIS Binding used (ex: Exchange), the CMIS Content Type (ex: "Message" for Exchange email messages), and its parent CMIS Content Type (ex: cmis:document aka "Item" for Exchange).
    • More advanced platforms allow you to create custom fields to hold document metadata (ex: fields in Box's "metadata templates). Grooper can also write to these fields using "Write Mappings".
    • Nearly all platforms have a mappable "Name" (cmis:name) property. When mapped, this will be the exported file's filename.

Click here for an interactive walkthrough

  1. Select the Write Mappings property.
  2. Press the ellipsis button at the end to configure your data mappings.
  3. This will bring up the CMIS Export Map window.
  4. Any property you see here is an editable file metadata property. Using these property definitions, we can dictate the exported file's metadata by mapping these properties to Grooper extracted values.
    • Depending on the CMIS Connection's type (or CMIS Binding), different metadata properties will be editable. These are the editable file metadata for the NTFS Connection Type. You may see more for some connection types. You may see less. You may see a widely different set of available properties. However, for nearly all CMIS Connection types, you will always see a Cmis Name property.
    • We say "nearly" because the AppXtender connection type is the odd exception. It actually does not have a Cmis Name property available for mapping. However, we discuss this further in the next tutorial.
  5. We can edit the exported files' names, using the Cmis Name property.
  6. Using the dropdown list, you can map a single Grooper extracted value to the file's name.
    • Here, you will see any Data Field available to the Export Behavior's Content Type scope. We configured this Export Behavior on our Content Model. There is only a single Data Field in its Data Model, the "Document Date" Data Field. That's why we see "Document_Date" as an option. If we chose Document_Date from this list, each file would be named as whatever date was extracted for that Data Field.
    • You may be thinking "But what about all those other Data Fields? Isn't there a Data Field for the invoice number or purchase order? Yes there is, but those are out of scope. This is why understanding your Data Model hierarchy is critical for CMIS Export. If you need to utilize those Data Elements from those child Data Models, you will need to configure Export Behaviors at the appropriate scope. For example, on the "Invoice" and "Purchase Order" Document Types instead of on their parent Content Model.
    • You will also see some mappable expression snippets, like "CurrentDocument.ContentTypeName". Choosing CurrentDocument.ContentTypeName will name the file after the Batch Folder's classified Document Type.



You can also map data by crafting an expression. This is the route we will take. What if we want to name our documents after two or more pieces of information Grooper collects? For example, if an invoice is dated 01/30/2021, we want to name the PDF file generated "Invoice - 2021-30-01.pdf", using both the Document Type and the collected "Document Date" value. We can't do that with a simple dropdown. But we can with an expression!

  1. Expand the Cmis Name property.
  2. Select the Expression property.
  3. Press the ellipsis button at the end.
  4. This will bring up an expression editor window.
    • Using this expression editor, you can stitch together a custom file name, using a .NET code snippet.
  5. We've entered the following expression:
    • CurrentDocument.ContentTypeName + " - " + Document_Date.ToString("yyyy-MM-dd")
    • This will create file names as described earlier, using the Batch Folder's classified Document Type and collected "Document Date" value, separated by a hyphen (FYI: That's why the " - " part of the expression is present. You're literally adding the characters in quotes to the file name.
    • In other words, an invoice dated 01/30/2021, if exported as a PDF will be named "Invoice - 2021-31-01.pdf"
  6. When finished editing the expression, press "OK" to save.
  7. Upon Export, our files are now named dynamically, according to the expression we configured for the Cmis Name mapping.
  8. Furthermore, note all files generated by each Export Format will be named the same.
    • We had two Export Formats configured: one PDF Format and one XML Metadata
    • Obviously, the extension will be different, because they are different file types. Just keep in mind, the mapping will apply to multiple files if multiple Export Formats are configured for the same CMIS Export.

Advanced CMIS Export: Exporting Field Data using a "mapped export"

If the connected platform has the capability, CMIS Export has the capability to export both files to folders in a storage platform and data to metadata fields associated with those files. We call this a "mapped export". CMIS Export's "Write Mappings" are configured to map Grooper Data Fields to corresponding metadata fields in the storage platform. When Export runs, both the file content is exported according to CMIS Export's File Format and the data content is exported according to CMIS Export's Write Mappings.

In this tutorial, we will review how to map Data Field values collected for Grooper documents to metadata fields in different storage platforms, including:

  • SharePoint
  • Box
  • AppEnhancer (formerly ApplicationXtender)


Understanding the destination platform

Grooper can leverage the capabilities of various storage platforms to store collected Data Field values, as long as that platform has corresponding metadata Grooper can map. Understanding the endpoint storage location and its capabilities is the first step to more advanced data mapping.

For example, the SharePoint, Box, and ApplicationXtender platforms all have capabilities to store field information, in one way or another. Each platform allows the user to create custom metadata properties, to which Grooper can map collected data.

Example 1: SharePoint and columns in a Document Library

For SharePoint, custom metadata fields are added as column values of a Document Library. On this SharePoint site, there are some custom columns added for storing data relating to purchase orders.

  1. PO Number
  2. PO Date
  3. Vendor
  4. PO Total


Example 2: Box and fields in a metadata template

For Box, custom metadata is added by creating an metadata template for documents and/or folders. This metadata template has fields that also relate to purchase orders.

  1. PO Number
  2. PO Date
  3. Vendor
  4. Total


Example 3: AppEnhancer (formerly ApplicationXtender) and fields in an application

For AppEnhancer, fields are added to house values when the application repository is created. This application is designed to store purchase orders, and as such has some editable purchase order related fields added.

  1. PO Date
  2. PO Number
  3. Vendor
  4. Order Total


Choosing the right Content Type for the Export Behavior

Arguably, the most important part of data mapping a CMIS Export is choosing the right scope for your Export Behavior. A Content Category or Document Type's place in the Content Model hierarchy determines what Data Elements its Data Model inherits. This will determine which Data Fields are available for mapping.

Click here for an interactive walkthrough

Example 1: Scoping Export Behavior on a Content Model

  • The only Data Fields belonging to its child Data Model will be mappable.
  • No fields from further descendant Data Models will be mappable.
  • Scoping the Export Behavior to the Content Model is appropriate for mapped export scenarios where all Data Elements are defined in a single Data Model that lives at the root of the Content Model.
  • Scoping the Export Behavior to the Content Model is often not sufficient for mapped export scenarios where each Document Type has its own Data Model.
  • (This is less common) Scoping the Export Behavior to the Content Model is often not sufficient for mapped export scenarios where Content Categories with their own Data Models are used to create a branched hierarchy of Data Elements.

Example 2: Scoping Export Behavior on a Content Category

  • Data Fields belonging to its child Data Model will be mappable.
  • Data Fields inherited from a parent Content Category's Data Model will be mappable (if such exist).
  • Data Fields inherited from the Content Model's Data Model will be mappable (if such exist).
  • No fields from further descendant Data Models will be mappable.
  • Scoping the Export Behavior to a Content Category is appropriate for scenarios where the Content Category was added to group Document Types together, and all those Document Types share the Content Category's Data Model.
    • Scoping the Export Behavior to a Content Category can also be used to divert different Document Types to different folder locations using the CMIS Export's "Subfolder Path" property.

Scoping the Export Behavior to the Content Category will also be necessary for scenarios where the Content Category's Data Model has unique Data Fields that need to be mapped.

  • Scoping the Export Behavior to the Content Category is often not sufficient for mapped export scenarios where each Document Type has its own Data Model.
  • (This is uncommon) Scoping the Export Behavior to the Content Category is often not sufficient for mapped export scenarios where child Content Categories with their own Data Models are used to create a further branched hierarchy of Data Elements.

Example 3: Scoping Export Behavior on a Document Type

  • The Document Type is the lowest level of a Content Model's hierarchy.
  • All Data Fields belonging to its child Data Model will be mappable.
  • All Data Fields inherited from a parent Content Category or the Content Model's Data Model will be mappable (if such exist).
  • Scoping the Export Behavior to the Document Type is appropriate for mapped export scenarios where each Document Type has its own unique Data Model.
  • Scoping the Export Behavior to the Document Type will also be necessary for scenarios where the Document Type's Data Model has unique Data Fields that need to be mapped.

FYI

While it is possible to configure Export Behaviors local to an Export activity, we do not advise doing so. It is best practice to configure Export Behaviors on Content Types (Content Models, Content Categories, or Document Types).

CMIS Connection considerations

Depending on the storage location you're connecting to, you may need to be aware of some additional property settings in order to properly map and export data. Below, you will see how we configured the CMIS Connection for the three CMIS Bindings: SharePoint, Box, and AppXtender

Example 1: SharePoint

Connecting Grooper to SharePoint sites is straightforward, but there are some key things to keep in mind when you want to map data to a SharePoint Document Library.

Click here for an interactive walkthrough

  1. Select a CMIS Connection with the "Connection Settings" set to use "SharePoint".
  2. Expand the "Connection Settings" property.
  3. Enter the "Base URL". This defines where your SharePoint site is located.
  4. Choose and configure your "Authentication Method".
  5. In many cases, you'll want to turn "Enable Subsites" to True.
    • This will expose any subsites below the Base URL to Grooper. If you do not enable this property, Grooper will only be able to access the Base URL and that's it.
    • In our case, the Document Library we are exporting to is a subsite of our parent site listed in the Base URL.
  6. Turn "Enable Library Types" to "True".
    • Enabling library types is critical for mapping data from Grooper to columns in SharePoint Document Libraries.
    • This property will expose the Document Libraries in SharePoint sites to Grooper as file subtypes. These subtypes have properties defined for each column in the Document Library, allowing us to map data.
  7. Import the SharePoint CMIS Repository. The root of the SharePoint site is imported when creating the CMIS Repository.

Example 2: Box

Configuring a Box CMIS Connection is less involved, but there is one key property you need to be aware of.

Click here for an interactive walkthrough

  1. Select a CMIS Connection with the "Connection Settings" set to use "Box".
  2. Expand the "Connection Settings" property.
  3. Enter connection credentials in one of two ways:
      • Enter your Box account ID into "Box User ID".
      • Enter a custom platform app'"App Settings" JSON from Box into "Custom App Settings".
  4. Choose what "Metadata Mode" you wish to use.
    • Enabling metadata is critical to for mapping data from Grooper to fields in Box metadata templates.
    • Enabling metadata will expose Box's metadata templates to Grooper as "Secondary Types". This allows Grooper to access fields as mappable properties.
    • If you are unsure which mode to use, choose "Normal". This will ensure you have access to the most options for your mappings.
  5. Import the Box CMIS Repository. The root of the Box account is imported when the CMIS Repository is created.

Example 3: AppXtender (AppEnhancer)

When mapping data over an AppXtender connection, the only thing you really need to worry about is which repository you're connecting to.

  1. Select a CMIS Connection with the "Connection Settings" set to use "AppXtender".
  2. Expand the "Connection Settings" property.
  3. Enter the following required connection settings:
    • AX Web Services URL
    • Data Source Name
    • User Name
    • Password
  4. Press the "Import Repositories" button". Select the AppEnhancer application you wish to export to and import it as an AppXtender CMIS Repository in Grooper.
    • The key point to mapping data from Grooper to AppEnhancer application is simply importing the right CMIS Repository.
    • Fields are defined when the applications are created in AppEnhancer. If you want to map to the right fields, you need to pick the right application when creating the CMIS Repository. Otherwise Grooper won't be able to find the fields you're looking for.

Add a CMIS Export

Mapping data to export to our field storage location endpoints, is part of the CMIS Export configuration. So, we need to add a CMIS Export definition!

  1. As discussed previously, we're scoping this export to the "Purchase Order" Document Type so we can access its Data Model's Data Fields for mapping.
  2. Using the Behaviors property, we will first add an Export Behavior.
  3. Here, we've added the Export Behavior to the Behaviors list.
  4. CMIS Exports are then added as an Export Definition.
  5. Here, we've added a CMIS Export to the Export Definitions list.
  6. Next, we will need to configure the export, first selecting the CMIS Repository we want to export to.

Mapping Configuration Examples

SharePoint

Click here for an interactive walkthrough

  1. For the CMIS Repository, we've selected our SharePoint CMIS Repository.
  2. Using the Target Folder property, we've selected the subsite we're exporting documents and data to.
    • The target folder must be a Document Library subsite in SharePoint. In our case, it is that Document Library seen earlier with custom metadata columns relating to purchase order data.
  3. This auto-populates the Object Type property.
    • This gives Grooper an object we can map metadata properties to, ultimately exporting data to the custom metadata columns in the SharePoint Document Library.
  4. We've also added a PDF Format to export a PDF file for our Export Format.
  5. Next, we will configure our data mappings using the Write Mappings property.
  6. These mappable properties, "PO Number", "PO Date", "PO Total" and "Vendor", are all those editable column properties in the SharePoint site.
  7. Since we've scoped this export to the "Purchase Order" Document Type, we now have access to map Data Fields from its Data Model.
    • Furthermore, we also have access to the "Document Date" Data Field inherited from the parent Content Model's Data Model.
  8. As far as our mappings go, all we have to do is select the Grooper Data Field that corresponds to the SharePoint metadata property. using the drop menu.
    • For example, the PO Total mapping, here, would populate the "PO Total" column value in SharePoint with the Grooper extracted value for the "Total" Data Field, for each exported document.
  9. Furthermore, since we're at a lower level in our Content Model's hierarchy, we have more access to more Data Elements when writing expression based mappings as well. For the Cmis Name mapping, we used the following expression:
    • CurrentDocument.ContentTypeName + " - " + Document_Date.ToString("yyyy-MM-dd") + " - " + PO_Number
    • Now we have access to the "PO Number" Data Field, whereas we did not in our earlier examples.
  10. When the Export activity processes the "Purchase Order" Batch Folders, the PDF files are exported to the SharePoint site. As seen highlighted in yellow, the extracted values for the mapped Data Fields populate the corresponding column values in SharePoint.



Box


Click here for an interactive walkthrough

  1. For the CMIS Repository, we've selected our Box CMIS Repository.
  2. Using the Target Folder property, we've selected a subfolder location.
  3. For Box connections, metadata templates must be manually selected using the Secondary Types property.
    • You can select any metadata template created in your Box account. It's up to you to choose the right one that corresponds to the fields extracted by your Data Model.
    • In our case, we've selected the "Purchase Order" metadata template, seen earlier in this tutorial.
  4. We've also added a PDF Format to export a PDF file for our Export Format.
  5. Next, we will configure our data mappings using the Write Mappings property.
  6. These mappable properties, "PO Number", "PO Date", "Vendor" and "Total", are the editable metadata fields in the metadata template we selected using the Secondary Types property.

Now the process is essentially the same as it was for our SharePoint example. Map the Grooper Data Fields to the corresponding storage location property.

There's also a shortcut we can use through Grooper's "Auto Map" feature. Auto-mapping will look for Grooper Data Fields and storage location property names that match. If they match, Grooper will automatically assign the mapping, without you having to select it from a dropdown.

  1. Right click any property and select "Auto Map...".
  2. Three out of five of the Box metadata field names match our Grooper Data Field names.
    • All three are automatically populated by the Auto Map feature.
  3. That just leaves the remaining two properties (Cmis Name and PO Date) to be mapped manually.
  4. When the Export activity processes the "Purchase Order" Batch Folders, the PDF files are exported to the selected Box folder.
    • Viewing a document in Box, you can view the exported metadata by pressing the "Metadata" icon.
    • The extracted values for the mapped Data Fields populate the corresponding metadata fields, using the "Purchas Order" metadata template.



ApplicationXtender

  1. For the CMIS Repository, we've selected our AppXtender CMIS Repository.
  2. Using the Target Folder property, ensure a folder location is selected.
    • You may need to manually select the root of the connected repository, if this property value is blank.
  3. This auto-populates the Object Type property.
    • This gives Grooper an object we can map metadata properties to, ultimately exporting data to the custom metadata fields in the AX application cabinet.
  4. We've also added a PDF Format to export a PDF file for our Export Format.
  5. Next, we will configure our data mappings using the Write Mappings property.


  1. Here, we map the AX data fields to the Grooper Data Fields just as described for the previous two examples, which will export the Grooper extracted Data Field values to their corresponding field in the AX cabinet.

FYI

As mentioned in the Folder Pathing and File Naming tutorial, the AppXtender binding does not have a mappable Cmis Name property. However, users who set up AX application cabinets will often add a "TITLE" field (or "DOCUMENT TITLE" or "DOC NAME" or some other variation).

You can use expression based mappings for any metadata property. So, if there is a "TITLE" field (as is the case here) you can use an expression to generate a custom title. We used the exact same expression here we used for the SharePoint and Box examples' Cmis Name mapping.


When the Export activity processes the "Purchase Order" Batch Folders, the PDF files are exported to the AX cabinet. As seen highlighted in yellow, the extracted values for the mapped Data Fields populate the corresponding ApplicationXtender fields.