acumaticaacumatica-kb

Can I make it so an Import Scenario for Alternate IDs errors instead of creating a new Stock Item if Stock Item is not found?


I have an import scenario whose function is to delete all existing Customer Part Number Alternate IDs for a given stock item and customer combination, then upload the new customer part number. There are three issues with it: The big one is that it will create a stock item if one does not exist, rather than erroring. Is this baseline import scenario functionality, or can I alter it to error instead? The second issue is that it DOES error if I attempt to upload a customer part number that is unchanged from the one I’ve just deleted, the import will error for that line. This is not a functional issue, since nothing would change if it succeeded, but not friendly for end users. Is this something I can make nicer either with a better error message or by having the import succeed? The third issue is another minor user friendliness issue - if the item field is not populated on my import spreadsheet, that row will not be imported but the row does not get an error message. Is it possible to make this friendlier for end users by identifying the lines with an error?

Import Scenario


Solution

    1. Yes this is baseline behaviour, import scenarios simulate a user keying into a form for each field mapped. When you key an existing Inventory ID into that field on the Stock Items screen, the existing record loads on screen, but if the Inventory ID does not exist, it will create it as a new item. You could add a step in your process to export your Stock Items list and compare against your import spreadsheet, eliminating any rows where the Inventory ID doesn't already exist.

    2. Again, you could create a generic inquiry with the relevant stock/alternate id data, and export all the current values, to compare and exclude existing rows from your import spreadsheet so they aren't "imported" and don't cause errors. You can also untick the Break on Error checkbox on your Import Scenario to allow it to keep processing all other lines and "succeed" for all non-errored lines.

    3. Once again, data cleansing for your import spreadsheet would fix this, but to achieve the error you are after, add an IsNull function around the InventoryID field and have it replace nulls/blanks with a value that will be invalid and cause an error. Example: =IsNull([SpreadsheetColumnName],'!@#$%')