Now Loading

Smart Apply

Smart Apply is a combination of two tools.

It’s an NAPC Suite Plugin and a WebNative Action, that allows you to add metadata to Xinet assets through a spreadsheet. Within E6 or ezX sites with Smart Apply enabled, the web user gets an option when navigating folder structures to download a CSV mapping file, under the Plugins tab. The downloaded CSV file will contain a listing of all the assets in that folder and all of the data fields from the users Metadata Template. Users can apply the data values for each asset named and simply upload the edited CSV file to the folder. Each data field listed can have unique values for each asset.

CVS Download

The Trigger Action will run against the folder the .csv file is input to. Assets in the folder with a match in the .csv file will have the CSV data applied. If the CSV lists an asset not present in the folder, it will list an error in the log and continue. If there is an asset in the folder not listed in the .csv file, it will be ignored.

There is initially a three step process to set this up globally and then simply activate the plugin on a per site basis.

Step 1, Configure the Action

Within WebNative in DATABASE -> Actions -> smart-apply,  there are two selection options within the Settings. Excel or LibreOffice. The only difference being the value for the “Quote Character” within those applications.

Within the Arguments is Destination, which is where the Action will move the processed CSV file used for data input.

Overwrite/Append: Overwrite, if a data value is blank in the CSV input file, that field will be nulled.

Smart-Overwrite, will skip CSV blank data values.

Separator: comma is the default. colon or semicolon are not implemented at this time.

Quote Character: use “Double-Quote” for Excel, and ‘Single-Quote’ for LibreOffice

Time Delay (secs) simple delay to run the Action

If you have a mixed environment with both Excel and LibreOffice input CSV files, create separate Actions.

Action Excel

Step 2, Create a Working Folder Path

Depending how you want to run this workflow, you’ll need to create a Folder to use SmartApply in. This is where you’ll put all of the files for applying CSV metadata to. It will be the active path for the Trigger. This is if you want to isolate this workflow because the addition of a file with the .csv extension activates the Trigger calling the Action. Skip this step if you intend to point the Trigger to multiple Client-Art folders.

Step 3, Create Trigger

The Trigger ‘SOURCE’ will be a File Event of either ‘New File’ or an ‘Upload’ but could also be both.

The caveat of using both is you’ll have a lot of recorded errors in the trigger.log due to the CSV file having been moved to the Distribution Folder at the completion of the first activating Source. When the second activating Source is called within the trigger, the .csv file is them missing.

Thus the concept of an isolated working folder path where you could have sub folders for Web and Finder

/raid/Studio/SmartApply/Web (Uploads)

/raid/Studio/SmartApply/Finder (New File)

Smart Apply Trigger

In my example Trigger the Source is File Event of Upload calling the smart apply Action with my Excel settings. The active path of the Trigger is both my isolated Web Folder and a Client Art folder.



Caveats:

1. Strange characters in filenames are discouraged and the action’s behavior may be unpredictable.

2. All of the non-CSV files must get uploaded to the folder BEFORE you upload the CSV. In short, the CSV file is uploaded last, after you’ve added your files to the folder and they’ve been ingested by Xinet.

3. Do not use double-quotes in metadata values when you have selected the “Excel” action setting and do not use single-quotes in metadata values when you have selected the “LibraOffice” action setting. Although they may work, their behavior may be unpredictable depending on the Application Version used.

4. All date fields year values must be YYYY to be XML compliant. You can often use the “Format” menu to ensure that years will be saved as 4 digits.

5. Multi-line values (embedded returns/newlines) in data fields will be respected in metadata fields that respect them (such as “Keywords”).

6. Due to the likely variations between how different applications export/save CSV files, only Excel and LibraOffice have been tested. Other applications may work.

7. The CSV download will contain ‘ALL’ of the data fields in the users Metadata Template regardless of the permission set. Meaning permissions for the web user set to read only are not enforced within the local CSV editing program.

8. The CSV exported file does not respect special formatted fields and all will be of Text format. Data fields with formats other than Text should be tested independently.