Make batch updates
ONIXEDIT provides a new way to make batch updates on existing titles using a combination of our Copy/Merge section tool and our Flat File Import tool.
By simply checking "Import and merge with opened file" and choosing a primary key for your titles, you can transform any Import script into a powerful batch updates tool:
The important thing to know is that ONIXEDIT need to identify each ONIX section to merge, using a unique key. For example, if you want to update prices of an ONIX file, you will need to define at least the following ONIX elements:
Title primary key + SupplierName + SupplierRole + PriceTypeCode + CurrencyCode
The first part (the primary key) is always needed no matter what the ONIX sections you need to update. It allows ONIXEDIT to uniquely identify a title. It could be the RecordReference, the ISBN-10, the ISBN-13 or the EAN:
The other ONIX elements are used by ONIXEDIT to uniquely identify the section to update. Each ONIX section has its own key fields. See Merging a section from a title for more details.
The following is an example of a complete Price key:
9780596004675/ONIXEDIT/01/01/USD
If ONIXEDIT finds an occurrence of that key in the file to update, the target values (in this case, the price) will be updated. Otherwise, a new price entry will be added.
Fortunately, if you add to your import script an ONIX element without providing the required Key Fields, you will be informed by the "Merge Errors" retractable panel. For example, if you want to update Contributor RegionCode, and you create an import script like this:
ONIXEDIT won't be able to target the right contributor to update. Based on the Key fields table for Contributor (See Merging a section from a title), there is a missing element among PersonNameInverted or PersonName or NamesBeforeKey and Keynames or CorporateName:
Consequently, when you try to apply this script to an ONIX file, ONIXEDIT will deploy the Merge Errors panel telling you that a Key field is missing and it will suggest one of the possible fields to add:
Just by double-clicking the suggestion in Merge Errors list, ONIXEDIT will select it automatically, making it ready to insert in your script with the Add button.
Here is a complete "step by step" example to update all the prices of an ONIX file by 10%:
1- Using ONIXEDIT, open the ONIX file you want to update.
2- Export your titles to an Excel file. You will need to export at least:
- A primary key field (RecordReference, ISBN-10, ISBN-13 or EAN)
- The Supplier Role
- The Supplier Name
- The Price Type
- The Currency Code
- The Price Amount
To create your Excel file with your titles prices, select all your titles from the Main List and use the menu File/Export (F5). Choose option "Export to Flat file or Excel":
Once in the Export tool, you can prepare the script by yourself or use the template "Merge script - Update Prices" that is delivered with ONIXEDIT (starting from version 3.0.5). You
will find it in the "File / Open templates / Merge script - Updating Prices of the current ONIX file / Open import-export script" menu:
This script is made to import/export every title with a maximum of 3 different prices. You can remove or add prices depending on your requirements.
Click on the button "Convert and export ONIX to Flat or Excel File" and give a name to your Excel file.
3- Open the resulting Excel file. If your ONIX file contains titles having at least 3 prices, it will look like this:
If your file contains titles having just one price, it will look like this:
4- Using Excel, increase the prices by 10%. You can also produce this kind of flat file (Excel, Tabulated, CSV or Fixed Length) from an external source or your legacy system.
5- Get back to ONIXEDIT with your file to update still opened. Select File/Import (F4) from the main list.
6- Load the same import/export script as the one you used to generate the Excel File at step #2. For our example, you will find it in the "File / Open templates / Merge script - Updating Prices of the current ONIX file / Open import-export script" menu. If you created the import script yourself, be sure to activate the check box "Import and merge with opened file".
7- Click on button "Choose a file to import" and select the Excel file you updated at step #3:
8- Click on button "Convert and Import Flat or Excel File to ONIX":
9- Choose the opened ONIX file to update and click OK:
You will see a progress bar and when completed, all your titles prices will be updated.