Sync Product Catalog

There are two scripts deployed to keep item data in sync between NetSuite and your Extend account. The first script is a User Event deployed to item records, Extend | UE | Item Sync. On creation of an Inventory Item, after the item record is submitted, the script gathers the required item attributes and sends the data to Extend using the products API.
The Map/Reduce script Extend | MR | Item Sync is used to keep item data in sync between NetSuite and your Extend backend. The saved search ***SCRIPT USE*** Extend | Item Sync Search is used to identify items to be updated. Similar to the user event, the Map/Reduce script iterates through the items, gathers the required item information from the item record, and calls the products API.
Depending on the frequency of which you update your item prices, this Map/Reduce script can be deployed on a daily, weekly, or monthly schedule.

Note: Due to the configurability of NetSuite accounts and different ways the item record is used, we give merchants the flexibility to map the correct item fields in the script “customscript_ext_util.js”. The function “getExtendItemData” allows merchants to change which item fields correspond to the Extend product object.

var objExtendItemData = {};
 
objExtendItemData.brand;// = objNewRecord.getValue({fieldId: ''});
objExtendItemData.category;// = objNewRecord.getValue({fieldId: 'category'});
objExtendItemData.description;// = objNewRecord.getValue({fieldId: 'description'});
objExtendItemData.imageUrl;// = objNewRecord.getValue({fieldId: 'storedisplayimage'}); 
objExtendItemData.mfrWarranty_parts;// = objNewRecord.getValue({fieldId: ''});
objExtendItemData.mfrWarranty_labor;// = objNewRecord.getValue({fieldId: ''});
objExtendItemData.mfrWarranty_url;// = objNewRecord.getValue({fieldId: ''});
objExtendItemData.price = exports.getPurchasePrice(objNewRecord.id); //dependent on pricing/currency config
objExtendItemData.name = objNewRecord.getValue({ fieldId: 'itemid' });//required
objExtendItemData.referenceId = objNewRecord.id;//required
objExtendItemData.currency = objNewRecord.getValue({ fieldId: 'USD' });//currently only USD supported
objExtendItemData.parent_sku;// = objNewRecord.getValue({fieldId: 'parent'});
objExtendItemData.sku;// = objNewRecord.getValue({fieldId: 'upccode'});
objExtendItemData.gtin;// = objNewRecord.getValue({fieldId: ''});
objExtendItemData.upc;// = objNewRecord.getValue({fieldId: 'upccode'}); 
objExtendItemData.asin;// = objNewRecord.getValue({fieldId: ''});
objExtendItemData.barcode;// = objNewRecord.getValue({fieldId: ''});

The list of required fields can be found in the Extend API documentation: https://docs.extend.com/reference/storesproductscreate