pixiReadCustomerAccountMatch
Returns customer account match records (pairs of matched customer account entries), filtered by date, customer or account entry, with keyset paging.
Reads rows from the CustomerAccountMatch table. Each row links two customer account entries (CAref1, CAref2) with the matched amount AbsoluteMatchAmount.
Paging: CustomerAccountMatchKey works as a cursor. Only records with a key greater than the given value are returned (NULL is treated as 0). At most RowCount rows are returned (NULL is treated as 1000), sorted by CustomerAccountMatchKey ascending. For the next page, pass the highest key of the previous page.
Date filters: only one date filter group is applied. The groups are checked in this order:
CreateAndUpdateDateFrom/CreateAndUpdateDateTo: a record matches the lower bound ifCreateDateorUpdateDateis >= the from value, and the upper bound ifCreateDateorUpdateDateis < the to value.CreateDateFrom/CreateDateTo: filters onCreateDate(from inclusive, to exclusive).UpdateDateFrom/UpdateDateTo: filters onUpdateDate(from inclusive, to exclusive).
If a higher-ranking group has at least one value set, the date parameters of the lower groups are ignored. Without any date parameter, only the key and the other filters are applied.
Additional filters (always applied):
CustRef: the customer of the first or the second linked customer account entry must match.CustomerAccountKey:CAref1orCAref2must equal the given value.
Notes
CustomerAccountMatchKeyis not an exact lookup: because NULL values ofCustomerAccountMatchKeyandRowCountare replaced by defaults at the start, the code always uses the range branch (key > value). The branch for an exact key match and the empty-result branch in the code are never reached. To read a single record with keyn, passn - 1andRowCount = 1.- The combined create/update date filter combines its conditions with OR, so the from and to bounds may be satisfied by different date columns; the result can therefore be broader than an exact time window.
- All reads use
NOLOCK, so uncommitted data may be returned. RowCount = 0returns no rows.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
CustomerAccountMatchKey
|
int | NULL |
Paging cursor: only records with a key greater than this value are returned. NULL is treated as 0. Example: |
CreateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) for Example: |
CreateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive) for Example: |
UpdateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive) for Example: |
UpdateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive) for Example: |
CreateAndUpdateDateFrom
|
datetime dateTime |
NULL |
Lower bound (inclusive): a record matches if Example: |
CreateAndUpdateDateTo
|
datetime dateTime |
NULL |
Upper bound (exclusive): a record matches if Example: |
RowCount
|
int | 1000 |
Maximum number of rows returned. NULL is treated as 1000. Example: |
CustRef
|
int | NULL |
Customer reference: returns only matches where one of the two linked customer account entries belongs to this customer. Example: |
CustomerAccountKey
|
int | NULL |
Customer account entry key: returns only matches where Example: |
Result set 1 · Always (may be empty)
Customer account match records, sorted by CustomerAccountMatchKey ascending, limited to RowCount rows.
| Column | Type | Description |
|---|---|---|
CustomerAccountMatchKey
|
int |
Primary key of the match record; use it as paging cursor. |
CAref1
Nullable |
int |
Key of the first matched customer account entry ( |
CAref2
Nullable |
int |
Key of the second matched customer account entry ( |
AbsoluteMatchAmount
Nullable |
decimal |
Matched amount as absolute value. |
CreateEmp
Nullable |
string |
Employee who created the record. |
CreateDate
Nullable |
datetime dateTime |
Creation date of the record. |
UpdateEmp
Nullable |
string |
Employee who last changed the record. |
UpdateDate
Nullable |
datetime dateTime |
Date of the last change. |
Response example
<SqlRowSet1>
<row>
<CustomerAccountMatchKey>1201</CustomerAccountMatchKey>
<CAref1>55812</CAref1>
<CAref2>55890</CAref2>
<AbsoluteMatchAmount>119.0000</AbsoluteMatchAmount>
<CreateEmp>PIXI</CreateEmp>
<CreateDate>2024-01-15T10:22:31</CreateDate>
<UpdateEmp>PIXI</UpdateEmp>
<UpdateDate>2024-01-15T10:22:31</UpdateDate>
</row>
<row>
<CustomerAccountMatchKey>1202</CustomerAccountMatchKey>
<CAref1>55901</CAref1>
<CAref2>55934</CAref2>
<AbsoluteMatchAmount>49.9000</AbsoluteMatchAmount>
<CreateEmp>MM</CreateEmp>
<CreateDate>2024-01-16T08:05:12</CreateDate>
<UpdateEmp>MM</UpdateEmp>
<UpdateDate>2024-01-17T14:40:03</UpdateDate>
</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:pixiReadCustomerAccountMatch>
<!-- <CustomerAccountMatchKey>0</CustomerAccountMatchKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-02-01T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-01-01T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-02-01T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
<!-- <CustRef>10234</CustRef> -->
<!-- <CustomerAccountKey>55812</CustomerAccountKey> -->
</ns1:pixiReadCustomerAccountMatch>
</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:pixiReadCustomerAccountMatch>
<!-- <CustomerAccountMatchKey>0</CustomerAccountMatchKey> -->
<!-- <CreateDateFrom>2024-01-01T00:00:00</CreateDateFrom> -->
<!-- <CreateDateTo>2024-02-01T00:00:00</CreateDateTo> -->
<!-- <UpdateDateFrom>2024-01-01T00:00:00</UpdateDateFrom> -->
<!-- <UpdateDateTo>2024-02-01T00:00:00</UpdateDateTo> -->
<!-- <CreateAndUpdateDateFrom>2024-01-01T00:00:00</CreateAndUpdateDateFrom> -->
<!-- <CreateAndUpdateDateTo>2024-02-01T00:00:00</CreateAndUpdateDateTo> -->
<!-- <RowCount>500</RowCount> -->
<!-- <CustRef>10234</CustRef> -->
<!-- <CustomerAccountKey>55812</CustomerAccountKey> -->
</ns1:pixiReadCustomerAccountMatch>
</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 = [
// 'CustomerAccountMatchKey' => '0',
// 'CreateDateFrom' => '2024-01-01T00:00:00',
// 'CreateDateTo' => '2024-02-01T00:00:00',
// 'UpdateDateFrom' => '2024-01-01T00:00:00',
// 'UpdateDateTo' => '2024-02-01T00:00:00',
// 'CreateAndUpdateDateFrom' => '2024-01-01T00:00:00',
// 'CreateAndUpdateDateTo' => '2024-02-01T00:00:00',
// 'RowCount' => '500',
// 'CustRef' => '10234',
// 'CustomerAccountKey' => '55812',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiReadCustomerAccountMatch', $soapArguments);
- SQL object:
- dbo.pipiReadCustomerAccountMatch