pixiAddCustomerComment
Sets the comment field `CHisNote` of a customer identified by its external customer number and returns 1 on success or 0 if no customer was found.
Writes a comment into the CHisNote column of a customer record.
- The call checks whether a customer exists in
CustomerswithCustomerNrExternal=CustomerNrExternal. - If
ShopIDis passed, only customers withCustomerOf=ShopIDare considered. IfShopIDis omitted (NULL), the shop is not checked. - If no matching customer exists, the call returns one row with
ReturnMessage=0. Nothing is changed. - Otherwise
CHisNoteof all matching customers is set toCommentand the call returns one row withReturnMessage=1.
Notes
- Despite the call name and the header comment ("create a manual booking event"), the code does not add a new entry. It overwrites the existing content of
CHisNote. A previous comment is lost unless the caller includes it inComment. - If
ShopIDis omitted and the same external customer number exists in several shops, the comment is written to all of these customers. - The existence check reads with
NOLOCK. The check and the update do not run in an explicit transaction. - If the customer exists but
Commentis omitted,CHisNoteis set toNULL, becauseCommenthas no default value.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
CustomerNrExternal
Required
|
varchar(250) string |
– |
External customer number ( Example: |
Comment
Required
|
ntext string |
– |
Comment text. It replaces the current content of Example: |
ShopID
|
varchar(3) string |
NULL |
Optional shop ID ( Example: |
Result set 1 · Always (exactly one row)
Result indicator of the call.
| Column | Type | Description |
|---|---|---|
ReturnMessage
|
int |
|
Response example
<SqlRowSet1>
<row>
<ReturnMessage>1</ReturnMessage>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| ReturnMessage = 0 | 0 | No customer with the given `CustomerNrExternal` exists, or none belongs to the given `ShopID`. Check the external customer number and the shop ID, or omit `ShopID`. |
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:pixiAddCustomerComment>
<CustomerNrExternal>K-100234</CustomerNrExternal>
<Comment>Customer requested delivery only after 2 pm.</Comment>
<!-- <ShopID>SHP</ShopID> -->
</ns1:pixiAddCustomerComment>
</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:pixiAddCustomerComment>
<CustomerNrExternal>K-100234</CustomerNrExternal>
<Comment>Customer requested delivery only after 2 pm.</Comment>
<!-- <ShopID>SHP</ShopID> -->
</ns1:pixiAddCustomerComment>
</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 = [
'CustomerNrExternal' => 'K-100234',
'Comment' => 'Customer requested delivery only after 2 pm.',
// 'ShopID' => 'SHP',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiAddCustomerComment', $soapArguments);
- SQL object:
- dbo.pipiAddCustomerComment