pixiCustomerSearch
Searches customers by external customer number, e-mail, name, address, city, ZIP, country, shop, order or invoice number.
Wrapper around the internal procedure Pixi_CustomerSearch. The call first normalizes the search parameters and then passes them on. The internal procedure produces the result.
Normalization:
- Empty strings and
NULLare replaced by the wildcard%. ForNameandAddressthe replacement is%%. CustNrExternal: if a value other than%is given, a trailing%is appended. This makes it a prefix search, for exampleK100becomesK100%.OrderNr:0(andNULL) is treated as no filter (NULL).
Parameter mapping to Pixi_CustomerSearch:
CustNrExternalis passed as@CustID, and@CustomerNrExternalis passed asNULL.RowCount,eMail,Name,Address,City,Zip,Country,ShopID,OrderNr,OrderNrExternalandInvoiceNrare passed through after normalization.- The other filters of the internal procedure are fixed to
NULL:CardNr,BoxNr,ItemName,ItemEAN,StatusandShipCode.SerialNris fixed to%.
RowCount (default 1500) is passed to the internal procedure and most likely limits the number of returned rows.
Notes
- The definition of
Pixi_CustomerSearchis not attached. The columns of the result, the exact matching logic and the sort order cannot be derived from this code. The%defaults suggestLIKEpattern matching, but this is not confirmed. - Because the code compares
OrderNrwith an empty string, the value0is treated asNULL(no filter). - The header comment ("Template for getting items…") was copied from a template and does not describe this call.
- The call itself writes no data. Whether the internal procedure has side effects is unknown.
| Parameter | Type | Default | Description |
|---|---|---|---|
RowCount
|
integer int |
1500 |
Maximum number of rows. Passed to Example: |
CustNrExternal
|
varchar(255) string |
% |
External customer number. A trailing Example: |
eMail
|
varchar(255) string |
% |
E-mail filter (wildcard pattern). An empty value means no filter. Example: |
Name
|
varchar(255) string |
%% |
Customer name filter (wildcard pattern). An empty value is replaced by Example: |
Address
|
varchar(255) string |
%% |
Address/street filter (wildcard pattern). An empty value is replaced by Example: |
City
|
varchar(255) string |
% |
City filter (wildcard pattern). Example: |
Zip
|
varchar(255) string |
% |
ZIP code filter (wildcard pattern). Example: |
Country
|
varchar(255) string |
% |
Country filter (wildcard pattern). Example: |
ShopID
|
varchar(3) string |
– |
Shop ID. Passed unchanged; the default is an empty string. Example: |
OrderNr
|
integer int |
NULL |
Pixi order number. Example: |
OrderNrExternal
|
varchar(255) string |
% |
External (shop) order number filter (wildcard pattern). Example: |
InvoiceNr
|
varchar(255) string |
% |
Invoice number filter (wildcard pattern). Example: |
Result set 1 · Determined by the internal procedure Pixi_CustomerSearch (definition not attached).
Customer search result produced by Pixi_CustomerSearch. Its columns cannot be derived from the available code.
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:pixiCustomerSearch>
<!-- <RowCount>100</RowCount> -->
<!-- <CustNrExternal>K10023</CustNrExternal> -->
<!-- <eMail>%@example.com</eMail> -->
<!-- <Name>%Müller%</Name> -->
<!-- <Address>%Hauptstraße%</Address> -->
<!-- <City>München</City> -->
<!-- <Zip>80%</Zip> -->
<!-- <Country>DE</Country> -->
<!-- <ShopID>ABC</ShopID> -->
<!-- <OrderNr>123456</OrderNr> -->
<!-- <OrderNrExternal>SHOP-2024-0815</OrderNrExternal> -->
<!-- <InvoiceNr>RE2024001234</InvoiceNr> -->
</ns1:pixiCustomerSearch>
</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:pixiCustomerSearch>
<!-- <RowCount>100</RowCount> -->
<!-- <CustNrExternal>K10023</CustNrExternal> -->
<!-- <eMail>%@example.com</eMail> -->
<!-- <Name>%Müller%</Name> -->
<!-- <Address>%Hauptstraße%</Address> -->
<!-- <City>München</City> -->
<!-- <Zip>80%</Zip> -->
<!-- <Country>DE</Country> -->
<!-- <ShopID>ABC</ShopID> -->
<!-- <OrderNr>123456</OrderNr> -->
<!-- <OrderNrExternal>SHOP-2024-0815</OrderNrExternal> -->
<!-- <InvoiceNr>RE2024001234</InvoiceNr> -->
</ns1:pixiCustomerSearch>
</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 = [
// 'RowCount' => '100',
// 'CustNrExternal' => 'K10023',
// 'eMail' => '%@example.com',
// 'Name' => '%Müller%',
// 'Address' => '%Hauptstraße%',
// 'City' => 'München',
// 'Zip' => '80%',
// 'Country' => 'DE',
// 'ShopID' => 'ABC',
// 'OrderNr' => '123456',
// 'OrderNrExternal' => 'SHOP-2024-0815',
// 'InvoiceNr' => 'RE2024001234',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiCustomerSearch', $soapArguments);
- SQL object:
- dbo.pipiCustomerSearch