EAEcommerceAddItemToLinker
This document was generated using Claude.ai
Overview
Adds inventory items to Magento e-commerce integration linkers. Creates or updates MagentoItemLinker documents to establish connections between ERP inventory items and Magento site configurations, enabling product synchronization between systems.
When This Action Runs
Manual execution on inventory items that need to be linked to Magento e-commerce sites. Typically used during product setup or when adding existing items to e-commerce integration workflows.
How It Works
- Validates site code - Finds the Magento site using the provided site code
- Searches existing linkers - Looks for committed MagentoItemLinker documents for the site
- Checks for existing item - Searches for the current item in existing linker documents
- Creates or updates linker - Either creates new linker or uses the most recent one
- Adds item line - Creates new MagentoItemLinkerLine with item and SKU information
- Applies field mappings - Copies additional fields using the field mapping parameter
- Sets current line - Marks the new/existing line as the current line for processing
- Commits changes - Saves the linker document with the new item association
Parameters
Parameter 1: Site Code (Required) - Code of the MagentoSite to link the item to
Parameter 2: Linker Line Fields Map (Optional) - Field mappings for additional data copying
Parameter 3: Linker File Code Template (Required) - Template for generating linker document codes
Example Field Mapping
line.dimensions.box=name2
line.description=description
line.weight=weight
Database Tables Affected
- MagentoItemLinker - Creates new or updates existing linker documents
- MagentoItemLinkerLine - Creates new line entries for items
- MAGMagentoSite - References the target Magento site (read-only)
- InvItem - Source inventory item being linked (read-only)
Module: magento
Full Class Name: com.namasoft.modules.magento.utils.EAEcommerceAddItemToLinker