pixiCustomerInfoSet
Updates the invoice due days and reminder (dunning) settings of one customer identified by CustKey or by external customer number/email plus shop.
Changes the payment and reminder settings of exactly one customer record in Customers.
Identifying the customer
- Pass
CustKey, or passShopIdtogether withCustomerNrExternaland/orCustomerEmail. CustomerNrExternal,CustomerEmailandReminderActionare trimmed; empty strings count as not provided.- The lookup matches customers where (
CustomerNrExternalmatches orCeMailmatchesCustomerEmail) andCustomerOf=ShopId, or whereCustKeymatches. - If no customer matches, or more than one customer matches, the call fails.
Validation
ReminderActionmust be one ofNONE,PRINT,MAIL,PRINT&MAILor0.InvoiceDueDays,DaysForFirstReminder,DaysForNextReminder,ReminderDueDaysandReminderCostmust not be negative.
How values are applied
- A parameter that is omitted (NULL) keeps the value currently stored for the customer.
- A value of
0(or'0'forReminderAction) clears the setting, i.e. it is stored as NULL (option disabled). - Any other value overwrites the stored value.
The update also sets UpdateDate to the current date/time and UpdateEmp to API-CustomerInfoSet.
The call always returns one status row with Status (OK or ERROR) and StatusMessage.
Notes
- All validation errors are raised inside a
TRYblock and caught; they are returned as a status row withStatus=ERROR, not as aSqlMessage. Only the first failing check is reported. - The procedure's return value is
0on success and1on error; SOAP clients should evaluate theStatuscolumn. - The candidate lookup reads
CustomerswithNOLOCK. There is no explicit transaction around lookup and update. - Pitfall: the search conditions are combined with
OR. IfCustKeyis passed together withShopIdandCustomerNrExternal/CustomerEmail, or if bothCustomerNrExternalandCustomerEmailare passed and point to different customers, several records can match and the call fails with "More than one customer found". Pass only one identifier for a reliable result. ShopIdis not trimmed, unlike the other identifiers.NONEand0differ forReminderAction:NONEstores the valueNONE,0stores NULL. Whether the value check is case-sensitive depends on the database collation.- A
ReminderCostof0is stored as NULL, so a cost of exactly zero cannot be saved explicitly.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
CustKey
|
int | NULL |
Internal Pixi customer key. Identifies the customer on its own; alternatively use Example: |
CustomerNrExternal
|
varchar(60) string |
NULL |
External (shop) customer number, matched against Example: |
CustomerEmail
|
varchar(256) string |
NULL |
Customer email address, matched against Example: |
ShopId
|
varchar(3) string |
NULL |
Shop the customer belongs to ( Example: |
InvoiceDueDays
|
smallint int |
NULL |
Payment term of invoices in days. NULL keeps the current value, 0 clears it, negative values are rejected. Example: |
ReminderAction
|
varchar(20) string |
NULL |
How reminders are sent to the customer. NULL or empty keeps the current value. Allowed values
Example: |
DaysForFirstReminder
|
smallint int |
NULL |
Days that must pass before the first reminder. NULL keeps the current value, 0 clears it, negative values are rejected. Example: |
DaysForNextReminder
|
smallint int |
NULL |
Days until the next reminder. NULL keeps the current value, 0 clears it, negative values are rejected. Example: |
ReminderDueDays
|
smallint int |
NULL |
Payment term printed on reminders, in days. NULL keeps the current value, 0 clears it, negative values are rejected. Example: |
ReminderCost
|
money decimal |
NULL |
Fee charged per reminder. NULL keeps the current value, 0 clears it (stored as NULL), negative values are rejected. Example: |
Result set 1 · Always
Status row reporting success or the error that occurred.
| Column | Type | Description |
|---|---|---|
Status
|
varchar(50) string |
|
StatusMessage
|
varchar(2000) string |
|
Response example
<SqlRowSet1>
<row>
<Status>OK</Status>
<StatusMessage>Record successfully updated</StatusMessage>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| ERROR | To identify a customer record, parameter "CustKey" or one of parameters "CustomerNrExternal"/"CustomerEmail with "ShopId" parameter needs to be provided | Neither `CustKey` nor `ShopId` was passed, or `ShopId` was passed without `CustKey`, `CustomerNrExternal` or `CustomerEmail`. Provide `CustKey` or `ShopId` with an external number/email. |
| ERROR | Allowed reminder actions are: "NONE", "PRINT", "MAIL", "PRINT&MAIL", 0 | `ReminderAction` contains a value outside the allowed list. Use one of the listed values. |
| ERROR | Only positive values are allowed for InvoiceDueDays, DaysForFirstReminder, DaysForNextReminder, ReminderDueDays and ReminderCost. | One of the numeric settings is negative. Send values of 0 or greater. |
| ERROR | No customer found with provided parameters | No customer matches `CustKey` or the combination of `ShopId` and `CustomerNrExternal`/`CustomerEmail`. Check the identifiers. |
| ERROR | More than one customer found with given parameters | The identifiers match several customers, e.g. duplicate email addresses within the shop or conflicting identifiers combined with OR. Use `CustKey` or a unique external number. |
| ERROR | Unexpected error when executing the call | Fallback text when an error occurs without an error message. |
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:pixiCustomerInfoSet>
<!-- <CustKey>10452</CustKey> -->
<!-- <CustomerNrExternal>K-2023-00871</CustomerNrExternal> -->
<!-- <CustomerEmail>max.mustermann@example.com</CustomerEmail> -->
<!-- <ShopId>SH1</ShopId> -->
<!-- <InvoiceDueDays>14</InvoiceDueDays> -->
<!-- <ReminderAction>MAIL</ReminderAction> -->
<!-- <DaysForFirstReminder>7</DaysForFirstReminder> -->
<!-- <DaysForNextReminder>10</DaysForNextReminder> -->
<!-- <ReminderDueDays>7</ReminderDueDays> -->
<!-- <ReminderCost>5.00</ReminderCost> -->
</ns1:pixiCustomerInfoSet>
</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:pixiCustomerInfoSet>
<!-- <CustKey>10452</CustKey> -->
<!-- <CustomerNrExternal>K-2023-00871</CustomerNrExternal> -->
<!-- <CustomerEmail>max.mustermann@example.com</CustomerEmail> -->
<!-- <ShopId>SH1</ShopId> -->
<!-- <InvoiceDueDays>14</InvoiceDueDays> -->
<!-- <ReminderAction>MAIL</ReminderAction> -->
<!-- <DaysForFirstReminder>7</DaysForFirstReminder> -->
<!-- <DaysForNextReminder>10</DaysForNextReminder> -->
<!-- <ReminderDueDays>7</ReminderDueDays> -->
<!-- <ReminderCost>5.00</ReminderCost> -->
</ns1:pixiCustomerInfoSet>
</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 = [
// 'CustKey' => '10452',
// 'CustomerNrExternal' => 'K-2023-00871',
// 'CustomerEmail' => 'max.mustermann@example.com',
// 'ShopId' => 'SH1',
// 'InvoiceDueDays' => '14',
// 'ReminderAction' => 'MAIL',
// 'DaysForFirstReminder' => '7',
// 'DaysForNextReminder' => '10',
// 'ReminderDueDays' => '7',
// 'ReminderCost' => '5.00',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiCustomerInfoSet', $soapArguments);
- SQL object:
- dbo.pipiCustomerInfoSet