Skip to content

Load Images With Zip Extractor App

Introduction

The VibeIQ Image Loader App provides an automated way to load images into the platform by processing zip files of images. When installed, the platform will listen for any zip file uploaded to the system and attempt to extract images out of it. Then, it will attempt to map the extracted images to items in the system based on their filenames. The success and failure of these will be available in the workflow's logs.

How It Works

Upload Trigger:

Any zip file uploaded to your VibeIQ instance will automatically trigger the image loader (when installed). Internally, the platform will emit an event with trigger key file-extractor-task|update. Once this occurs, the App's "Load images from zip extraction" workflow will execute and fan-out the image-to-item assignment into multiple additional "Load images from Box by file ids" workflow processes. Each fanned-out process will contain a batch of images from the original zip file to load.

Mapping Items to Images

By default, the "Load images from Box by file ids" workflow will match images to items based on the federatedId of the item.

  • Images are matched to Items based on the Item's federatedId that matches the filename (before the extension).
  • Example: my-shoes.jpg will be loaded onto an Item with federatedId of my-shoes

You can also specify an "Item Property Key" in the workflow's Action configuration to key off of a different property instead of federatedId. It is recommended to use this config option if federatedId is not available on the Item because the Item was originated in VibeIQ, and not an external system like a PLM.

  • Example: "Item Property Key" is set to "itemNumber" and 500.jpg will be loaded onto an Item with itemNumber of 500.

You can also specify a "Federation Function", which allows you to parse the federatedId or the "Item Property Key" (if specified) with a small snippet of JavaScript. This is useful when it's not ideal to rename all file names you have on hand to specifically match the formatting requirements previously specified.

  • Example: If my file name is my-shoes.jpg and my Federation Function is return fileName.toUpperCase(), the loader will attempt to load my-shoes.jpg onto an Item with federatedId of MY-SHOES.

Finally, you can combine this with a "Primary Image Function" to further fine-tune how images are specified as "primary". By default, the first image added to an item becomes primary. Or, image is automatically set as primary if the filename ends with _primary (without the extension). If you have a different naming convention than _primary, you can specify a custom primary image function to match on something else.

  • Example: I load multiple files with different views of a product: my-shoes-front.jpg, my-shoes-top.jpg, my-shoes-profile.jpg. I want my-shoes-profile.jpg to be the primary image. I can specify a custom primary image function that looks for top in the filename and sets that as the primary image. My function would look like return fileName.includes('profile').

Important Notes

Configuration is global, meaning that once specified, these configurations apply to all image loads via zip extraction. You cannot dynamically specify different configurations for individual zip files, like you could with the data loader.

Installation

  1. Navigate to the App Marketplace in the Admin Console.
  2. Search for "Image Loader" and install the App.
  3. Ensure the required workflows are installed:
  4. "Load images from zip extraction"
  5. "Load images from Box by file ids"
  6. Specify any configuration as explained in "Mapping Items to Images". This can be done within the workflow editor tab for the "Load images from Box by file ids" workflow.