Automatic Asset-Product Link
The Asset Product Link automation automatically links digital assets uploaded in THRON folders to product media galleries, extracting a code from the file name via regex to compare it with catalog attributes. It allows updating product sheets without manual intervention and improving searchability. The configuration involves selecting attributes, source folders, regex patterns and tests to ensure correct association. There are indications for troubleshooting and technical support.
Automation configuration
In this section you define where the automation should look for assets and where it should link them.
- Name: Enter an identifying name (max 50 characters) that allows you to recognize the purpose of the automation in the execution list.
- Which attribute should match?: It is the search key of the product. You can only select attributes of type identifier, short text, number, boolean, single or multiple selection.
Note: If the attribute is localized, select the Locale on which to apply the matching to unlock saving.
-
Link assets from the source folder: Select the THRON folder containing the files to process. If you don't have viewing permissions, the system will show the warning "You can't view this folder".
- Including all child folders: Activate this toggle if you want the automation to scan the entire hierarchical structure under the root folder as well.
- To the destination media attribute: Select the product gallery that should receive the assets. If localized, specify the destination Locale (independent of the matcher locale).
- When: Standard execution is set to Every day.
Definition of the naming convention pattern
The Pattern defines the rule for identifying the product code (e.g., SKU) within the asset file name.
Regular Expression and its validation
- Regular expression: Enter the regex. The system will highlight in blue the first captured group, which represents the value to compare with the catalog.
- Load preset: Click here to select pre-optimized configurations.
- Filename test string: Enter up to 5 real filenames (one per line) to test the rule in real time.
To the right of the test string, the system shows a summary table:
- sku (or name of the chosen matcher): Shows the value extracted by the regex.
- Does the product exist?: Indicates if there is a product with that code in the PIM catalog.
If you mostly see "Does not exist" in red, the regex is not configured correctly or the selected matcher does not coincide with the data in the catalog.
Recommended Configuration
For a quick and error-free setup, follow these steps in the order indicated:
- Which attribute should match?: Select an attribute of type identifier (e.g. SKU) for unique matching.
- Link assets from the source folder: Choose the dedicated folder and activate Including all child folders if your structure is hierarchical.
- Pattern: Use Load preset and verify correct extraction in the Filename test string.
Practical Example: Naming Convention and Regex
1. Definition of the Naming Convention
Structure: [SKU]_[ViewType]_[Variant].[Extension]
Example of real file names:
TSHIRT-RED-001_front_v1.jpgTSHIRT-RED-001_back_v1.jpgJEANS-BLUE-999_detail_v2.png
In this case, the value that the automation needs to extract for matching is only the first part: TSHIRT-RED-001 or JEANS-BLUE-999.
2. Configuration of the Regex
To correctly extract the SKU before the first underscore, configure the Pattern section as follows:
Regular Expression: ^([A-Z0-9-]+)_
Technical explanation:
^ : Start scanning from the beginning of the line.
-
([A-Z0-9-]+): Capture group (highlighted in blue in the interface) that identifies any combination of uppercase letters, numbers, and hyphens. -
_: Stops as soon as it encounters the first underscore, excluding all the rest of the file name from the match.
3. Extraction test (Test string)
By entering the file names in the THRON test textarea, the system will behave like this:
| Filename | Extracted value | SKU Attribute | Outcome |
TSHIRT-RED-001_front_v1.jpg |
TSHIRT-RED-001 |
TSHIRT-RED-001 |
Product exists |
JEANS-BLUE-999_detail_v2.png |
JEANS-BLUE-999 |
JEANS-BLUE-999 |
Product exists |
Troubleshooting
Configuration Errors
These problems prevent saving or correctly setting up the automation. They are solved by acting directly on the configuration interface.
| Problem | Probable Cause | Operational Solution |
| Saving disabled | Mandatory fields are missing or the Locale has not been selected for a localized attribute. | Fill in all the fields marked with a red asterisk (Name, Matcher, Folder, Media Attribute). |
| "You can't view this folder" | The user does not have visibility permissions on the selected THRON folder. | Select a folder on which you have visibility via the dedicated select. |
| "Does not exist" values in Match Table | The regex extracts a code (e.g. SKU) that does not match in the product catalog. | Verify that the Matcher Attribute contains the extracted values and that the regex is not catching extra characters. |
| No values highlighted in blue | The inserted regex does not contain capture groups (). |
Define at least one capture group (e.g. ([A-Z0-9]+)) to indicate to the system which part of the file name to compare. |
Anomalies in the Execution Phase
These problems are found by analyzing the logs in the Executions section after the automation has been processed by the system. Refer to the Automation Studio documentation for further details.
| Problem | Probable Cause | Operational Solution |
| Rejected assets (High counter) | The newly uploaded files do not comply with the naming convention defined in the regex. | Open the log, click on View assets to check the filenames and update the regex or rename the files. |
| No new associations | The assets are already associated (Existing associations column) or there are no new files in the folder. | Check if new files have been uploaded to the source folder since the last execution. |
| Missing associations in subfolders | The Including all child folders toggle is disabled. | Go back to the Automation Flow and activate the toggle to extend the scan to the whole tree. |
| Failed match on specific products | Locale mismatch between the Matcher Attribute and the value in the product. | Check that the product code is entered in the same language (Locale) configured in the automation. |
Need help?
For problems or technical difficulties, write to support@thron.com.