Blog

Why import data?

Importing is a very efficient method of adding and updating your information.

Here are some examples:

  • When setting up a new PHPReaction system
  • Mass registration or correction of data
  • Sequencing / Interrelation / Linkage with external systems
    • “Stocktaking” data grid
    • Exporting prices from another computer system
    • Update your product prices
  • Sequencing / Interrelation / Linkage with out-of-control systems
    • Receive a new pricing schedule for your products

It is possible to confirm or compare imported information with the API export and interaction system.

Our import system is able to make relationships.

Normally these relations are in the form of a numerical reference called “Id”

Ex: ID: 1

Moreover, it is even possible by specific functionalities to make references by other information.

For example, one reference per SKU makes it easier to update your suppliers’ prices when you receive a new price list for your products.

Example of a product reference by SKU:
product|getProductIdBySKU => 12345SKU

There are even specific features that avoid external data processing since it is done directly at the import level.

For example, simplifying the updating of inventory quantities when taking inventory / counting.

Normally, this would require knowing the current inventory count and making the necessary adjustment.

Ex: 10 in inventory / count: 15 so an inventory entry of +5

With the “ImportInventoryAdjust” functionality, simply transfer 15 and the system will do the calculation for you.

Example Update Quantity in inventory:
number|importInventoryAdjust => 15

Caution

Importing is a tool that has many advantages (above). On the other hand, it involves high risks (dangers). Several checks do not occur during import, since they are performed at a very high level that exceeds security and business rules. This is unavoidable, since imports often use logic that is not standard or expected by the system.

So you won’t get any error message or it won’t be as clear as in the app. In case of error due to its mode of operation, you will have corrupted data…

It is the responsibility of the person importing the file to validate and cross-check the content of the file.

How to access the import system

To gain access, users must have import training. The duration varies according to the objectives and the level of access. You will be given an example of the “Template” format, to simplify your life.

To perform your work, you must also have the rights to the requested elements. There are two possible levels.

Limited Import

Allows the update of specific elements, these take the form of buttons at the desired places in the application.

For example:

  • Importing information from a sale
  • Importing purchase information
  • Import of products

Admin import

Allows you to import all system information.

Thanks to the metadata, it is possible to know the reference and the exact nature of each piece of information in the system (available through the parameters).

However, this requires a good understanding of the data structure.

It is possible to deepen the knowledge of this structure by exploring our API export and interaction system.

What is a CSV?

These are tabular data as comma separated values ​​(‘,’)

This is the translation of the English “Comma Separated Values ​​=> CSV”

Reference and detailed definition according to Wikipedia:

https://en.wikipedia.org/wiki/Comma-separated_values

https://en.wikipedia.org/wiki/Comma-separated_values

simple example

“id”,”name”
1,”PHPCreation Inc”
2,”PHPReaction”
3,”Simon Tremblay”

Why a CSV?

Its structure is simple. That is why:

  • It has no formatting elements
  • It is very efficient and compact
  • This is a standard and recognized format
  • It is widespread (used by many systems)

It is possible to open CSV documents in a text editor like Notepad.
But it is much more convenient to open them with a spreadsheet system
Ex: Open Office (Free download)

e.g. Libre Office (free download)

E.g.: Microsoft Excel or MS Excel

Ex: Google Doc “Calc” or “GCalc”

It is possible to easily convert a spreadsheet document to CSV.

Ex: Excel extension .XLS or .XLSX to CSV (simply with a “Save as”)

Ex: Open Document Spreadsheet extension .ODS to CSV

In addition, several systems offer direct CSV export.

Target the data to import

You need to know the general structure of the data to help you target the right items to import.

It is possible to deepen the knowledge of this structure by exploring our API export and interaction system (available in the settings).

Often we have to separate our information into several imports to target the right elements.

For example:

Inventory product grid separated in two (Products and Inventory).

Of course, the inventory will include a reference to the Products.

Preparing an import file / Using CSV file

You need to know the reference of the data used by the import system.

Thanks to the metadata, it is possible to know the reference and the exact nature of each information in the system (available in the parameters) (https://en.wikipedia.org/wiki/Metadata)

We suggest you first compare your information with the form for this item.

Often the selected elements include references / mandatory fields, sheet to be completed and conditions, in order to avoid any subsequent problem.

Required fields are marked with a red “*” asterisk.

You can use the software of your choice to generate a CSV.

Suggested settings:

Separation: “,” by commas (Attention on MS Excel, it uses the “;”)
Text fields: “”” Use of double quotes to repair fields (pay attention to special characters)
Encoding: UTF-8 (pay attention to special characters)

 

Please refer to the following link for more details and more explanatory steps related to creating a custom CSV import file for your data to PHPReaction: https://phpreaction.com/quoi-de-neuf/import-massif-de-donnees-dans-votre-erp/

Start import request

Use targeted item link (available in settings)

Follow the steps:

  1. Select file
  2. Confirm the settings used (if possible, keep the default ones)
  3. Launch the request called “Job”

The system will inform you of the new request and will send you its reference number.

The request is pending and used by another system so its sole responsibility is to import the requests.

Normally the delay is less than 5min, often practically instantaneous (15 seconds).

Confirmation of request

You can return to see the requests (available in the parameters which include all the information of the request.)

In addition, these are associated with the results of the request. You will be able to consult.

Validate information

Of course, following the import, you will be able to consult what you have just done.

If you get unexpected behaviors or results from your import, there is probably some information you left out that is required by the system.

Do you want efficient management?
We are happy to participate in your project!