Updating ERP Data

Updated on
 

Data Types

The data type of every field, whose metadata can be retrieved with the help of the GetFieldInfosCommon function, is noted in each instance in the "type" attribute. In this regard, this involves the standard names of the standard types of the Microsoft SQL server. This information can be used by self-developed clients for the purposes of precise validation of the data prior to import.
 
Internal Data Type Value range/format
bit 0 or 1
tinyint 0 to 255
smallint
-32,768 to 32,767
(-2^15 to 2^15-1)
int
-2,147,483,648 to 2,147,483,647
(-2^31 to 2^31-1)
bigint
-9223372036854775808 to 9223372036854775807
(-2^63 to 2^63-1)
smallmoney -214,748.3648 to 214,748.3647
money -922,337,203,685,477.5808 to 922,337,203,685,477.5807
decimal -10^38 + 1 to 10^38 - 1
float -1.79E + 308 to 1.79E + 308
real -3.40E + 38 to 3.40E + 38
datetime 1 January 1753 up to 31 December 9999
smalldatetime
1 January 1900 up to 6 June 2079
Accuracy: 1 minute
char, varchar, text String
nchar, nvarchar, ntext Unicode string
uniqueidentifier
Format: xxxxxxxx–xxxx–xxxx–xxxx–xxxxxxxxxxxx
Characters: 0 – 9, A – F

 

Validity Criteria

During an Insert or Update, zanox ERP Web Services carries out a plausibility and format check for each dataset. Should a problem occur during an Insert, it will be rejected and a corresponding entry is added to the error log (refer to the following section). In this respect, a dataset must meet the following criteria:
  • The data of all transmitted errors must correspond with both the expected XML data type and the possibly still-restricted internal data type (refer to the previous section ):

XML Data Type Value range/format
boolean 0 or 1
unsignedbyte 0 to 255
short 0 – 65535
int 0 – 2147483647
decimal 0 – 922337203685477.58
normalizedstring
Any characters
Exceptions:
  • Carriage return
  • Line feed
  • Tabulator
string Any characters
GUID
Format: xxxxxxxx–xxxx–xxxx–xxxx–xxxxxxxxxxxx
Characters: 0 – 9, A – F
Characters 0 – 9, A – F
datetime
Format: YYYY-MM-DDThh:mm:ss
(Y = year, M = month, D = day, h = hour, m = minute, s = second)
 
  • The maximum string length may not be exceeded.
  • All required fields (marked with x) must be present.
  • There should not be multiple occurrences of the unique ID of a dataset within one import process.
> Dataset ID for Updates: PPS ID, PPL ID or basket ID
> Dataset ID for Inserts: Order ID
 
  • Percentage values for commission data must be between 0 and 100.
  • Currency amounts may not be negative.
  • Currency abbreviations (elements <currency>) must be three characters long and may only assume certain values. The list of currently-valid
  • currency abbreviations can be retrieved using the GetSupportedCurrencyCollection method of the "commonservice.asmx" service.
  • The program ID at dataset level in the element <program> must correspond with the program ID of the function parameter.
  • The review status must be either 0 (open), 1 (approved) or 2 (rejected).
  • Based on the current date, the expiration date must lie in the future.

Error Log

If problems occur during an Insert or Update of ERP datasets as a result of incorrect or incomplete data, an error number and an error message will be noted in the error log for each rejected dataset.
 
This log can be retrieved for a specific import process with the help of the GetImportLog function. The log will be delivered in simple XML format.

Example

<log>
    <entries>
        <error recordnr="1" recordid="5521" code="120001">
            Program id must be ‚{0}‘.
        </error>
        <message recordnr="5" recordid="22121" code="120002">
            Review state specified must be between ‚{0}‘ and ‚{1}‘.
        </message>
    </entries>
</log>
 
Element <log>
Object Data Type Description
<log>   Contains n elements <entries> as children
<entries>  
Contains n elements <error> and <message>
in any order as children
<error> string Error message
recordnr int
Consecutive number of the dataset in the data
package, beginning with 1
recordid normalizedstring Unique dataset ID
code int Error number
<message> string Error message
recordnr int
Consecutive number of the dataset in the data
package, beginning with 1
recordid normalizedstring Unique dataset ID
code int Message number