Show TOC

Background documentationInterface ITrvCustomer

 

The methods for the ITrvCustomer interface all use an XML-based format for input and output. To provide further detail, there are input and output samples for each method.

Method name: Inquiry
  • Short Description

    Retrieve customer information.

  • Functionality

    SAP POS processes the inquiry, retrieves the data, and outputs the customer information matching the inquiry. See sample XML input and output formats in the Syntax areas below.

    Within the inquiry, you must have entries in the following fields: CustomerNumber, CustomerReferenceNumber, lastName, and firstName. However, SAP POS can perform the search if only one of the following fields is specified: CustomerNumber, CustomerReferenceNumber, and lastName

  • Preconditions

    You must register TrvCustomerAPI.dll.

  • Result

    HRESULT

Syntax Syntax

The file bstrXmlCustInq is a sample XML-based customer inquiry. During processing, SAP POS uses inquiryEmployeeNumber to check authorization.

  1. <CUSTOMER_INQUIRY_REQUEST>
    	<inquiryEmployeeNumber>5555</inquiryEmployeeNumber>
    	<inquiryEmployeeStoreNumber>1</inquiryEmployeeStoreNumber>
    	<customerNumber>10987654321</customerNumber>
    	<customerReferenceNumber></customerReferenceNumber>
    	<firstName></firstName>
    	<lastName></lastName>
    </CUSTOMER_INQUIRY_REQUEST>
    
End of the code.

Syntax Syntax

The file btrXmlCustInqResult is a sample of the XML-based output generated for the customer inquiry.

  1. <CUSTOMER_INQUIRY_RESPONSE>
    	<Customer_Inquiry_Result_Detail/>
    	<address1>1500 Main Street</address1>
    	<address2/>
    	<autoDiscountID>0</autoDiscountID>
    	<birthDate>Wed </birthDate>
    	<chargeLimit>Wed </chargeLimit>
    	<city/>
    	<country/>
    	<customerNumber>10987654321</customerNumber>
    	<customerReferenceNumber>0</customerReferenceNumber>
    	<discountPercent>0</discountPercent>
    	<firstName/>
    	<firstPurchaseDate>12-31-1969 06:00:00 PM</firstPurchaseDate>
    	<gender>0</gender>
    	<lastName/>
    	<lastPaymentAmount/>
    	<lastPaymentDate>12-31-1969 06:00:00 PM</lastPaymentDate>
    	<lastPointsRedeemed>0</lastPointsRedeemed>
    	<lastPurchaseAmount>0</lastPurchaseAmount>
    	<lastPurchaseDate>12-31-1969 06:00:00 PM</lastPurchaseDate>
    	<lastRedeemedDate>12-31-1969 06:00:00 PM</lastRedeemedDate>
    	<middleName/>
    	<modificationTime>12-31-1969 06:00:00 PM</modificationTime>
    	<periodNumberVisits>0</periodNumberVisits>
    	<periodSales>0</periodSales>
    	<phoneNumber1/>
    	<phoneNumber2/>
    	<points>0</points>
    	<pointsRedeemed>0</pointsRedeemed>
    	<previousPeriodNumberVisits>0</previousPeriodNumberVisits>
    	<previousPeriodSales>0</previousPeriodSales>
    	<priceLevel>0</priceLevel>
    	<referenceNumber2/>
    	<referenceNumber3/>
    	<registerNumber>0</registerNumber>
    	<stateProviceCode/>
    	<status>0</status>
    	<titleID>0</titleID>
    	<type>0</type>
    	<zipCode/>
    </CUSTOMER_INQUIRY_RESPONSE>
    
End of the code.

Parameter Name

Parameter Type

Data Type

bstrXmlCustInq

IN

BSTR

bstrXmlCustInqResult

OUT

BSTR*

Method name: Update
  • Short Description

    Update customer information.

  • Functionality

    SAP POS authorizes the inquiry, updates the customer data, and outputs the results of the update processing. See sample input and output formats in the Syntax areas below.

  • Preconditions

    You must register TrvCustomerAPI.dll.

  • Result

    HRESULT

Syntax Syntax

