Development preview. The Commerce connector is available on the development system only. It is not yet part of the production release, and the production documentation does not describe it.

How it fits together

The ERP's stock is the truth the store sells against. Once a store is linked and active, the ERP sends each product's available-to-sell figure to the store whenever stock moves, and the store's own stock can no longer be edited in Commerce. Orders placed in the store follow in a later release. Until then, do not book web sales or web returns in the ERP by hand: Commerce keeps subtracting every web order after the link, so an ERP invoice for the same sale would count it twice and undersell more each day; and when a returned unit is restocked in Commerce, Commerce puts it back on sale itself, and an ERP receipt for the same parcel would count it twice.

The connector lives under Online stores in the sidebar (/commerce-connector) when the module is enabled for the company. Seeing the list needs the Commerce.Link.Read permission; linking a store, choosing warehouses and activating need Commerce.Link.Manage, and running the product match needs Commerce.Sync.Run. These permissions are company-wide: a user limited to some branches still sees every linked warehouse's stock on the link page, and a user who may manage links can link any warehouse of the company.

Jump to: The store list · Before you start · 1. Connect · 2. Warehouses and buffer · 3. Match products · 4. Activate · States and frozen stock · The link page · The product map · Runs and drift · Unlink and link again.

The store list

Each linked store is a card with its status, the reason in words when it needs attention, the Commerce address, when stock was last pushed, and how many products are waiting to be pushed. Two badges mark what deserves a look: Stock frozen (nobody can change the store's figures and nothing is being sent; the card says why, and the link page says how to get out) and figures edited in Commerce (the nightly check found numbers that were changed in Commerce behind the ERP's back; it corrected them). A link that is still being set up offers Continue setup.

Before you start

1. Connect

Choose Link a store, enter the store's Commerce address and paste its store API key, then Check the key. Nothing is written yet: the page shows the store, its currency, the key's name and when the key expires (on that day Commerce refuses it and the store stops getting stock from the ERP, unless you replace the key before), both VAT numbers, and whether this company linked the store before (a re-link keeps its product matches and order counter). If the VAT numbers differ, tick the box to link anyway. If a number changed while you were looking, the page shows the new numbers and asks for the tick again.

The Commerce address must be one this ERP is allowed to call; otherwise the message says so and the key is never sent. The key travels once to be checked and is then stored encrypted. It is never shown again, and the form forgets it the moment the link exists. Link this store creates the link in the Setting up state. Linking does not change the store: it keeps its own stock until you activate.

2. Warehouses and buffer

Tick the warehouses whose stock the store may sell and put them in the order to ship from (the arrows change the priority). Each warehouse shows a Counted chip with the date of its own opening count, or Not counted with a link to the stock reconciliation page, plus how many products are measured there. The safety buffer holds back that many units of every product: the store sees the available stock minus the buffer. Saving needs at least one warehouse and a whole number from 0. If someone else changed the link meanwhile, the latest version is loaded and you save again.

3. Match products

Match products now reads the store's catalogue and pairs each product marked Listed online with the store variant that has the same SKU. It changes nothing in the store. The result sorts every product: Matched, Matched with stock not tracked (the store does not track that variant's stock), Ambiguous (a SKU on several variants or products), Only in the ERP (a product marked Listed online that no store variant matches), Only in Commerce (a store variant that no listed ERP product matches), Ignored, Cannot be matched and ERP product inactive. A large catalogue is read in the background; the page follows it until it finishes. Saving the warehouses again makes the last match out of date, so run it again.

4. Activate

The activation check lists what must hold, each as a tick or a cross with the way to fix it: a warehouse is linked and active; every linked warehouse has its own opening count; the currencies agree; the VAT difference is accepted; products were matched after the last settings change; the ERP knows its public address; the store has room for the ERP's webhook; the store's recently changed orders could be listed in full; and no other company's unlink of this store is still finishing (an unlink waits about a minute for its last push before it gives the store its stock back, so a minute later this passes).

Some things need your explicit confirmation:

Activate stays disabled until every check passes and every confirmation is ticked. It then switches the store's stock source to the ERP, registers a paused webhook, and sends the first figures before the page answers: the result says how many products were sent and how many follow within a few minutes. Then Back to the stores shows the link as Active.

States and frozen stock

A link is Setting up, Active, Needs attention, Key rejected or Unlinked. When a linked warehouse becomes inactive or loses its count, the link keeps pushing but shows that warehouse as 0 until it is fixed. When the key was refused, another system started sending stock, or Commerce refused the figures, nothing is pushed and the stock is frozen: the card says why, and the link page says how to get out, including taking the stock back in Commerce (Integrations → Inventory source → Commerce). When the store was switched back to its own stock in Commerce, nothing is pushed either, but the stock is not frozen: the merchant can edit it in Commerce again, and the link shows Needs attention until the ERP is made the source again. Each such state is also announced to the people who can manage links, once a day while it lasts. A notification opens the link page, which offers the way out (see below).

