EAEcommerceGuessItemBySKU
This document was generated using Claude.ai
Overview
Automatically resolves inventory items in sales documents using SKU lookups from Magento integration. Matches SKU codes from sales document lines to items configured in Magento item linkers, filling in missing item references and copying related properties.
When This Action Runs
Manual execution on sales documents with incomplete item information. Typically used when processing e-commerce orders where only SKU codes are available and need to be resolved to actual inventory items.
How It Works
- Validates site code - Finds the Magento site using the provided site code
- Checks document type - Ensures the document is a sales document
- Processes each line - Iterates through all document lines
- Skips resolved items - Ignores lines that already have valid item references
- Extracts SKU - Gets the SKU from the line's item code field
- Searches item dimensions - Uses Magento linker utility to find matching items
- Updates item reference - Sets the resolved item on the document line
- Copies properties - Transfers additional item properties from dimensions to line
Parameters
Parameter 1: Site Code (Required) - Code of the MagentoSite to search for SKU mappings
Database Tables Affected
- SalesDocument - Reads and updates sales document lines (specific type varies)
- BasicSCDocumentLine - Updates item references and properties
- MAGMagentoSite - References the Magento site configuration (read-only)
- MagentoItemLinker - Searches for SKU to item mappings (read-only)
Module: magento
Full Class Name: com.namasoft.modules.magento.utils.EAEcommerceGuessItemBySKU