Beruflich Dokumente
Kultur Dokumente
v1.1
Page 1
Table of Contents
ERP2WEB ......................................................................................................................... 3
Structure ....................................................................................................................... 3
Operation ...................................................................................................................... 3
Type of data .................................................................................................................. 3
Type of synchronization ..................................................................................................... 4
Revision number. ........................................................................................................... 4
Mark of synchronized records ......................................................................................... 4
A step by step guide to setup an ERP2WEB synchronizer ..................................................... 5
Preparing the connections to the backoffice ........................................................................ 6
Preparing the connections to the web site ......................................................................... 8
Preparing the entities ................................................................................................... 10
Lets prepare a download Entity. ...................................................................................... 15
Preparing the Attachments ............................................................................................ 16
v1.1
Page 2
ERP2WEB
Structure
ERP2WEB is a middleware between the companys ERP and the Website.
It consists of three independent but fully cooperated components
The backoffice-specific module
In general, it handles xml files or database tables, but there are also engines for
specific ERPs that manages the data fully automated.
o Transforms the data from the ERP in a specific structure and prepares them
to upload
o Imports the orders from the e-commerce module, to the ERP.
The core ERP2WEB engine
Upload the data from the companys server to the web and downloads the data from
the web to the companys server. It knows when it should send or receive data,
and what data to exchange.
The e-commerce specific module
All data that uploaded to the website must update the websites database. There are
a number of webservices that are executed and updates the relevant tables,
according to the e-commerce module that it is used.
e-commerce database
E-commerce specific
webservice server
ERP 2 WEB
Operation
At specific user defined time, different for each entity, the backoffice module prepares the
data that has to be uploaded, and the e-commerce specific module prepares the data that
has to be downloaded.
Every xx seconds the core engine transfer the data and execute all the updates. Everything
that has been prepared during the previous step, is finalized. All database tables either in the
backoffice or in the website are updated.
Type of data
Any type of data can be transferred between any backoffice and any website database.
Data from database tables can update any website database
ERP 2 WEB Manual
v1.1
Page 3
Files of any kind (pdf, jpg, doc, xls, etc) can be uploaded and keep synchronized with the
backoffice.
Type of synchronization
There are two types of data that have to be copied from the backoffice to the website.
Data that have to be synchronized, because the big amount of them, and the frequent
change, prevents the full upload every time. Such data are Products.
On the other hand, there are data that are not changed frequently and amount of them is not
big. Such data are Product Categories.
Both types are supported. The first one needs a mechanism to understand when a product
must update the website, instead the second one, when all data are uploaded every time.
Two Mechanisms are supported.
One, relies on the existence of revision number and the other one relies on the mark of
transferred data.
Revision number.
Every time a record is inserted or changed, increase the value of a field of the database table.
If we keep the value of this field at the end of each synchronization, it is very easy to know
which records has changed, the next time we have to synchronize. These are the records that
have bigger revision number.
In the ERP2WEB application, there are counters where we keep the last revision number for
each entity.
We can change these counters from the relative button in the ribbon.
v1.1
Page 4
v1.1
Page 5
Pressing
Finally press
v1.1
Page 6
If the backoffice is a database in general, we must select the type that an order will be
saved. In XML files or in Database tables.
If we select XML files, we must declare the folder we prefer to be saved.
If we want to update database tables, we can create these tables, according to a predefined
definition. Select the definition file, and press the button
In the database you selected in the previous step, will be created the necessary tables.
v1.1
Page 7
v1.1
Page 8
v1.1
Page 9
v1.1
Page 10
Click in an empty line, and fill the name you want. Then select the folder to store this
definition, and finally select the type upload from the drop down list.
Save this entry pressing the button v as we indicate in the red circle in the following
screenshot. These buttons are in the down left corner of the screen
If you want to delete an entry, press the button X in the same button collection.
Press the
Press the button Manage in the top of the list. A new Tab appears with the name you
entered.
Settings
v1.1
Page 11
In the Table name we write the table name in the website database.
Consider the following :
If the table does not exist, the application creates this table with the fields declared in the
next step.
If the table exists, like products, the table just updated with the data.
In the Packet size we declare the number of records (packet) that is uploaded.
For minimum upload time, it is better to zip the file, so check the Zip files before upload.
In case of use of revision number in ERP table, in this place we write the query statement
that give us the maximum revision number of the table.
Finally, any statement we write in the Execute command after query runs will be executed
at the end of any upload process.
Press the
Field Mapping
In this Tab we must make the mapping between the field names of the query we prepared
before and the field names in the website database.
By pressing the button
all field names of the query we prepared before, are
loaded in the drop down list of the first column named Backoffice fields, so we can select
from this list.
ERP 2 WEB Manual
v1.1
Page 12
In the next column named Webshop Field we write the field name of the relevant table in
the website database, without the table name. We need only the field name.
In the next column named Type select from the drop down list the type of the field.
In the next column named Length write the length of the field.
In the next column named Comments write anything as a reminder or comments.
If you want to skip a field during the operation, you can check the next column.
One of the fields, usually the code, must declared as Unique.
Finally, we can declare a default value for fields that have null values.
Press the
It prepares the definition that will be used from the webservice server in the website, to
create the table and/or update the table with the data from the ERP.
So, at the end, press this button. The XML file will be saved in the Entities folder.
Either for demo or testing purposes, we would like to upload the data
From the query Tab, we can click on this button. It prepares a packet with these data ready
to upload.
v1.1
Page 13
Schedule
We describe the time and the interval this upload process should run.
Be careful : According this schedule, the application will prepare data to upload.
The actual upload process happens according the schedule stated in Parameters Tab
In the left part Day occurrence we declare which days we would like to run.
In the right part we declare the Time.
Consider that if we fill specific time, one or more values, the above schedule is cancelled.
Press the
v1.1
Page 14
If you want to delete an entry, press the button X in the same button collection.
Press the button Manage in the top of the list. A new Tab appears with the name you
entered.
There are three Tabs.
Field Mapping
In this Tab we must make the mapping between the field names of the website database and
the database of the ERP for the data we need to download. Usually these data are Orders.
Each order, is prepared in the website as a single record, which has all information.
Any field of this record could belong in one of the following entities :
OrderHeader, OrderDetail, OrderCharge, Customer, Address
In the first column, we must declare in which of the above entities the current field belongs.
In the next column, we declare the website field name.
In the next column, we declare the backoffice field name.
Between these two fields one of the following relations can exist :
1. The value from the website must be transferred identical to the backoffice.
We dont write anything in any of the rest columns.
2. The value from the website must update more than one fields on the backoffice
In the column backoffice field name we write all field names separated with
comma.
3. There are fields in the backoffice that must have a default, value although there are
no equivalent fields in the Website.
We leave empty the Website field name, we complete the backoffice field name
and we put the default value in the column Default
4. The value from the website must be mapped to a value from a table in the backoffice
database. For example, in the website we have two Payment methods VISA and
Paypal, but in the backoffice these values belongs to a table and in the Orders
table, we need to write the Payment ID. So we must find the appropriate ID for each
payment method. It is very easy for someone who knows to build simple database
ERP 2 WEB Manual
v1.1
Page 15
queries. First, in the Backoffice field we will put the PaymentID which is needed,
and in the Action column we write something like this :
Select PaymentID from PaymentMethods where
PaymentMethods.Description=@FIELD@ . In the runtime, the @FIELD@ will be
replaced by the value VISA or Paypal and the query will return the actual ID.
Following the above rules, we can complete the Field Mapping for any Download Entity.
Settings
Suppose we want customers from the website to have a different coding. The preferred mask
can be declared in this field. If we write WS-????, means that these customers will have WS
in the beginning and four digit number increasing.
The rest fields contains default values for various entities, depending on the backoffice ERP.
Schedule
It works the same way as in the upload entity.
v1.1
Page 16
In the Folder, select the folder where the files are stored.
In the FTP Folder, complete the full address of the folder in the website, where the files will
be copied.
Declare which File types we prefer to transfer.
Enable or Disable this action.
Especially for the photos of the products, there is a special consideration.
The name of the photo must be the Product Code which is unique.
Any file existing in the folder, will be uploaded and then will be transferred in another folder,
thus the source folder will be empty.
Each new file we add there will be transferred in the website and will replace any existing
with the same name.
With the procedure, it is very easy to have updated photos or other documents in the
website.
v1.1
Page 17