What the connector reads
Omnilinker reads Wapro’s selling prices to compare them with yours, and stores them as your prices only on a price level
you let Wapro set (see Prices from your ERP). It takes no categories or bundles from Wapro. Stock is shown beside yours for comparison, and becomes a warehouse’s stock only when you let Wapro manage that warehouse (see
Hand a warehouse to your ERP). See
What the integration does today.
Product details
Besides its code and name, the connector sends these details of each product. Which of them reach your catalog, and whether they replace what is there, you decide per connection with Edit product settings on the connection’s Warehouses and products tab: see Products from your ERP.
Wapro keeps one row per warehouse for the same article. The details come from the product’s main row: the first active
row, preferring the connection’s source warehouse, then the one with the
lowest article ID. That is the row prices are written to. Nothing is sent for a detail that is empty in Wapro, and Omnilinker
never clears a value in Catalog because of an empty one.
Which products are created automatically
With automatic creation on, Omnilinker creates a catalog product for each Wapro product that is marked for external systems and not blocked. Exactly: some row of the product in your company hasAKTYWNY_DLA_SYS_ZEW = 1,
ZABLOKOWANY = 0 and FLAGA_STANU <> 5 (not marked removed). An article whose row in the source warehouse is blocked
still qualifies through another warehouse’s active, unblocked row. See
Automatic creation.
How stock is read
Wapro keeps the stock on the article rows themselves: one row per article per warehouse. The connector adds up the rows of a product (see How products are identified) per warehouse and sends, for each pair of a product and a warehouse of your company, the quantity on hand, the quantity reserved and the quantity held by documents being edited. Omnilinker works out the available quantity as on hand minus reserved minus held, which is how Wapro does it, and shows the result beside your own stock; see ERP stock beside yours.- When. While at least one warehouse of the connection is mapped (see Lists and mappings), the agent reads the whole stock every 5 minutes, counted from the end of the previous read. With no warehouse mapped it reads it once a day.
- How little it disturbs Wapro. The agent reads in short pages and slows down when Wapro is busy: a page that takes more than about 2 seconds makes the next one smaller and is followed by a pause. It waits at most 5 seconds for a lock and then tries again later, and it never reads uncommitted data.
- What it sends. It compares each read with the last one it sent and uploads only the products and warehouses whose figures changed, so a quiet Wapro sends almost nothing. A stock line that disappears from Wapro is sent as 0. A complete set goes up once a day, which also corrects anything missed.
- Stock that Wapro does not list. A product that is not in Wapro’s last complete set in a warehouse shows 0 there, marked “not in the ERP’s last list”.
- Paused or updating. A paused agent reads no stock; see the tray app.
The company number
A Wapro database can hold several companies, and every price level, warehouse and article belongs to one of them. Enter the company’s number (ID_FIRMY, usually 1) in Company number on the agent’s connection form, in
setup or later in the tray app’s Settings > Change…. The field is required: the agent reads
the lists of that company only, and without it it reads none.
How products are identified
In Wapro, every warehouse has its own row for the same article. The connector treats all of the company’s rows with the same catalog index (INDEKS_KATALOGOWY) as one product:
- Spaces at the start and end of the index are ignored. Nothing else is:
abc-1andABC-1are two products. - An article whose index is empty, or only spaces or other white space, is not a product and is left out.
- The product’s code in Omnilinker is its index. By default, Omnilinker links an ERP product to the catalog product whose SKU equals that code; the connection can also link by EAN. See Link products.
- The product’s ERP key is the lowest article ID (
ID_ARTYKULU) among its rows, removed rows included. It stays the same when you change the index on all of the product’s rows to one that no other product has, deactivate or remove a row, or add a warehouse, so a link survives those changes. - A product is active when at least one of its rows is active for external systems (
AKTYWNY_DLA_SYS_ZEW = 1) and not marked removed (FLAGA_STANU = 5).
- If the changed rows include the one that holds the key, the link follows the changed rows. It takes their new code, and the rows that kept the old index appear as a new product with no link.
- If the changed rows do not include it, the link stays where it was and the changed rows appear as a new product.
- A link whose key is still on the list stays with the product listed under that key and takes that product’s index as its code.
- A link whose key is no longer on the list moves to the product on the list that carries its code, but only when exactly one product does and that product has no link yet. Otherwise it stays, and it shows under Links to products that are no longer on the ERP’s product list until you unlink it (Unlink; see Products no longer in the ERP).
How prices are read
Wapro keeps the price of an article at a price level on the article’s row:CENA_ARTYKULU holds one row per article and
price level. The connector sends, for each pair of a price level of your company and a product, the price Wapro holds,
so Omnilinker can show it beside your own, or, on a price level you let Wapro set, use it as the price. It only reads. Whether it reads at all, and how often, is described under
Prices: only while a price level is mapped and Read prices from the ERP is on for
your organization, every 15 minutes by comparison and in full once a day.
- Which row. An article has one row per warehouse (see How products are identified). The connector reads the price of the product’s main row: its active row in the connection’s source warehouse, or the active row with the lowest number when the source warehouse has none. It ignores the prices on the article’s other warehouse rows. This is also the row that a price you send is written to. See The source warehouse.
- What it sends. The net and the gross price as Wapro stores them, to four decimals, with the currency of the row. Wapro leaves the currency of a price in PLN blank, and the connector sends PLN for it. A price in another currency is sent in that currency: Wapro converts it only on a document, at that day’s rate, so Omnilinker converts nothing.
- What it skips. A row whose net and gross are both 0, a row with a missing amount, and a product with no active row. Omnilinker reads a skipped price as no price, and never as 0.
- Which unit. The price of the article’s base unit. A sale in another unit costs the price times the unit’s factor in Wapro, which the connector does not apply; prices for other units and quantity tiers are not read.
- How little it disturbs Wapro. As for stock: short pages, a pause when Wapro is slow, at most 5 seconds’ wait for a lock, and never uncommitted data. It compares each read with the last one it sent and uploads only the prices that changed. A price that disappears from Wapro is marked as gone, not set to 0.
- Paused or updating. A paused agent reads no prices; see the tray app.
SynchroArt) is set to “Wspólne dane i ceny podstawowe” and synchronisation is on for
the price level. When your company has more than one active warehouse and that is not so, the agent’s checks show
Same prices in every warehouse with a hint saying that Omnilinker reads, and sends prices to, the article’s row in
the main warehouse. It is information only: no operation is switched off and the connection stays healthy. The check
needs SELECT on three more tables (see SQL Server login); without them it cannot tell, so it
shows the hint with a detail that starts with “Not checked”, and nothing else changes. See Monitoring.
Sending prices to Wapro
Send to ERP writes a price to the Wapro price level its catalog level is mapped to, throughdbo.Api_ProductPriceModify, the procedure behind Wapro’s own price screen. It needs:
- The connection’s ERP user for writes (see Overview tab). Wapro checks
that user’s right to change selling prices (
ArtykCenSprz) in the warehouse of the row it writes. Choose a user with that right and no more rights than writing needs, not Wapro’s administrator. - Execute rights on
dbo.Api_ProductPriceModifyand read rights on the price rows (CENA_ARTYKULU) for the agent’s SQL login; see SQL Server login.
- To the product’s one row described in How products are identified, net or gross as you sent it; Wapro’s other amount is calculated with the product’s sales VAT. The product must already have a price row on that level: the procedure changes a price and never creates one.
- Not to a level Wapro calculates from another level: Omnilinker refuses it before sending.
- Not for a unit other than the base unit or with a minimum quantity.
- In the row’s own currency; Wapro converts nothing.
- Wapro’s default price marker (Cena domyślna) never moves.
ArtykCenSprz right makes Wapro skip the change without an error: the price ends Not
confirmed, with the warning “Wapro did not apply the change; the Wapro user may lack the ArtykCenSprz permission”.
A price Wapro already holds is not written again. From the ERP Sync release that sends prices in batches, the
connector reads the price row first, and when the row already holds exactly the net and the gross price it would write,
it writes nothing: the price is Written, with the note “unchanged: Wapro already stores these values”. So Wapro’s
price triggers do not fire for a price that did not change, including triggers your own integrations rely on, such as a
shop export. Because nothing is written, Wapro does not check the ArtykCenSprz right for that price either. Older
agents write every price they are sent.
How product images are read
The connector reads the images of the products that are linked in Omnilinker, and only while Read product images from the ERP is on for your organization and the connection’s Images field is not Off (see Product images). It writes nothing to Wapro.- Which images. A product’s images are the
ARTYKUL_BLOBrows whose catalog index (INDEKS_KATALOGOWY) matches the index of one of the product’s rows in your company, ignoring upper and lower case, as Wapro itself shows them. So two products whose index differs only in case share their images. An image of another company is never read. - The main image is the one marked as the default (
DOMYSLNE). If several are marked, the oldest of them; if none is, the oldest image. The others follow in the order they were added, never by name. The image’s name (NAZWA) becomes its file name in Omnilinker. - Shop and auction flags (
DOSTEPNE_ABSTORE,DOSTEPNE_AUKCJE) are read, but filter nothing yet: every image of the product is taken. - Changes. The agent compares the images about every hour and reads them in full once a day. A new, replaced or deleted image, a new name or a moved main mark is noticed at the next comparison. Wapro’s own image editor can replace an image’s contents while keeping its ID and, sometimes, its exact size; such a change is found by a daily check at 2:00 at night (the agent’s computer’s time), which fingerprints the images on the SQL Server. That check needs SQL Server 2016 or newer: on an older server the tray app’s Troubleshoot shows Daily check of image contents: Off (SQL Server older than 2016) as a warning, and only an image of exactly the same size goes unnoticed.
- Images kept in a folder. Wapro can keep the images added in its desktop program in a folder instead of the
database (disk mode). Omnilinker does not read that folder: those images do not reach Omnilinker, are never treated as
deleted, and Troubleshoot shows Where Wapro keeps product images: In an image folder (disk mode) as a warning.
Images stored in the database still arrive, in either mode. To tell the mode, the connector reads
WAPROERP_KONFIGURACJA(orINTERFIRMAPOZYCJAandPOZYCJAKONFIG); without access to them it assumes database mode. - Images without data. Wapro’s “reduce the database size” empties the images’ data but keeps the rows. Such an image is listed without data, and Omnilinker keeps the image it already has as it was.
- The load. Image data is read one image at a time, in pieces, and uploaded at most 30 MB a minute by default, so a first read of a large catalog takes hours. Nothing is read while the agent is paused. After every 50 images, while the agent is writing a price or an order to Wapro, the uploads wait for it to finish, up to 30 seconds.
What it writes to your database
Reading the lists, the stock and the prices writes nothing: the connector only readsCENA, MAGAZYN, ARTYKUL and
CENA_ARTYKULU, and, for product details, JEDNOSTKA and KOD_KRESKOWY. Reading orders back (their status, invoices and KSeF numbers) writes
nothing either: it only reads the order, invoice and warehouse document tables listed under
SQL Server login. It does not register Wapro’s change tracking (WFM_INT) and writes
nothing to the WFM_INT_* tables, and neither does stock or price reading: Omnilinker finds out what changed by comparing reads.
Earlier versions of the agent could register in the change tracking; such a registration is no longer used, and the next
section removes it.
Sending a price does write. See Prices to your ERP. The connector writes through Wapro’s own
procedure Api_ProductPriceModify, the one behind Wapro’s price screen, as the ERP user for writes, which needs
Wapro’s ArtykCenSprz right. It changes the net and the gross price of the product’s main row at that level in one
statement and then reads the row back to check it, and it never writes an article’s other warehouse rows. A price the
row already holds is not written at all. See
Sending prices to Wapro.
Sending orders does write. See Orders to your ERP and Customers in your ERP
for what it means for you. The connector writes through Wapro’s own procedures, so Wapro applies its own rules:
- An order is a customer order, placed with
Api_OrderDocumentHeaderAdd,Api_OrderDocumentPositionAddandApi_OrderDocumentAccept, andRM_DodajZestawNaZam_Serverfor a set line, all in one transaction: either the whole order is saved, or nothing is. With Book a reservation in ‹connection› on (the default), it reserves stock in the warehouse of the order’s source. Omnilinker’s reference for the order (OMNI-…) is written to the order’s internet order id, and the channel order id and buyer login to the free field you chose on the Orders tab. - A customer is created with
Api_CustomerAddOrModifyonly when no existing customer matches. Omnilinker’s key goes to the free field you chose. It never changes an existing customer. - A delivery place. The order’s delivery address is added to the customer’s delivery places as a place of its own with
Api_DocumentDeliveryAddressessAddOrUpdate, after one plainINSERTintoMIEJSCE_DOSTAWY; a matching place is reused. For a parcel locker the place is the locker’s own address, with InPost’s operator SHIPX, when Allegro gave the address. The customer’s default delivery place never changes. - A cancel goes through
RM_ZatwierdzStatusZamowienia, which also releases the reservation. - A change to the products of an order already in Wapro (see
Change an order that is in the ERP) goes through
Api_OrderDocumentPrepareForModify,Api_OrderDocumentPositionDelete,Api_OrderDocumentPositionModify,Api_OrderDocumentPositionAddandApi_OrderDocumentAccept, all in one transaction. Wapro itself refuses nothing for an order it has fulfilled, invoiced or closed, so the connector reads the order first and declines the change, writing nothing, when the order is fulfilled, partly fulfilled, invoiced, closed or cancelled, when someone changed its lines in Wapro since Omnilinker last sent them, or when it has a set line. It never edits a set line, and it leaves the delivery line and the order’s other data as they are. - Exchange rates, if you leave Download NBP exchange rates on: before a foreign-currency order, the connector
calls Wapro’s own
Api_CurrencyImport, which fetches the National Bank of Poland’s tables the way Wapro does. It never writes a rate itself. The download needs the SQL Server to allow CLR, to trust Wapro’s download component and to reachapi.nbp.plover HTTPS. When any of it is missing the download fails with a warning in the order’s receipt (ERP Integration > Commands), and the order is placed on the tables Wapro already has, if they are recent enough (see Currencies). - The free fields.
POLE1toPOLE10are saved by Wapro’s procedures with dynamic SQL; the connector fills the customer key and the channel order id, and leaves your other fields as they are. Fields 6 and 7 are never used, because Wapro stores them incorrectly.
Api_ procedures. Omnilinker uses only procedures Wapro installs, but the terms of your licence are between you and
Asseco.
Removing the old registration
Earlier Omnilinker agents registered anOMNILINKER consumer in Wapro’s change tracking. Nothing reads it any more, but
Wapro’s triggers keep writing a change row for it on every change to a tracked table, which costs Wapro an extra write
for nothing. If the agent finds that registration, the tray app’s Troubleshoot shows the warning Old registration
in Wapro’s change tracking: Present; see the tray app. Nothing stops working because of
it, so there is no hurry.
Your database administrator or Wapro partner removes it, once, with the script below. Omnilinker never changes Wapro’s
change tracking itself.
SELECT on WFM_INT_SYSTEM to see the registration (membership of db_datareader covers it). Without
that permission it can’t tell, and shows no warning.
SQL Server login
The connector connects with the SQL Server login you enter in the agent’s settings, or with Windows authentication as the service’s account. It needs:SELECTonARTYKUL,MAGAZYN,CENAandCENA_ARTYKULU, or membership of thedb_datareaderrole (CENA_ARTYKULUholds the price rows; the connector reads it to read prices and to check a price it sends), andEXECUTEondbo.Api_ProductPriceModify. The agent’s connection test checks it (Wapro price procedure installed) and does not pass without it.
ARTYKUL and MAGAZYN. To let the agent warn you about an old registration
(see Removing the old registration) it also needs SELECT on WFM_INT_SYSTEM, which
db_datareader covers; without it the warning is simply not shown.
To check whether your warehouses can have different prices (Same prices in every warehouse), it also reads
ARTYKUL_CENA_IE, POZYCJAKONFIG and INTERFIRMAPOZYCJA, so grant SELECT on them too (db_datareader covers them).
They are optional: without them, price reading and sending carry on, and the check shows its hint.
For product details it also reads JEDNOSTKA (the unit) and KOD_KRESKOWY (extra barcodes), so grant SELECT on them
too. Without them products still arrive, but without a unit or extra barcodes, and the agent logs a warning.
To send orders and create customers, the login also needs, as listed in
Requirements:
EXECUTEon the order, customer, delivery place and cancel procedures, and on three functions they use;INSERTonMIEJSCE_DOSTAWY;UPDATEonZAMOWIENIE_INTERNETOWE_IDand on the free fieldsPOLE1toPOLE10of customers, orders and order lines, because Wapro saves those fields with dynamic SQL that runs with the caller’s rights;SELECTon the order, customer, delivery, country, VAT, currency and payment form tables;- optionally
EXECUTEonApi_CurrencyImportfor the exchange rate download.
SELECT on
POZYCJA_DOKUMENTU_MAGAZYNOWEGO, DOKUMENT_MAGAZYNOWY, DOKUMENT_HANDLOWY (including its column KSEF_ID) and
TYP_DOKUMENTU_HANDLOWEGO, and, optionally, on MAG_SLOWNIK_STATUSOW_DOKUMENTOW. The read-back needs ZAMOWIENIE and
POZYCJA_ZAMOWIENIA too, but those are among the rights for sending orders above. db_datareader covers all of them.
Without one of those four tables, only the read-back goes off: the PC and connector tab shows Read orders sent
from Omnilinker marked switched off, the agent’s log names what is missing, no check fails, and
orders, customers, prices and the other lists carry on. Without MAG_SLOWNIK_STATUSOW_DOKUMENTOW the read-back works,
but the card cannot show Wapro’s own name for a status. See
Requirements.
To read product images (see How product images are read), the login also needs
SELECT on ARTYKUL_BLOB, and on WAPROERP_KONFIGURACJA to tell where Wapro keeps them; db_datareader covers both.
Without ARTYKUL_BLOB, only images go off: the PC and connector tab shows Read product images, Read image
files and Check image files for changes marked switched off, and everything else carries on.
To change orders that are already in Wapro, the login also needs EXECUTE on dbo.Api_OrderDocumentPrepareForModify,
dbo.Api_OrderDocumentPositionModify and dbo.Api_OrderDocumentPositionDelete, and SELECT on
POZYCJA_ZAMOWIENIA_SPRZEDAZ_TRANSGRANICZNA besides the four tables of the read-back. db_datareader covers the
SELECTs. Without one of them, only the change goes off: the PC and connector tab shows Change orders marked
switched off, and a change to an order in Wapro is refused as “ERP connection not ready”, while placing,
cancelling and reading orders carry on. See Requirements.
Known limitations
- Omnilinker takes from Wapro the lists above and the product details in the table. Stock is taken into an Omnilinker warehouse only when Wapro manages it; otherwise it is read for comparison. Selling prices are read to compare them with yours, and land in your catalog only on a price level you let Wapro set; categories and bundles are not imported.
- Omnilinker reads back an order’s status, its sale invoices and their KSeF numbers, and only shows them. A change made to the order’s lines in Omnilinker is sent to Wapro after you confirm it, but a change made to the lines in Wapro does not come back to Omnilinker (the next change from Omnilinker is then refused until you check the order), and neither does an order created in Wapro.
- A change to an order does not carry the delivery cost, buyer details, addresses, notes, payments or the status, and a set line (Zestaw) cannot be changed. See Change an order that is in the ERP.
- An order is not sent with a custom or discount line, with lines from more than one warehouse, with more than 150 lines, or as an intra-EU business sale or an export. A cross-border consumer sale (OSS) is sent only with goods at the 23% rate. See What is not sent yet.
- Prices are compared, and imported only on a price level you let Wapro set. Only the price of a product’s main row and of its base unit is read; the same article’s price in another warehouse, another unit or a quantity tier is not.
- Products are read as a complete list, about once a day or when you click Refresh lists, so a change in Wapro shows in Omnilinker after the next list. Stock is faster: normally within a few minutes of the change.
- A product whose index differs only in upper and lower case from another is a separate product in Omnilinker. Their images are shared: both products get the same images.
- Product images kept in Wapro’s image folder (disk mode) are not read, and Wapro’s shop and auction flags on images filter nothing. WMF and EMF images, which Wapro accepts, are not taken.
- A product’s key changes when the article row holding it is deleted outright or its index is emptied, and a new index on only some of a product’s rows can move its link to those rows. Giving rows an index that another product already has joins those rows with that product and can leave a link without a product (see above).
Related pages
Requirements
Network, SQL Server login and permissions.
Lists and mappings
Map Wapro price levels and warehouses, and link products.
Products from your ERP
Choose which product fields Wapro fills, and how products link and get created.