Show TOC

Object documentationITmxPendingTxn interface

 

This interface is used to update 'Pending Transaction' tables in the database. It consists of a single method.

Method

HRESULT Insert ( BSTR bstrXmlPt, BOOL bUpdate, BSTR *bstrXmlPtResult )

This method is used to insert or update pending transaction data into the PT tables. The mandatory fields listed in the XML data have to be defined.

Parameter

BstrXmlPt

String containing an XML document, structured according to a defined template (schema) for pending transactions. The schema conforms to proposed standards from W3C.

bUpdate

'FALSE' indicates that a new record is being inserted in the database and (therefore) duplicate keys are an error. 'TRUE' indicates that duplicate key errors should be ignored.

BstrXmlPtResult

On return it contains either NULL or an XML document containing detailed, item-specific error information.

Return

S_OK

If the transaction was successfully recorded in the database. In this case, bstrXmlPtResult is NULL.

TMXPT_E_INVALID_TRANSACTION

One or more required fields were missing.

TMXPT_E_COMMUNICATIONERROR

If there is a communication error before any data is written to the database. BstrXmlPtResult is NULL.

TMXPT_E_NOT_RECORDED

If there is some other error before any data is written to the database. BstrXmlPtResult is NULL.

TMXPT_E_PARTIALLY_RECORDED

Failed to write all items to the database.

TMXPT_E_ALREADY_EXISTS

One or more items were not written as they already exist in the database.

XML format

The XML data fields are divided into two separate sections: the PT Transaction level, and the Item Detail level. The PT Transaction level includes data required to add a single record into PT tables. The Item Detail level includes data required to add multiple records into PT detail tables, such as the PT_merch_entrytable.

The following fields are required for all PT tables (except ptd_summary):

  • StoreNumber (same as ptd_summary)

  • TransNum (same as ptd_admin)

  • ItemNum (increment on ptd_admin for detailed items)

The transaction level related mandatory and optional fields are:

Mandatory

Optional

UpdateTxnNumber (ptd_summary)

CustomerNumber

UpdateDate

CustomerName

PTDNumber

PhoneNumber

PTDID

BinDescription1

TotalSale

BinDescription2

ServiceCharge

BinDescription3

TotalPaymentAmount

BinDescription4

LastPaymentAmount

OriginalDate

StoreNumber

Tax1

TransNumber

Tax2

Tax3

Tax4

LastPaymentDate

ItemNumber (ptd_admin)

PTDTxnType

RegionGroupNumber

RegionNumber

CashierNumber

TxnNumber

ItemDateTime

BusinessDate

ServiceCharge (ptd_total)

ServiceChargeTax

TotalPaymentAmount

CancelFee

LastPaymentAmount

CancelFeeTax

ScheduleNumber

PtdTotalAmount

EndBalanceOwing

TaxAmount

DiscountTypeCode (ptd_transaction_discount)

DiscountDefNumber

DiscountPercent

ExtendedDiscountAmount

DiscountQuantity

ReferenceNumber

AutoPreset

UsingPreset

AffectNetSale

EmployeeSale

DiscountOnItem

The following list the mandatory and optional fields required for ptd_merch_entry and ptd_non_merch_sale tables.

Mandatory

Optional

SKUNumber (ptd_merch_entry)

Quantity

ExtendSalePrice

ExtendedOriginalPrice

Discounted

DepartmentNumber

StandardUnitPrice

ExtendedUndiscountPrice

LinkedItem

PriceLevel

ClusterQuantity

ActiveMixMatch

ItemDiscountable

TxnDiscountable

IsReturnable

Description

AutodiscountID

CrossReferenceNumber

NonMerchID (ptd_non_merch_sale)

Quantity

ExtendSalePrice

ExtendedOriginalPrice

ReferenceNumber

Discounteds