yarn add @pinelab/vendure-plugin-picqer
to install this plugin.
yarn add @pinelab/vendure-plugin-picqer
to install this plugin.
Vendure plugin to sync orders, stock and catalogue with Picqer.com order pick platform.
The plugin follows these principles:
Add the plugin to your vendure-config.ts
import {PicqerPlugin} from '@pinelab/vendure-plugin-picqer'
...
plugins: [
PicqerPlugin.init({
enabled: true,
vendureHost: 'https://example-vendure.io',
pushProductVariantFields: (variant) => ({ barcode: variant.sku }),
pullPicqerProductFields: (picqerProd) => ({
outOfStockThreshold: picqerProd.stockThreshold,
}),
pushPicqerOrderFields: (order) => ({
customer_remarks: order.customFields.customerNote,
pickup_point_data: {
carrier: 'dhl',
id: '901892834',
},
}),
}),
AdminUiPlugin.init({
port: 3002,
route: 'admin',
app: compileUiExtensions({
outputPath: path.join(__dirname, '__admin-ui'),
extensions: [
PicqerPlugin.ui,
... // your other plugin UI extensions
],
}),
}),
... // your other plugins
]
Start the server and set the fulfillment handler to picqer: Fulfill with Picqer
for all shipping methods that should be handled via Picqer.
Stock levels are updated in Vendure on
/picqer/pull-stock-levels/<channeltoken>
.This plugin will mirror the stock locations from Picqer. Non-Picqer stock locations will automatically be deleted by the plugin, to keep stock in sync with Picqer. Vendure's internal allocated stock will be ignored, because this is handled by Picqer.
You can use a custom StockLocationStrategy to control how available stock is calculated based on multiple locations.
You can call the endpoint /picqer/pull-stock-levels/<channeltoken>
, with your Picqer API key as bearer token, to trigger a full stock level sync. This will pull stock levels from Picqer, and update them in Vendure.
curl -H "Authorization: Bearer abcde-your-apikey" `http://localhost:3000/picqer/pull-stock-levels/your-channel-token`
This plugin installs the default order process with checkFulfillmentStates: false
configured, so that orders can be transitioned to Shipped and Delivered without the need of fulfillment. Fulfillment is the responsibility of Picqer, so we won't handle that in Vendure when using this plugin.
processing
when an order is placed in Vendure.order.completed
event from Picqer, the order is transitioned to Shipped
.Delivered
based on Picqer events, so we automatically transition to Delivered
.