Version: 1.0.0
Audience: Administrator

Use-Case:

You have constituted items outside of bundle's item search feature or you had legacy items before you installed bundled and you want the ability to place integrated Purchase Order for such items. eXtendItem enables you to link your legacy items with eXtendItem .

This article will walk you through the configuration and process involved in item linking.

Linking Legacy Items: 

This requires SuiteScript knowledge. The linking exercise can be done in three simple steps as mentioned below:

  1. Adding Function in Transformers File: All items which you want to link must have externalid and SKU on their respective item record for creating a mapping between your legacy items and their corresponding items in eXtendItem. Once the fields which contains the extenalid & SKU of the item is confirmed, you will need to add below mentioned function in suite_itemdb_transformers.js file and update the externalid & SKU fields in it. Below, is a sample snippet for linking S&S Activewear items. 

    /**
     * 
     * @param {Object} args 
     * @property {Object[]} args.items - item search results as JSON
     * @property {Object} args.SEARCH_FILTER_FIELDS - fields available for searching/filtering in Db
     */
    function getItemDataForDbSearch(args) {
        log.debug({ title: 'args for getItemDataForDbSearch', details: args });

        let toReturn = {
            vendorCode: 'S&SA', // for getting vendor code please see custom record vallues "eXtendItemDB Source Vendors"
            fieldsRequired: [args.SEARCH_FILTER_FIELDS.externalId, args.SEARCH_FILTER_FIELDS.sku]
        };

        toReturn[args.SEARCH_FILTER_FIELDS.externalId] = [];

        //Example item object for non-select fields in configured search
        // {
        //   "recordType": "noninventoryitem",
        //   "id": "110843",
        //   "values": {
        //     "itemid": "004 : 004 : B04038501-White/ Black-OS PK 50",
        //     "custitem_extend_itemdb_external_id": "00052987109108",
        //     "custitem_extend_itemdb_parent_sku": "004",
        //     "custitem_extend_itemdb_part_sku": "B04038501",
        //     "custitem_extend_itemdb_size_text": "OS PK 50"
        //   }
        // }
        args.items.forEach(item => {
            toReturn[args.SEARCH_FILTER_FIELDS.externalId].push(item.values.custitem_extend_itemdb_external_id);
        });

        return toReturn;
    }
  2. Creating Saved Search: Once the above function is configured and added in the transformers file you will need to create a saved search for filtering all the items which you want to link.
  3. Creating Map/Reduce Deployment: Once the function and the saved search is configured you will need to create a deployment of eXtendItemDb Link Items {customscript_extend_itemdb_link_items}. You must specify the saved search created in #2 under script level parameter Item Saved Search ID as shown in below screenshot:

    Image Placeholder
  4. Now you can either schedule this M/R or you choose to save and execute it for initiating item linking process.