pixiCreatePicklist
Creates a picklist from a picklist profile, either directly or by adding the creation job to the execution queue.
Starts picklist creation using the settings of a stored picklist profile. Some profile values can be overridden by parameters.
- Premium API check. The setting
Premium_APImust be enabled. Otherwise anERRORrow is returned. - Profile. If
ProfileIdis given (0 counts as not given), it must exist inPL_Profile. If it is not given, the most recently updated default profile (PLP_Default = 1) that is not a 1SS profile (PLP_1SS = 0) is used. - Location. An empty
LocationIdbecomes001. - Order restriction (optional).
- Only
OrderNr: the order must exist inOrderHeader. - Only
OrderNrExternal: an order with this external number must exist. - Both: an order matching both values must exist. Afterwards only
OrderNris used andOrderNrExternalis cleared. OrderNr = 0and an emptyOrderNrExternalcount as not given.
- Only
- Bin range (optional).
BinFromandBinTomust be bin names (InvBin.BinName) in the chosen location. TheirBinSortNumreplaces the bin sort range of the profile. - User and comment.
UserNameis trimmed; if it is empty it becomesAPI.Commentis trimmed and stored as the picklist comment. - Profile parameters. All parameters of the profile are loaded. Location, profile ID, order restriction, bin range, user name and comment are then overwritten with the values from steps 2–6.
- Exclusive lock. The call requests the application lock
ExclusivePickListCreationwithout waiting. If another session holds the lock, anERRORrow is returned. - Execution. An execution number is built from the current time in the format
yyMMddHHmmss.ExecuteAsynchronous = 1(default): anEXEC dbo.Pixi_CreatePickList …statement containing all parameters is written toExecQueries. AnINFOrow is returned.ExecuteAsynchronous = 0:Pixi_CreatePickListruns immediately. It reads its parameters from the temporary parameter table.
The lock is released afterwards.
Notes
Synchronous mode (ExecuteAsynchronous = 0)
- No
INFOrow is returned. - The caller receives whatever
Pixi_CreatePickListreturns. That procedure is not attached, so its result sets and further side effects are not documented here. - The lock is session-scoped. If
Pixi_CreatePickListfails with an error, the release may be skipped. The lock then stays held until the database session ends.
Asynchronous mode (default)
- The lock is held only while the queue entry is written. It does not prevent several queued creations from running at the same time.
- The queued statement is built as a text string. Quotes in values such as
CommentorUserNameare not escaped, so an apostrophe can make the queued statement invalid. - The queued statement does not pass the profile values
OlderThanHour,OlderThanMinute,NewerThanHour,NewerThanMinuteandDisablePicklistSplitOnBatchManagement.
Pitfalls
- The location check never fails. If
LocationIddoes not exist, the given value is kept and the location error message is never returned. Commentalways overwrites the profile comment. Omitting it clears the comment from the profile.- An empty string for
BinFromorBinTois not treated as missing. It is looked up as a bin name and leads to an error. - The profile ID error message says "could be found", but it means that the profile was not found.
Other
- All lookups use
NOLOCK.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
ProfileId
|
smallint int |
NULL |
Key of the picklist profile ( Example: |
LocationId
|
varchar(3) string |
NULL |
Location for the picklist. NULL or empty becomes Example: |
OrderNr
|
int | NULL |
Restricts the picklist to this order number. NULL or 0 means no restriction. The order must exist. Example: |
BinFrom
|
varchar(50) string |
NULL |
Name of the first bin of the range in the chosen location. Its Example: |
BinTo
|
varchar(50) string |
NULL |
Name of the last bin of the range in the chosen location. Its Example: |
UserName
|
varchar(50) string |
NULL |
User recorded for the picklist creation. NULL or empty becomes Example: |
Comment
|
varchar(8000) string |
NULL |
Picklist comment (trimmed). Always replaces the profile comment, even when it is empty. Example: |
ExecuteAsynchronous
|
bit boolean |
1 |
Controls whether the picklist is created immediately or queued. Allowed values
Example: |
OrderNrExternal
|
varchar(50) string |
NULL |
Restricts the picklist to the order with this external order number. Empty means no restriction. If Example: |
Result set 1 · On a validation error, if the lock is not available, or after queueing (asynchronous mode).
Status row of the call.
| Column | Type | Description |
|---|---|---|
Status
|
varchar(5) string |
|
Message
Nullable |
varchar(max) string |
Text of the message. |
Result set 2 · Synchronous mode (ExecuteAsynchronous = 0) after all checks have passed.
Result sets produced by Pixi_CreatePickList. That procedure is not attached, so its structure is unknown.
Response example
<SqlRowSet1>
<row>
<Status>INFO</Status>
<Message>Picklist creation added to the queue.</Message>
</row>
</SqlRowSet1>
| Status | Message | Cause |
|---|---|---|
| ERROR | Setting "Premium_API" is not enabled. | The setting `Premium_API` is not enabled. It must be enabled in Pixi before this call can be used. |
| Error | Profile ID "{ProfileId}" could be found. Please provide a profile ID that you want tu use for creating the picklist. | The given `ProfileId` does not exist in `PL_Profile`. Pass an existing profile key. |
| Error | No default Profile ID could be found. Please provide a profile ID that you want tu use for creating the picklist. | No `ProfileId` was passed and no default profile that is not a 1SS profile exists. Pass a `ProfileId` explicitly. |
| Error | Location "{LocationId}" could be found. Please provide a different Location ID that you want tu use for creating the picklist. | Intended for an unknown location. Because of the way the check is written, this message is never returned in practice. |
| Error | Order "{OrderNr}" could not be found. Please provide a different OrderNr that you want tu use for creating the picklist. | Only `OrderNr` was passed and no order with this number exists. |
| Error | OrderNrExternal "{OrderNrExternal}" could not be found. Please provide a different OrderNrExternal that you want tu use for creating the picklist. | Only `OrderNrExternal` was passed and no order with this external number exists. |
| Error | OrderNr "{OrderNr}" and OrderNrExternal "{OrderNrExternal}" could not be found. Please provide a different parameters that you want tu use for creating the picklist. | Both order numbers were passed, but no order matches both values. |
| Error | Bin place "{BinFrom}" for paramter @BinFrom could not be found. Please provide a different BinName that you want tu use for creating the picklist. | No bin with the name `BinFrom` exists in the chosen location. An empty string also triggers this error. |
| Error | Bin place "{BinTo}" for paramter @BinTo could not be found. Please provide a different BinName that you want tu use for creating the picklist. | No bin with the name `BinTo` exists in the chosen location. An empty string also triggers this error. |
| ERROR | Another instance of picklist creation already running. Try again later. | Another session holds the application lock `ExclusivePickListCreation`. Retry later. |
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:pixiCreatePicklist>
<!-- <ProfileId>3</ProfileId> -->
<!-- <LocationId>001</LocationId> -->
<!-- <OrderNr>1045873</OrderNr> -->
<!-- <BinFrom>A-01-01</BinFrom> -->
<!-- <BinTo>A-10-05</BinTo> -->
<!-- <UserName>shopsync</UserName> -->
<!-- <Comment>Express wave 14:00</Comment> -->
<!-- <ExecuteAsynchronous>1</ExecuteAsynchronous> -->
<!-- <OrderNrExternal>SHOP-100234</OrderNrExternal> -->
</ns1:pixiCreatePicklist>
</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:pixiCreatePicklist>
<!-- <ProfileId>3</ProfileId> -->
<!-- <LocationId>001</LocationId> -->
<!-- <OrderNr>1045873</OrderNr> -->
<!-- <BinFrom>A-01-01</BinFrom> -->
<!-- <BinTo>A-10-05</BinTo> -->
<!-- <UserName>shopsync</UserName> -->
<!-- <Comment>Express wave 14:00</Comment> -->
<!-- <ExecuteAsynchronous>1</ExecuteAsynchronous> -->
<!-- <OrderNrExternal>SHOP-100234</OrderNrExternal> -->
</ns1:pixiCreatePicklist>
</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 = [
// 'ProfileId' => '3',
// 'LocationId' => '001',
// 'OrderNr' => '1045873',
// 'BinFrom' => 'A-01-01',
// 'BinTo' => 'A-10-05',
// 'UserName' => 'shopsync',
// 'Comment' => 'Express wave 14:00',
// 'ExecuteAsynchronous' => '1',
// 'OrderNrExternal' => 'SHOP-100234',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiCreatePicklist', $soapArguments);
- SQL object:
- dbo.pipiCreatePicklist