Skip to main content
Systems, Files and EDI

VirtualStock Integration

Connect VirtualStock as a sales channel: why it needs both an API and an SFTP login, how orders are confirmed, what Neuro reads over SFTP and how to fix connection problems.

Last updated 12 days ago

VirtualStock is a drop-ship platform that retailers use to send purchase orders to their suppliers. When you add VirtualStock as a sales channel, you are the supplier: the retailer's orders come into Neuro, you accept and ship them, and Neuro sends your acknowledgements, tracking, stock and invoices back to VirtualStock.

If you are a brand or retailer sending your own orders to a VirtualStock supplier, use the VirtualStock Plugin guide instead.

Why VirtualStock needs two sets of login details

VirtualStock shares information in two different ways, so the channel needs two separate logins. Both are required and the channel cannot be saved without them.

Login

What Neuro uses it for

API username and password

Reads new purchase orders, sends your accept or reject acknowledgements, sends dispatch and tracking details, sends stock levels and creates invoices.

FTP username and password (SFTP)

Reads the files VirtualStock publishes on its SFTP server: order event files (orders accepted in VirtualStock, back orders, cancellations, returns and dispatches) and inventory files.

Why the SFTP connection matters: VirtualStock only publishes order changes made outside Neuro as files on its SFTP server. They are not available through the API. Without a working SFTP connection, a cancellation or return raised by the retailer never reaches Neuro, and you could pick and ship an order that has already been cancelled.

Points that often cause confusion:

  • The FTP login is not the same as your VirtualStock portal or API login. VirtualStock issues it separately.

  • You do not need your own SFTP server. Neuro connects to VirtualStock's server (sftp.virtualstock.com), so there is no host, port or folder to enter.

  • Neuro only reads files. It never uploads, moves, renames or deletes anything on the SFTP server.

  • Neuro reads the live area of your SFTP account. Use sandbox only switches the API to VirtualStock's test system; it does not change which files are read.

  • The login is a username and password. SSH keys are not used for VirtualStock.

Before you start

Ask your VirtualStock account manager for:

  • your API username and password;

  • your SFTP (FTP) username and password;

  • confirmation that your SFTP account has the live environment set up, so the live folder exists;

  • the supplier account the channel should use, if you have more than one.

Installing the VirtualStock sales channel

Store page with Stores in the menu, the Channels tab and the Add Channel button highlighted
The numbers match the steps below.

Steps shown in the screenshot:

  1. Open Stores and select your store.

  2. Stay on the Channels tab.

  3. Click Add Channel. Search for the channel and click Install.

Add VirtualStock channel form with Channel name, Username, Password, FTP username, FTP password, Supplier and Save highlighted
The numbers match the steps below.

Steps shown in the screenshot:

  1. Enter a channel name.

  2. Enter your VirtualStock username.

  3. Enter the password.

  4. Enter the FTP username.

  5. Enter the FTP password.

  6. Choose the supplier.

  7. Set the invoice and order options and what to sync, then click Save.

After saving, switch the channel to Active at the top of the page.

VirtualStock settings

Setting

What it does

Username and Password

Your VirtualStock API login.

FTP username and FTP password

Your VirtualStock SFTP login, used to read order event and inventory files. See above.

Supplier

The VirtualStock supplier account this channel is for.

Automatically create invoice

Creates the invoice in VirtualStock after Neuro has sent the dispatch for an order.

Use sandbox

Connects the API to VirtualStock's test system. Leave it off for live trading.

Use supplier part number for SKU

Uses the supplier part number on each order line as the SKU, when the retailer sends one.

Get comments as tags

Adds the order comment from VirtualStock to the order as a tag.

Get supplier SKU as order PO number

Copies the line-level supplier SKU onto the order as its PO number, when every line has the same value.

Sub-status for accepted and Sub-status for rejected

The VirtualStock sub-status sent with your acknowledgement when you accept or reject an order. Leave blank unless the retailer has asked for a specific value.

The general channel settings, such as Get orders, Manage stock and Download products, are explained in Sales Channel Settings Explained.

How VirtualStock orders move through Neuro

  1. Every 3 minutes (by default) Neuro reads new purchase orders from VirtualStock. They appear under Orders > Order Confirmations as Pending. They are not in your main order list yet.

  2. Accept or reject the order lines on the Order Confirmations page. Within about 5 minutes Neuro sends the acknowledgement to VirtualStock. Once an order is accepted, it is created in Orders as Unshipped and follows your normal rules and plugins.

  3. If the order is accepted in VirtualStock itself, VirtualStock writes an order file to SFTP. Neuro reads it, marks the confirmation as accepted with the quantities in the file, and creates the order.

  4. When you ship the order, Neuro sends the dispatch and tracking to VirtualStock within about 5 minutes, and creates the invoice if Automatically create invoice is on.

  5. If the retailer cancels or returns the order, VirtualStock writes a file to SFTP and Neuro updates the order.

What Neuro reads over SFTP

Order event files

Neuro checks for new order event files every 3 minutes, at the same time as it reads new orders (so Get orders must be on). The file name tells Neuro what happened:

File name starts with

What Neuro does

order

Marks the order confirmation as accepted and creates the order in Neuro.

backorder

Keeps the order Unshipped.

cancel

Sets the order to Cancelled.

return

Sets the order to Returned.

dispatch

Sets the order to Shipped.

Neuro skips an event for an order it does not have (for example an order from before the channel's start date) and an event for an order that is already Shipped in Neuro. Files ending in .err are ignored.

Inventory files

VirtualStock can also publish inventory files listing each part number with its free stock. Neuro reads them each time it imports products from VirtualStock: every 12 hours by default, or straight away when you use Refetch Products. This needs Manage stock and Download products on. Neuro matches each part number to a channel product with the same SKU and updates its quantity. A file is only read once VirtualStock has finished writing it (it adds a matching .DONE file).

Checking the SFTP connection

Open the channel and go to Logs:

  • Get order updates runs every 3 minutes. 0 order updates file found in FTP means the connection worked and there was nothing new. This is normal.

  • Update order entries show each event file Neuro processed, with the action (for example Cancel) and the result.

  • Get product stocks and Update product stock show inventory files and how many products were updated.

Troubleshooting

Message in the logs

What it means and what to do

FTP login failed or FTP connection failed

The FTP username or password is wrong, or the SFTP account is disabled. Check the details with VirtualStock, update them on the channel and save.

Failed to change directory to [live]

The login worked but the account has no live folder. Ask VirtualStock to set up the live environment on your SFTP account.

Order not found

VirtualStock sent an event for an order that is not in Neuro. No action is needed unless you expected the order; if so, contact Neuro Support.

Order already shipped

The order is already Shipped in Neuro, so the event was ignored.

Order already accepted (or rejected)

The order was already acknowledged in Neuro, so the order file was ignored.

X products updated. Y products failed.

Y part numbers in the inventory file did not match a channel product SKU. Check the SKUs on the channel's Products tab.

If a retailer cancellation is not showing in Neuro, check Get order updates in the logs first. If it shows a login or folder error, the SFTP details need fixing before any cancellations or returns can come through.

For more help, contact the Neuro Support Team.