The file bstrXmlCustUpdate is a sample XML-based customer update request. During processing, SAP POS uses inquiryEmployeeNumber to check authorization.

  1. <CUSTOMER_UPDATE_REQUEST>
    	<Customer_Update_Request_Header>
    		<inquiryEmployeeNumber>1111</inquiryEmployeeNumber>
    		<inquiryEmployeeStoreNumber>1</inquiryEmployeeStoreNumber>
    	</Customer_Update_Request_Header>
    	<Employee_Update_Request_Detail>
    		<customerNumber>10987654321</customerNumber>
    		<address1></address1>
    		<authorizationLevel></authorizationLevel>
    		<cashierNumber></cashierNumber>
    		<city></city>
    		<clockedIn></clockedIn>
    		<clockInDateTime></clockInDateTime>
    		<clockInReason></clockInReason>
    		<commissionRate></commissionRate>
    		<employeeDiscount></employeeDiscount>
    		<employeeProfileID></employeeProfileID>
    		<firstName>John</firstName>
    		<forcePreset></forcePreset>
    		<hourlyPayRate></hourlyPayRate>
    		<lastName>Smith</lastName>
    		<password></password>
    		<phoneNumber1></phoneNumber1>
    		<priceLevel></priceLevel>
    		<regionNumber></regionNumber>
    		<salary></salary>
    		<salesPersonID></salesPersonID>
    		<schedulingMode></schedulingMode>
    		<shortName></shortName>
    		<socialInsuranceNumber></socialInsuranceNumber>
    		<stateProvinceCode></stateProvinceCode>
    		<status></status>
    		<storeNumber></storeNumber>
    		<type></type>
    		<zipCode></zipCode>
    	</Employee_Update_Request_Detail>
    </EMPLOYEE_UPDATE_REQUEST>
    
End of the code.

Syntax Syntax

The file btrXmlCustUpdateResult is a sample of the XML-based output generated to show the results of the customer update processing.

  1. <CUSTOMER_UPDATE_RESPONSE>
    	<Customer_Update_Response_Header/>
    		<inquiryEmployeeNumber>1111</inquiryEmployeeNumber>
    	<Customer_Update_Response_Detail/>
    		<customerNumber>10987654321</customerNumber>
    </CUSTOMER_UPDATE_RESPONSE>
    
End of the code.

Parameter Name

Parameter Type

Data Type

bstrXmlCustUpdate

IN

BSTR

bstrXmlCustUpdateResult

OUT

BSTR*

Method name: Delete
  • Short Description

    Delete customer.

  • Functionality

    SAP POS authorizes the inquiry, deletes the customer, and outputs the results of the delete processing. See sample input and output formats in the Syntax areas below.

  • Preconditions

    You must register TrvCustomerAPI.dll.

  • Result

    HRESULT

Syntax Syntax

The file bstrXmlCustDelete is a sample XML-based customer delete request. During processing, SAP POS uses inquiryEmployeeNumber to check authorization.

  1. <CUSTOMER_DELETE_REQUEST>
    	<Customer_Delete_Request_Header>
    		<inquiryEmployeeNumber>1111</inquiryEmployeeNumber>
    		<inquiryEmployeeStoreNumber>1</inquiryEmployeeStoreNumber>
    	</Customer_Delete_Request_Header>
    	<Customer_Delete_Request_Detail>
    		<customerNumber></customerNumber>
    		<lastName>Barrett</lastName>
    	</Customer_Delete_Request_Detail>
    </CUSTOMER_DELETE_REQUEST>
    
End of the code.

Syntax Syntax

The file btrXmlCustDeleteResult is a sample of the XML-based output generated to show the results of the customer delete processing.

  1. <CUSTOMER_DELETE_RESPONSE>
    	<Customer_Delete_Response_Header/>
    		<inquiryEmployeeNumber>1111</inquiryEmployeeNumber>
    	<Customer_Delete_Response_Detail/>
    		<customerNumber/>
    </CUSTOMER_DELETE_RESPONSE>
    
End of the code.

Parameter Name

Parameter Type

Data Type

bstrXmlCustDelete

IN

BSTR

bstrXmlCustDeleteResult

OUT

BSTR*

Method name: Initialize
  • Short Description

    Initialize customer information.

  • Functionality

    SAP POS initializes the customer information and outputs the results of the initialize processing. See sample input and output formats in the Syntax areas below.

  • Preconditions

    You must register TrvCustomerAPI.dll.

  • Result

    HRESULT

Syntax Syntax

The file bstrXmlCustInit is a sample XML-based initialize request.

  1. <CUSTOMER_INIT_REQUEST>
    	<serverName>127.0.0.1</serverName>
    	<storeNumber>1</storeNumber>
    	<registerNumber>1</registerNumber>
    	<timeOut>20</timeOut>
    </CUSTOMER_INIT_REQUEST>
    
End of the code.

Syntax Syntax

The file btrXmlCustInitResult is a sample of the XML-based output generated to show the initialization results.

  1. <CUSTOMER_INIT_RESPONSE>
    	<problemDescription>Customer Operation Succeed</problemDescription>
    	</CUSTOMER_INIT_RESPONSE>
    
End of the code.

Parameter Name

Parameter Type

Data Type

bstrXmlCustInit

IN

BSTR

bstrXmlCustInitResult

OUT

BSTR*