The interface is defined to manage a Customer table in the database. It includes the following methods:
Name | COM Type | DB Type | Description |
---|---|---|---|
| BSTR | A14 | Uniquely identifies a customer. |
| Int | Integer | |
| SHORT | Smallint | |
| SHORT | Smallint | |
| BSTR | A40 | |
| BSTR | A40 | |
| BSTR | A40 | |
| BSTR | A1 | |
| BSTR | A40 | |
| BSTR | A40 | |
| BSTR | A30 | |
| BSTR | A2 | |
| BSTR | A15 | |
| BSTR | A40 | |
| BSTR | A20 | |
| BSTR | A20 | |
| SHORT | Smallint | |
| SHORT | SHORT | |
| VARIANT | Numeric(5,2) | |
| DT | Timestamp | |
| DT | Timestamp | |
| VARIANT | Numeric(20,4) | |
| SHORT | Smallint | |
| VARIANT | Numeric(20,4) | |
| SHORT | Smallint | |
| VARIANT | Numeric(20,4) | |
| SHORT | Smallint | |
| VARIANT | Numeric(20,4) | |
| DT | Timestamp | |
| VARIANT | Numeric(20,4) | |
| SHORT | Smallint | |
| DT | Timestamp | |
| DT | Timestamp | |
| BSTR | A20 | |
| BSTR | A20 | |
| SHORT | Smallint | |
| Int | Integer | |
| Int | Integer | |
| Int | Integer | |
| DT | Timestamp |
HRESULT Initialize (BSTR bstrXmlCustInit, BSTR *bstrXmlCustInitResult)
This method is used to initialize a connection to the Xpress Server so that datagram requests can be sent to the Xpress Server to interact with the customer database. After the method is called the return value has to be checked. If it is S_OK, the method successfully executed. If there is an error the resulting error code will be returned. Refer to the problemDescription
tag for information about the error in the resulting XML string (if provided)
| String containing XML document, request. |
| String containing XML document of request status. |
| If connection to Xpress Server is successfully established. |
| If connection is not established with Xpress Server. |
| If connection to Xpress Server is already established. |
| If other error occurs during Initialization. |
Syntax
<?xml version= "1.0" ?>
<CUSTOMER_INIT_REQUEST>
<serverName></serverName>
<storeNumber></storeNumber>
<registerNumber></registerNumber>
<timeOut></timeOut>
</CUSTOMER_INIT_REQUEST>
Syntax
<CUSTOMER_INIT_RESPONSE>
<problemDescription></problemDescription>
</CUSTOMER_INIT_RESPONSE>
HRESULT Inquiry (BSTR bstrXmlCustInq, BSTR *bstrXmlCustInqResult)
This method is used to retrieve a record from the Customer view table. These mandatory parameters are defined when calling the method. One of the following parameters must be defined to retrieve the customer information (they are defined in the schema):
customerNumber
customerReferenceNumber
One of firstName
, lastName
, phoneNumber1
, or phoneNumber2
After the method is called, the return value has to be checked. If it is S_OK
, the return string contains the data for the found record. If more than one record is found in the query, all of them can be parsed into the response string; it is up to the client how to use the data properly. For firstName
, lastName
, phoneNumber1
and phoneNumber2
, the wild character '*' is used as part of the search criteria. For example, phoneNumber1
can be defined as '502*', this returns all records with the phone number as 502**** If there is an error the resulting error code will be returned. Refer to the problemDescription
tag for information about the error in the resulting XML string (if provided).
| String containing the XML document request. |
| String containing the XML document of the request status. |
| If inquiry request was successful. |
| If inquiry manager code (10004) not defined. |
| If employee invoking inquiry request was not found in the database. |
| If employee invoking inquiry request has insufficient authority. |
| If communication error occurs during inquiry request. |
| If customer was not found in the database. |
| If other error occurs during Initialization. |
Syntax
<?xml version= "1.0" ?>
<CUSTOMER_INQUIRY_REQUEST>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
<customerNumber></customerNumber>
<customerReferenceNumber></customerReferenceNumber>
<firstName></firstName>
<lastName></lastName>
<phoneNumber1></phoneNumber1>
</CUSTOMER_INQUIRY_REQUEST>
Syntax
<CUSTOMER_INQUIRY_RESPONSE>
<Customer_Inquiry_Result_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
<problemDescription></problemDescription>
</Customer_Inquiry_Result_Header >
<Customer_Inquiry_Request_Detail>
<customerNumber></customerNumber>
<firstName></firstName>
<lastName></lastName>
<phoneNumber1></phoneNumber1>
</Customer_Inquiry_Request_Detail>
</ CUSTOMER_INQUIRY_RESPONSE >
HRESULT Update(BSTR bstrXmlCustUpdate, BSTR * bstrXmlCustUpdateResult)
This method is used to update a Customer. Clients can use the Inquiry method to retrieve the record first, change certain fields, and then call this method. The fields passed to the stored procedure must be checked to make sure that the value passed to the stored procedure is in the right data type format. After the method is called the return value must be checked. If it is S_OK
, the method successfully executed. If there is an error the resulting error code will be returned and the record will not be updated. Refer to the problemDescription
tag for information about the error in the resulting XML string (if provided).
| String containing XML document, request. |
| String containing XML document of request status. |
| If the update request was successful. |
| If the update manager code (10005) is not defined. |
| If the employee invoking the update request was not found in the database. |
| If the employee invoking the update request has insufficient authority. |
| If a communication error occurs during the update request. |
| If the customer was not found in the database. |
| If other error occurs during Initialization. |
The following customer fields are available to be set in the update request::
1 |
| Mandatory (M) (required for update) |
2 |
| M |
3 |
| M |
4 |
| M |
5 |
| M |
6 |
| M |
7 |
| M |
8 |
| M |
9 |
| NULL if not setup |
10 |
| NULL if not setup |
11 |
| NULL if not setup |
12 |
| NULL if not setup |
13 |
| NULL if not setup |
14 |
| NULL if not setup |
15 |
| NULL if not setup |
16 |
| NULL if not setup |
17 |
| NULL if not setup |
18 |
| 1 if not setup |
19 |
| NULL if not setup |
20 |
| NULL if not setup |
21 |
| 0 if not setup |
22 |
| 0.0 if not setup |
23 |
| 0 if not setup |
24 |
| NULL if not setup |
25 |
| NULL if not setup |
26 |
| NULL if not setup |
27 |
| NULL if not setup |
28 |
| 0 if not setup |
29 |
| NULL if not setup |
30 |
| NULL if not setup |
31 |
| NULL if not setup |
32 |
| NULL if not setup |
33 |
| NULL if not setup |
34 |
| NULL if not setup |
35 |
| NULL if not setup |
36 |
| NULL if not setup |
37 |
| NULL if not setup |
38 |
| NULL if not setup |
39 |
| NULL if not setup |
Syntax
<?xml version= "1.0" ?>
<CUSTOMER_UPDATE_REQUEST>
<Customer_Update_Request_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
</Customer_Update_Request_Header>
<Customer_Update_Request_Detail>
<customerNumber></customerNumber>
<firstName></firstName>
<lastName></lastName>
<phoneNumber1></phoneNumber1>
</Customer_Update_Request_Detail>
</CUSTOMER_UPDATE_REQUEST>
Syntax
<CUSTOMER_UPDATE_RESPONSE>
<Customer_Update_Response_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
<problemDescription></problemDescription>
</Customer_Update_Response_Header>
<Customer_Update_Response_Detail>
<customerNumber></customerNumber>
<problemDescription></problemDescription>
</Customer_Update_Response_Detail>
</CUSTOMER_UPDATE_RESPONSE>
HRESULT Delete(BSTR bstrXmlCustDelete, BSTR *bstrXmlCustDeleteResult)
This method is used to delete a customer from the database. After the method is called the return value must be checked. If it is S_OK
, the method successfully executed. If a specific customer is not specified all customers will be deleted. If there is an error the resulting error code will be returned. Refer to the problemDescription
tag for information about the error in the resulting XML string (if provided).
| String containing the XML document of the request. |
| String containing the XML document of the request status. |
| If delete request was successful. |
| If delete manager code (10006) is not defined. |
| If employee invoking delete request was not found in database. |
| If employee invoking delete request has insufficient authority. |
| If a communication error occurs during a delete request. |
| If customer was not found in the database. |
| If other error occurs during Initialization. |
Syntax
<?xml version= "1.0" ?>
<CUSTOMER_DELETE_REQUEST>
<Customer_ Delete _Request_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
</Customer_ Delete_Request_Header>
<Customer_ Delete_Request_Detail>
<customerNumber></customerNumber>
</Customer_ Delete_Request_Detail>
</CUSTOMER_DELETE_REQUEST>
Syntax
<CUSTOMER_DELETE_RESPONSE>
<Customer_Delete_Response_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
<problemDescription></problemDescription>
</Customer_Delete_Response_Header>
<Customer_Delete_Response_Detail>
<customerNumber></customerNumber>
<problemDescription></problemDescription>
</Customer_Delete_Response_Detail>
</CUSTOMER_DELETE_RESPONSE>
Syntax
<?xml version= "1.0" ?>
<CUSTOMER_DELETE_REQUEST>
<Customer_ Delete_Request_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
</Customer_ Delete_Request_Header>
</CUSTOMER_DELETE_REQUEST>
Syntax
<CUSTOMER_DELETE_RESPONSE>
<Customer_Delete_Response_Header>
<inquiryEmployeeNumber></inquiryEmployeeNumber>
<inquiryEmployeeStoreNumber></inquiryEmployeeStoreNumber>
<problemDescription></problemDescription>
</Customer_Delete_Response_Header>
</CUSTOMER_DELETE_RESPONSE>