pixiShopConnectionSetStockNonReported
Resets the shop stock export marker in InvBinItemLog so that all stock changes since a given date are reported to the shop again.
Controls which stock changes in the stock change log InvBinItemLog count as not yet reported to the shop.
- If
Sinceis not passed, the current date and time (GETDATE()) is used. Every entry is then marked as reported. - All entries with
UpdateDatebeforeSincethat are not yet reported (ReportedDate IS NULL) are marked as reported.ReportedDateis set to theirUpdateDate. - All entries with
UpdateDateon or afterSinceare marked as not reported.ReportedDateis set toNULL, even if they were reported before. - The call returns the number of log entries that are now not reported. This is the number of stock changes that are still to be exported to the shop.
Only normal items are handled. A code comment says that bundles are not supported yet.
Notes
- Without
Since, the call marks the complete log as reported. Afterwards no pending stock change is left for the shop export. - The two
UPDATEstatements do not run in an explicit transaction. - The final count is read with
NOLOCKand can therefore include uncommitted changes. - The count refers to log entries, not to distinct items or bins.
- On large logs the updates can touch many rows and may take some time.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
Since
|
datetime dateTime |
NULL |
Point in time from which stock changes are reported to the shop again. Changes before this time are marked as reported. If omitted or Example: |
Result set 1 · Always
Number of stock log entries that are not yet reported to the shop after the update.
| Column | Type | Description |
|---|---|---|
cnt
|
int |
Number of entries in |
Response example
<SqlRowSet1>
<row>
<cnt>1532</cnt>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiShopConnectionSetStockNonReported>
<!-- <Since>2024-05-01T00:00:00</Since> -->
</ns1:pixiShopConnectionSetStockNonReported>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiShopConnectionSetStockNonReported>
<!-- <Since>2024-05-01T00:00:00</Since> -->
</ns1:pixiShopConnectionSetStockNonReported>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'Since' => '2024-05-01T00:00:00',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiShopConnectionSetStockNonReported', $soapArguments);
- SQL object:
- dbo.pipiShopConnectionSetStockNonReported