> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnilinker.pl/llms.txt
> Use this file to discover all available pages before exploring further.

# Prices to your ERP

> Send the prices saved in Omnilinker to Wapro from Products, see where each send stands, and know what to do when one does not arrive.

Omnilinker can send the price saved on a price level of a product to the ERP price level that is mapped to it. You
choose what to send; nothing is sent by itself. The ERP Sync agent writes the price in your Wapro database through
Wapro's own price procedure, the same one behind Wapro's price screen. Omnilinker never connects to your database.

Omnilinker sends the price **you saved** at that level, net or gross as you choose. It does not calculate a price. Wapro
works out the other amount from the product's sales VAT rate and rounds it to two decimals.

## Before you start

You need all of these:

| What | Where it is set |
| - | - |
| The permission **Send prices to ERP**, under **Product**. | [Permissions](https://docs.omnilinker.pl/administration/permissions.md#catalog) |
| An active connection with an agent that is online. | [Monitoring](https://docs.omnilinker.pl/erp/monitoring.md) |
| An **ERP user for writes** on the connection, a Wapro user who may change prices (Wapro's `ArtykCenSprz` right). | **ERP Integration** > **Connections**, **Details**, **Change** next to **ERP user for writes**. See [Monitoring](https://docs.omnilinker.pl/erp/monitoring.md#connection-details). |
| The catalog price level mapped to **exactly one** ERP price level of the connection. | The connection's **Mappings** tab. See [Lists and mappings](https://docs.omnilinker.pl/erp/reference-items.md). |
| The product linked to a product in the ERP. | The connection's **Mappings** tab, **Link products**. See [Lists and mappings](https://docs.omnilinker.pl/erp/reference-items.md#link-products). |
| The catalog price level set by Omnilinker, not **Managed by another system**. | [Price levels](https://docs.omnilinker.pl/catalog/price-levels.md#who-sets-a-levels-prices). |
| A saved price on that level in Omnilinker. | The product's prices. |
| The price already in Wapro, on that level, for the product. | Wapro. |

The last row matters: Omnilinker changes a price Wapro already has at that level. It does not add a price the product
does not have there, and a send like that fails with **Not found**.

The **ERP prices** and **Send to ERP** actions appear only when you hold the permission and the ERP integration is
switched on for your organization. See [Modules and feature availability](https://docs.omnilinker.pl/administration/features.md).

## Send the prices of one product

**1. Open the product's ERP prices**

On **Catalog** > **Products**, open the product's actions menu, or **More** on its panel, and choose
**ERP prices**. On the product's own page the item is in the **More actions** menu.

**2. Pick what to send**

The dialog **ERP prices — ‹SKU›** lists the product's saved prices that an ERP connection could receive: **Price
level**, **Saved price** (net and gross), **ERP connection** with the ERP price level it is mapped to, **Last sent**
and **Send**. Choose **Net** or **Gross** in the **Basis** list of the row.

**3. Click Send**

Omnilinker says **Price queued for the ERP. You will be notified if it fails.** The row then shows where the send
stands.

**Refresh** loads the dialog again. A row that cannot be sent has a disabled **Send** and says why under the connection's
name (see [When a price cannot be sent](#when-a-price-cannot-be-sent)). If no row can be sent the dialog says **No
price level of this product can be sent to an ERP connection yet. The reasons are shown per connection.**

## Send the prices of several products

**1. Select the products**

On **Catalog** > **Products**, select the products. The bar that appears has **Send to ERP**. You can select at
most 50 products for one send.

**2. Choose the level, the connection and the basis**

The dialog **Send prices to ERP** says **‹n› product(s) selected**. Choose the **Price level**, then the **ERP
connection** if more than one can take it, then the **Basis**, **Net** or **Gross**. One send is for one level and one
connection. Levels that cannot be sent yet are counted under the list with the first reason, for example a level
that is not mapped, or one another system manages.

**3. Send**

Omnilinker says **‹n› price(s) queued; you will be notified of failures.** and shows three counts: **Queued**,
**Already queued** (a price of that product, level and connection that is already on its way) and **Refused**.

Under **Where they stand** each product has its **Status**, its **Message** and when it was **Finished**. **Refresh**
updates them, and **Send again** repeats the send for the products that did not arrive. A product whose send is
refused (it is not linked, say) does not hold the others back.

## Where a send stands

Every price you send has a status, shown in the dialog and, per product, in the bulk send:

| Status | What it means |
| - | - |
| **Pending**, then **waiting for ERP Sync**, **picked up by ERP Sync** or **being written** | The price is on its way. It waits while the agent is offline, paused or being updated. |
| **Written** | Wapro stored the price. The row also shows **Stored in ERP** with the net and gross Wapro holds. |
| **Failed** | Wapro or the agent refused it. The **Message** says why, under a kind such as **Validation**, **Not found**, **Permission denied** or **Temporary error**. |
| **Not confirmed** | The agent could not tell whether Wapro stored the price. Omnilinker never repeats it by itself. Check the price in Wapro before you send it again. |
| **Expired** | The agent could not write it within 24 hours, so Wapro was not changed. |
| **Withdrawn** | The price was still queued when the ERP took the level over, and was cancelled. It says "Withdrawn: ‹ERP› sets this level now" while the ERP sets the level, otherwise "Withdrawn before it reached ‹ERP›. Send it again if it is still needed." No notification is sent. See [Prices from your ERP](https://docs.omnilinker.pl/erp/prices-from-erp.md#hand-a-level-to-your-erp). |

When Wapro stored a different value from the one you sent, the row says **The ERP stored a different value.** If the ERP
price level is calculated in Wapro, it says **This ERP price level is computed; the ERP may recalculate it.**

A missing Wapro right ends as **Not confirmed**, not as a failure: Wapro's price procedure then returns without an error
and without writing. Give the **ERP user for writes** the right to change prices, then send again.

## What Wapro does with the price

* Wapro keeps one article row per warehouse. Omnilinker writes the price to the product's **main row**, the active row
  of the connection's source warehouse, or the lowest active row when the source warehouse has none. It does not write the
  article's other warehouses. See [The source warehouse](https://docs.omnilinker.pl/erp/reference-items.md#the-source-warehouse) and
  [Wapro](https://docs.omnilinker.pl/erp/providers/wapro.md#how-prices-are-read).
* Do not count on Wapro copying the price to the article's other warehouses: Wapro's own price procedure, which
  Omnilinker calls, does not do it. The agent's **Same prices in every warehouse** check tells you when your warehouses
  can differ (see [Monitoring](https://docs.omnilinker.pl/erp/monitoring.md#agent-tab)).
* The price is for the product's base unit. A price for another unit or for a quantity tier is refused.
* The currency of the price must be the currency of the price already in Wapro. Wapro converts nothing.
* A product whose index is shared by several Wapro articles is one product to Omnilinker; see
  [How products are identified](https://docs.omnilinker.pl/erp/providers/wapro.md#how-products-are-identified).

## When a price cannot be sent

Omnilinker checks the connection before it queues a price, and says why a row or a level is not available:

| What you see | What to do |
| - | - |
| **Map this price level to an ERP price level under ERP Integration → Connections → ‹connection› → Mappings.** | Map the level on the connection's **Mappings** tab. |
| **This price level has ‹n› mappings in ‹connection›, so a price could reach the wrong ERP price level.** | Keep one mapping for the level. |
| **This ERP price level is calculated in the ERP and cannot be written.** | Wapro calculates this level from another one. Map the catalog level to a level you can write to. |
| **Another system manages this price level, so Send to ERP does not write its prices.** (or, for the whole send, **Another system manages ‹level›, so Send to ERP does not write its prices.**) | The level is **Managed by another system**, so its prices are not Omnilinker's to send. To send them, make Omnilinker the level's owner; see [Who sets a level's prices](https://docs.omnilinker.pl/catalog/price-levels.md#who-sets-a-levels-prices). |
| **The owner of ‹level› just changed. Send again.** | Someone changed who sets the level while the send was running, so nothing was queued. Send again: the send then follows the new owner. |
| **This product is not linked to a product in the ERP.** | Click **Refresh lists** on the **Mappings** tab, or link the product there. |
| **The connection ‹connection› has no ERP user for writes.** | Set the **ERP user for writes**. |
| **ERP Sync for this connection has not been in touch since ‹time›.** or **No ERP Sync agent is paired with this connection yet.** | Start the agent, or [install and connect it](https://docs.omnilinker.pl/erp/install-agent.md). |
| **The product has no saved price on this price level.** | Save the price first. |
| **The saved price cannot be sent (its currency or amount is invalid).** | Correct the price. |
| **Select at most 50 products.** | Send in batches. |

A third owner refusal, **Prices on this price level come from ‹connection›, so Send to ERP does not write them back.**,
is for a level an ERP sets: the ERP's prices come into Omnilinker, so there is nothing to send back. See
[Prices from your ERP](https://docs.omnilinker.pl/erp/prices-from-erp.md).

Some situations do not stop a send but make it wait. The dialog shows a clock note under the connection, and the price
is written when the situation clears or expires after 24 hours:

* **ERP Sync has been offline since ‹time›. The price is written when it reconnects, or expires after 24 hours.**
* **Sync is paused in ERP Sync on the PC. The price is written when someone resumes it there, or expires after 24
  hours.** Pausing is done in the [tray app](https://docs.omnilinker.pl/erp/tray-app.md#pause).
* **ERP Sync on the PC needs an update: it runs version ‹x›, and Omnilinker requires ‹y› or newer. The price is written
  once it updates, or expires after 24 hours.** The agent updates itself at night; see
  [Install the agent](https://docs.omnilinker.pl/erp/install-agent.md#update-the-agent).
* **The ERP connector is starting; prices wait until it is ready.** or **The ERP connector is not ready right now; prices
  wait until it recovers, or expire after 24 hours.**

## Notifications

You are notified, in your [inbox](https://docs.omnilinker.pl/notifications/inbox.md), only when a price you sent did not arrive. The source is
**Catalog**.

| Notification | Severity | What it says |
| - | - | - |
| **Price not written to ‹connection›** | High | The send failed. The message says why. |
| **Price write to ‹connection› not confirmed** | Medium | The ERP may or may not have stored it. Check the ERP before sending again. Also sent when the agent did not report back within 15 minutes. |
| **Price could not be written to ‹connection›** | Medium | The agent could not write it within 24 hours, so the ERP was not changed. |

A send of several products gives one notification for the whole send, for example **Prices not written to ‹connection›**.
Opening it takes you to **Products** with the send's result open, where each product shows its own status. The
notification of a single price opens that product's **ERP prices**.

## See every send

Every price send is a command to the agent. **ERP Integration** > **Commands**, and the **Commands** tab of a connection,
list them with the operation **Write prices**: its status, when it was created and completed, the attempts, and, in the
details, the request and the receipt Wapro's answer produced. Filter by **Operation** or search by the product's SKU. You
need the **ERP commands** permission. See [Monitoring](https://docs.omnilinker.pl/erp/monitoring.md#where-to-look).

## Related pages

> **[Lists and mappings](https://docs.omnilinker.pl/erp/reference-items.md)**
>
> Map price levels and link products, and compare the ERP's prices with yours.

> **[Wapro](https://docs.omnilinker.pl/erp/providers/wapro.md)**
>
> How Wapro stores prices and which rights the agent needs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.