Price Sync
Trigger
app.apiServer.post('/webhooks/price-update', async (req, res) =>
{
res.status(200).send({ success: true });
const { entityId } = req.body;
await addToQueue('price.sync', entityId);
});Fetching Price Data
const ErpApi = require('@vario-software/vario-app-framework-backend/api/ErpApi');
async function fetchPrices(articleId)
{
const { data } = await ErpApi.vql(
`SELECT
id,
articleNumber,
articlePrices.salesPrice,
articlePrices.currencyCode,
articlePrices.priceGroup.label
FROM article.queryArticles
WHERE id = '${articleId}'`,
{},
1
);
return data[0] || null;
}Price Concepts
Base Price
Customer Group Prices
Tiered Prices (Quantity Breaks)
Currency
Transforming Prices
Consideration
Options
Pushing to the Platform
Syncing with Product Sync
Last updated
Was this helpful?