Projects/Upload Data/Functional Documentation
Contents |
Overview
Purpose
The purpose of this development is to allow importing products from a file into the discount definition.
Scope
- Backoffice:
- support importing products into the product subtab of discounts and promotions
- WebPOS
- the product by discount information is already loaded into webpos, so no changes are needed here.
References
Design Considerations
Assumptions
- Assumption: it is possible for an external system or user to provide the list of product with values in the list corresponding to values in the identifying columns (the search key for example) of the product table in Openbravo.
Dependencies
No specific functional dependencies.
Constraints
There can be constraints on how many products can be imported in one time (100000s of records per import is probably the limit).
The import file format is a text/csv file with one column.
Functional Requirements
User stories
Sales Admin: define products by discount
- The sales administrator logs into Openbravo and goes to the Discount and Promotions window.
- He/she exports a list of products from another system or creates one manually.
- The sales admin opens the Discount and Promotions window and selects the Product tab.
- The import products button gets enabled and the sales admin clicks the (new) import button.
- The import popup is shown with the following options:
- field to select a file
- an enumerate field with the following values: Import and Add to Set, Import and Replace current Set. The first option adds the imported business partners to the set, the second clears the set and imports the BP.
- Error handling, an enum field: stop on error, continue on error and report. Determines if the import stops if a business partner can't be found or should just continue and report the error records.
- Button to start the import, the logic validates if all the fields are filled in.
- After the import a popup is shown with the overall result: Total records:110, Imported 100 records, 10 error records. In addition a csv file is returned with the error records.
Import Logic
- The system will go through each line in the file and try to find a product using the searchKey column of the product table.
- If more than one or zero products are found an error is registered.
- If the product already exists for the discount then the line is ignored.
- If the product-discount does not yet exist a new record is created.
- At the end of the process the changes are committed or not (depends on the error-handling parameter and if there were errors).
- At the end of the process a file is returned with the error records and the related message.
Status & Functional requirements based on business processes
Requirement | Importance | Status | Comments |
---|---|---|---|
Show a new button and dialog in the product-discount window/tab. | Must have | Done (pending feedback) | The dialog shows the fields to select a file and the import parameters. After clicking OK the process starts and the errors are reported. |
The import logic on the server and report back to the client. | Must have | Done (without using connector framework, pending feedback) | The dialog shows the fields to select a file and the import parameters. After clicking OK the process starts and the errors are reported. |
User Interface Mockups
See here the Discount and Promotions window with the import button and the popup.
The import button is enabled when the child tab is activated and one parent record is selected.
Open Discussion Items
- How many products can be included in one import file?
- Can we expect custom fields in the product discount table which would also need to be 'importable'?