The link page

Open a store from the list (or from a notification) to see it in full. The top of the page says the state and its reason in words. When the store's stock is frozen a red banner says so and what to do, and the button for the way out is right below it:

If a linked warehouse is inactive or has no count of its own, the store keeps selling, but only the stock of the counted, active warehouses; the reason line says so. A yellow banner shows where the order counter is held (the order number, whether it has reached the ERP, and since when): every later order is already subtracted by Commerce, so the store shows less stock than it could until that is resolved.

The buttons: Push now sends what is waiting and releases quarantined products (it needs Commerce.Sync.Run); Reconcile now compares every figure on the store with the ERP's. Both first ask Commerce whether the store still takes its stock from the ERP: if the merchant took it back, nothing is overwritten, and if Commerce's answer cannot be read, nothing is sent until it can (the automatic passes and the nightly reconciliation hold back the same way, the overview shows it as what the last pass stopped on, and the people who manage links are told when it lasts three passes in a row); Match products reads the catalogue again; Replace the key; and Unlink. Each answers on the page in a sentence. While the link cannot send stock (a rejected key, or a store that took its stock back, for example) Push now and Reconcile now are switched off and the page says so; the reason is shown above them. A rejected key opens the Replace the store key form by itself, and only people who may manage links see it. For a minute or two after Activate the page says the store is being switched, rather than that the activation did not finish. Under Overview are the facts (last push, last check, order counter, last reconciliation, what the last pass stopped on) and the settings: the warehouses the store may sell from, in the order to ship from, and the safety buffer. If someone else saved the settings first, the page loads the newer version and keeps your choices so you can save again.

The product map

The Products tab lists every store variant (and every listed ERP product with no variant) with its status, in tabs with their counts: Matched, Held for a check, Stock not tracked, Not listed (Listed online switched off), Quarantined (Commerce refused that product's figure on its own; it is retried), Ambiguous, Only in the ERP (a listed ERP product with no store variant), Only in Commerce (a store variant no listed ERP product has: Ignore is offered here), Ignored, Cannot be matched and ERP product inactive. A line under the tabs gives the number of products not yet measured by any counted warehouse, as found by the last reconciliation. Search by SKU; the list is paged and always says how many there are.

Each row shows the last figure sent and the figure Commerce applied, and the result in words. Why this figure? opens the ERP's reasoning: what it would offer online now, the buffer held back, and each linked warehouse with its stock on hand and reserved, and why a warehouse does not count (not a warehouse of this company, inactive, no opening count of its own, or not measured for this product yet). From there you can set a buffer for this product (it wins over the link's buffer; clearing it uses the link's again). Listed online switches a matched product on or off for this store: switching it off sends the store a 0 for it. Ignore keeps a store variant the ERP does not have out of the way; Stop ignoring puts it back. Listed and the buffer belong to the ERP product, so a change applies to every row of it. Changing anything needs Commerce.Link.Manage.

Held for a check. A product matched after the store was activated (a product newly marked Listed online, an ambiguous SKU fixed, a product made active again) is not offered straight away: orders placed before the link may include it, and Commerce never subtracts those. Within a few minutes the ERP reads them; when none include the product it is listed by itself. Otherwise it stays held and the row says so. Switching Listed online on shows those orders with their units, and lists the product only once you confirm that you accept them (book them in the ERP first if they are not). A variant whose stock Commerce does not track is held the same way until you confirm that it sells without limit. The people who manage links are told once a day while something is held.

Runs and drift

The Runs and drift tab lists what the ERP did for the store, newest first: matches, reconciliations, order checks and stock-move checks, each with its state and, when it failed, why. Open a match to see its buckets. Open a reconciliation to see how many products fall in each bucket and the source check, and the drift: figures found different on the store. Each drift row says what happened: Edited in Commerce (someone changed the figure between the ERP's pushes), Already due to be sent (the ERP's own change was about to be sent) or Changed with no ERP movement. The ERP puts its own figure back for each. Edit stock in the ERP, not in Commerce, while the ERP is the store's stock source. The run shows at most 1,000 rows and says how many there were. A completed reconciliation (the nightly one or Reconcile now) tells the people who manage links once a day when it finds figures edited in Commerce or changed with no ERP movement.

Other notifications also open this page: a stalled link (several passes in a row stopping the same way), an unknown result word from Commerce (the connector is older than its Commerce and must be updated), an unlink that a restart cut short and the ERP finished by itself, products held for a check (they open the Products tab), a link that was released for another company (see below), and a link whose stored webhook signing secret can no longer be read (Commerce's order notifications are then refused, and orders arrive through the regular pull, minutes later instead of seconds; linking the store again registers a new secret).