POSCNX

From RPOWERWiki

Jump to: navigation, search

POSCNX is an On-Line Ordering API under XyzzyTalk (pronounced "ZizzyTalk"), which in turn is a lightweight XML specification for client-server transaction processing and data exchange.

Contents

Overview

The Web server is the Client. The restaurant is the Server. The restaurant has either a static IP address or uses a DNS service (such as DNS2GO) to resolve its address. The Web server performs an HTTP POST operation shown below with an order as an XML document payload. The restaurant replies with a short XML document payload response. The TCP port number is configurable. We recommend 32112 (currently unassigned). This port is typically forwarded by the router at the restaurant to a computer designated as an "Online Server" and referenced in the POSCNX.INI configuration file. This computer does not require a workstation license in order to accept orders. The RPOWER Online Order Module includes the ability to accept Web orders on any computer.

XyzzyTalk and POSCNX are public-domain products of K3 Software Corp. RPOWER is also a product of K3 Software Corp. XyzzyTalk and its APIs are intended to be as application-generic as possible. There are no restrictions on the use of this API with other POS or Web products.

Communications log of actual on-line test transaction

RPOWER has a system set up to accept test transctions at its corporate headquarters. Send all test transactions to http://rpower.dyndns.org:32112. Direct any XyzzyTalk questions to support@rpower.com.

Note that "....." is used at the beginning of a line to show text from the previous line.

Client Request

POST / HTTP/1.0
Referer: www.rpower.com
User-Agent: K3INET/1.0
Host: rpower.dyndns.org:32112
Content-Type: text/xml
Content-Length: 1399

<?xml version="1.0" encoding="iso-8859-1" ?>
<XyzzyTalk>
<XyzzyHeader xyzzy_version="0.1.1.0" api_id="POSCNX" api_version="0.0.9.0"
............ api_command="ORDER" />
<PCX_ORDER ref="rpowertest">
<Customer n="#X1#bpawSt0oUl0V7k3xBhMSylMfj9ksdFMsmhn2QpxShatAR8PlrQ==">
  <Addr co="Geomerx" l1="21 Pine Street" l2="Suite 237" c="Rockaway" s="NJ"
....... z="07866"/>
  <Ctct ph="973-586-4242x26"
....... eml="#X1#/Mo/dyCDIqkgjUbpPCcJ2t4IEf0+lDgLY7bC8n0FWHVi0jPHiw=="/>
</Customer>
<ShipTo n="#X1#799r24FzLW+fQs3NSBXlxcTKBBlVWfaQi1EOqCGgUYy+B8GG6g==">
  <Addr co="ABC Trinkets" l1="111 N 58th Street" l2="Suite 96" c="New York"
....... s="NY" z="10036"/>
  <Ctct ph="212-555-1212x552"/>
</ShipTo>
<Ticket ref="164" dlvt="DELIVERY" dt="2002-12-17T12:51"
....... need_dt="2002-12-17T13:40">
  <Item pn="comments" n="comments" qty="1" p="$US0.00" ttl="$US0.00"
....... note="Test order"/>
  <Item pn="" n="Texas Chain Gang" qty="2" p="$US10.50" ttl="$US21.00"
....... note="Test item">
    <Mod n="First Chili toppings">
      <Mod n="Sour Cream"/>
    </Mod>
    <Mod n="Second Topping">
      <Mod n="White Onion"/>
    </Mod>
    <Mod n="Extra chili toppings">
      <Mod n="White onion"/>
      <Mod n="Jalapenos"/>
    </Mod>
  </Item>
  <Item pn="tax" n="tax" qty="1" p="$US1.73" ttl="$US1.73"/>
  <Payment pmid="Cash" tip="0.00" />
</Ticket>
</PCX_ORDER>
</XyzzyTalk>

Server Response

HTTP/1.1 200 OK
Server: K3INET/1.0
Connection: close
Proxy-Connection: close
Cache-Control: no-cache
Content-Type: text/xml
Content-Length: 202

<?xml version="1.0"?>
<XyzzyTalk>
<XyzzyHeader xyzzy_version="0.0.92.1" api_id="POSCNX" api_version="0.0.9.0"
............ api_command="ORDER" date_time="2002-12-17T10:51:28" int1="101"
............ dbl1="21"/>
</XyzzyTalk>

PCX_ORDER XML Schematic

<?xml version="1.0"?>
<XyzzyTalk>
   <XyzzyHeader xyzzy_version="" api_id="" api_version="" api_command=""/>
   <PCX_ORDER ref="">
      <Customer uid="" xid="" n="">
         <Addr co="" l1="" l2="" l3="" l4="" l5="" xs="" c="" s="" z="" cc=""/>
         <Ctct ph="" eml=""/>
         <Pop hd="" ref="" dt="" prn="" dsp="" stop="" alrm="" prn1=""
              text=""/>
         <Dir hd="" ref="" dt="" prn="" dsp="" stop="" alrm="" prn1=""
              text=""/>
         <Note hd="" ref="" dt="" prn="" dsp="" stop="" alrm="" prn1=""
               text=""/>
      </Customer>
      <ShipTo n="">
         <Addr co="" l1="" l2="" l3="" l4="" l5="" xs="" c="" s="" z="" cc=""/>
         <Ctct ph="" eml=""/>
      </ShipTo>
      <Ticket ref="" dt="" dlvt="" need_dt="" note="" gttl="">
         <Seat seat="" n=""/>
         <Seat seat="" n=""/>
         <Item plu="" n="" pn="" qty="" p="" ttl="" ref="" seat="" seats=""
               note=""/>
         <Item plu="" n="" pn="" qty="" p="" ttl="" ref="" seat="" seats=""
               note="">
            <Mod n="">
               <Mod plu="" n="" pn="" qty="" p="" ttl=""/>
               <Mod plu="" n="" pn="" qty="" p="" ttl=""/>
            </Mod>
            <Mod n="">
               <Mod plu="" n="" pn="" qty="" p="" ttl=""/>
            </Mod>
         </Item>
         <Payment ref="" pmid="" pm="" paid="" note="" amt="" tip="" apv=""/>
         <Payment ref="" pmid="" pm="" paid="" note="" amt="" tip="" apv="">
            <CrCard f="" num="" exp="" nam="" cvc="" addr="" zip="" avs=""
                    t1="" t2=""/>
         </Payment>
      </Ticket>
   </PCX_ORDER>
</XyzzyTalk>

PCX_ORDER XML Dissection

Items in [ ] are optional. Fields can be encrypted using an RPOWER-supplied WIN32 command-line application.

Phone numbers are parsed according the following:

[aaa?]eee?nnnn?[Xext7]

where items in [ ] are optional and the ? represents any punctuation. aaa is area code (3), eee is exchange (3) and nnnn is number (4). ext7 is up to seven digits following the letter "X" (upper or lower case). A note may be appended following a ";", but is not meaningful to this interface at this time.

Currency values are represented as "$US1.23" meaning one dollar and twenty-three cents. This is the "$" followed by the two-letter Internet Country Code, followed by a number formatted in the manner appropriate the country. Note that the "$" is used generically here to mean "money," not necessarily "dollars."

Notes are appropriately word-wrapped for display and/or printing. Line breaks can be embedded in note text with `L, where ` is a single backquote.

<?xml version="1.0"?>
<XyzzyTalk>
   <XyzzyHeader
      xyzzy_version="0.1.1.0"                ..."Dotted integer" version 1.1.0
      api_id="POSCNX"                      ...Always this for on-line ordering
      api_version="0.0.9.0"                            ...POSCNX version 0.9.0
      api_command="ORDER"                         ...Command to place an order
      />
   <PCX_ORDER ref="RPOWER TEST">                   ...[Web order reference ID]
      <Customer
         uid=""                                            ...["Universal" ID]
         xid=""                                    ...[Web ID for audit trail]
         n="Bloe, Joe"                                        ...Customer name
         >
         <Addr
            co="ABC Widgets"         ...[Company name] used as part of address
            l1="123 Main"                                    ...Address line 1
            l2="Suite 123"                                 ...[Address line 2]
            xs="3rd and Main"                               ...[Cross streets]
            c="Anytown"                                                ...City
            s="AZ"                                                    ...State
            z="85858"                                                   ...Zip
            cc="US"                               ...["Internet" country code]
            />
         <Ctct
            ph="602-555-1234x12"                          ...[Phone (primary)]
            eml="jbloe@abcwidgets.com"                    ...[Email (primary)]
            />
         <Pop                                          ...[Pop-up note record]
            text="This note pops up when customer is selected in regular POS"
            />
         <Dir                                      ...[Directions note record]
            text="Guadalupe E to Rogers`LLeft to Nopal`LRight to Reyes"
            />
         <Note                ...[Customer record notes, don't print anywhere]
            text="This note is visible when editing the customer record"
            />
         </Customer>
      <ShipTo n="Bloe, Martha">               ...[Ship-to address and contact]
         <Addr
            l1="321 Maple"
            l2=""
            c="Hometown"
            s="AZ"
            z="85588"
            />
         <Ctct
            ph="480-555-4321"                               ...[Ship-to phone]
            eml="marthabloe@cableco.net"       ...[Neither stored nor printed]
            />
         </ShipTo>
      <Ticket
         ref="123"                                       ...[Web reference ID]
         dt="2003-01-02T12:34"      ...[Entry date and time (ISO-8601 format)]
         dlvt="DELIVERY"              ...Delivery Type "DELIVERY" or "TAKEOUT"
         need_dt="2003-01-02T14:30" "                ...[Date and time needed]
         note="Order comments."                 ...[User-typed order comments]
         gttl=""                                    ...[Grand total of ticket]
         >
         <Seat                        ...[Optional seat/guest name assignment]
            seat="1"       ...[Seat number referenced in Item records seat=""]
            n="Fred"                    ...[Name assigned to this seat number]
            />
         <Seat                         ...[Another seat/guest name assignment]
            seat="2"
            n="Martha"
            />
         <Item                                                   ...First item
            plu="123"                ...[PLU ("Price Lookup") number, primary]
            pn="LG THN"                   ...[POS item name, secondary lookup]
            n="Large Thin 'n' Crispy"      ...[Web item name, tertiary lookup]
            qty="1"                             ...[Quantity, assumed to be 1]
            p="$US9.50"                          ...[Price (each), assumed $0]
            ttl=""                                        ...[Total (qty * p)]
            ref=""                                       ...[Web reference ID]
            seat="1"                                    ...[Seat/guest number]
            seats=""                   ...[Comma-separated seat/guest numbers]
            note="Cook well done."                   ...[User-typed item note]
            >
            <Mod                            ...First-level modifier is ignored
               n="Pizza Toppings"              ...(neither stored nor printed)
               >
               <Mod                                   ...This modifier IS used
                  plu=""                          ...These fields same as Item
                  n=""
                  pn="Sausage"
                  qty=""
                  p="$US1.25"
                  ttl=""
                  />
               </Mod>
            </Item>
         <Item            ...["Built-in" TAX line item overrides POS if given]
            plu="TAX"
            p="$US.89"
            />
         <Item                              ...["Built-in" COMMENTS line item]
            plu="COMMENTS"                ...[(not needed if use Ticket note)]
            note="Order comments."
            />
         <Payment                               ...[Optional, CASH is assumed]
            ref=""                                       ...[Web reference ID]
            pmid=""                     ...[Payment method ID, primary lookup]
            pm=""                   ...[Payment method name, secondary lookup]
            paid=""              ...[Payment already cleared: "1"=Yes, "0"=No]
            note=""   ...[Payment note/reference prints on billing statements]
            amt="$US11.64" .  ..[Base payment NOT including tip; 0=Amount due]
            tip=""                       ...[Pre-assigned add'l voluntary tip]
            apv=""              ...[Not supported by interface: approval code]
            >
            <CrCard
               num="4003010123456780"                    ...Credit card number
               exp="2004-12"             ...Expiration ISO-8601 "Month" format
               nam="JOSEPH Q BLOE"                           ...[Name on card]
               cvc="123"                     ...[Extra digits on back of card]
               addr=""              ...[AVS address only; typically not alone]
               zip=""              ...[AVS Zip only; typically not alone here]
               avs="321 MAPLE 85588"             ...[Full addr+zip AVS string]
               t1=""                  ...[Track 1; used for NAME CAPTURE ONLY]
               t2=""              ...[Track 2; can be used in lieu of num/exp]
               f="FIL"           ...[Card on file; 400301xxxxxx6780 will find]
               platform="MPS"                     ...[MPS means Mercury, e.g.]
               cardtype="VISA"                    ...[As returned by platform]
               last4="1234"            ....[************1234 would be OK also]
               token="epNxoyv7dUzKVJk0Tnhjt5IxUPVyrM7sMhIFEAASNAAphg"    [...]
               trancode="PreAuth"                 ...[PreAuth or Sale for MPS]
               invoice="12345678"     ...[Typically numeric 8 or fewer digits]
               refno="1234"       ...[Either invoice or returned by processor]
               acqrefdata="bMCC0006650528 c e00lMCC"       ...[From processor]
               processdata="|00|210100500000"              ...[From processor]
               />
            </Payment>
         </Ticket>
      </PCX_ORDER>
   </XyzzyTalk>

PCX_ORDER Reply

Success

<?xml version="1.0"?>
<XyzzyTalk>
   <XyzzyHeader
      xyzzy_version="0.0.92.1"                       ...Current server version
      api_id="POSCNX"                                             ...Echo back
      api_version="0.0.9.0"                                       ...Echo back
      api_command="ORDER"                                         ...Echo back
      date_time="2002-12-17T10:51:28"              ...Current server date/time
      int1="101"                                       ...RPOWER Ticket NUMBER
      dbl1="21"         ...RPOWER Ticket GTOTAL (grand total) for sanity check
      />
   </XyzzyTalk>

Failure

Client should not worry about error numbers, but here they are nevertheless as defined so far:

#  Description              Comment
-- -----------------------  -------------------------------------------------
1  No PCX_ORDER             No <PCX_ORDER> element.
2  Configuration error (2)  No order-entry employee (ClerkID).
3  Configuration error (3)  Order-entry employee can't be punched in.
4  Customer not found       No customer name or ID.
5  Order is blank           No items were added on a ticket.
6  Unknown payment method   Unknown <Payment> payment method.
7  Payment declined         Credit card declined or similar failure.
8  Not set up to charge     Customer not allowed to charge.
<?xml version="1.0"?>

Example Response

<XyzzyTalk>
   <XyzzyHeader
      xyzzy_version="0.0.92.1"                       ...Current server version
      api_id="POSCNX"                                             ...Echo back
      api_version="0.0.9.0"                                       ...Echo back
      api_command="ORDER"                                         ...Echo back
      date_time="2002-12-17T10:51:28"              ...Current server date/time
      err_num="7"                                       ...RPOWER error number
      err_flags="svr,Log"        ...Flags suggesting error handling procedures
      err_desc="Payment declined"                    ...Error message for user
      />
   </XyzzyTalk>

Example Order

<?xml version="1.0"?>
<XyzzyTalk>
  <XyzzyHeader xyzzy_version="0.1.1.0" api_id="POSCNX"
               api_version="0.0.9.0" api_command="ORDER"/>
  <PCX_ORDER ref="RPOWER TEST">
    <Customer n="Bloe, Joe">
      <Addr co="ABC Widgets" l1="123 Main" l2="Suite 123" c="Anytown" s="AZ"
            z="85858" cc="US"/>
      <Ctct ph="602-555-1234x12" eml="jbloe@abcwidgets.com" />
    </Customer>
    <ShipTo n="Bloe, Martha">
      <Addr l1="321 Maple" c="Hometown" s="AZ" z="85588"/>
      <Ctct ph="480-555-4321" eml="marthabloe@cableco.net"/>
    </ShipTo>
    <Ticket ref="123" dt="2003-01-02T12:34" dlvt="DELIVERY"
            need_dt="2003-01-02T14:30" note="Order comments.">
      <Item plu="123" n="Large Thin 'n' Crispy" pn="LG THN" qty="1"
            p="$US9.50" note="Cook well done.">
        <Mod n="This is ignored!">
          <Mod pn="Sausage" p="$US1.25"/>
        </Mod>
      </Item>
      <Item plu="TAX" p="$US.89"/>
      <Item plu="COMMENTS" note="Order comments."/>
      <Payment amt="$US11.64">
        <CrCard num="4003010123456780" exp="2004-12" nam="JOSEPH Q BLOE"
                cvc="123" avs="321 MAPLE 85588"/>
      </Payment>
    </Ticket>
  </PCX_ORDER>
</XyzzyTalk>

POSCNX.INI (in \RPOWER\WINRUN\INI)

[Setup]
Server=OFFICE:32112 ; Workstation name:TCP port
ServerKey=12345678  ; Currently always this number for X1FILE encryption
ClerkID=8888        ; Online Order Taker ID number
MiscPLU=888888      ; Unknown Order Itm`ONLINE (RMI, all applicable remotes)
MiscModPLU=888887   ; Unknown Mod Item`ONLINE  (RMI, FOLLOW)
NotePLU=888889      ; ** Order Notes **`ONLINE (RMI, all applicable remotes)

Basic Menu Item Naming

RPOWER has two names for every menu item. The combination of these two names together is unique. The RPOWER online order and reporting database systems separate the two names (and other things) with single backquote characters.

The primary name is 17 characters long and is the name displayed on the screen and printed on guest checks and remotes. The additional name (also called a specifier name) is 15 characters long and is hidden.

As a "textbook" example of how these names are used, consider a pizza topping called "Sausage." When ordering a pizza, one may want a button that says "Sausage" and the same to print on kitchen orders and guest checks. However, there is more than one "Sausage" pizza topping — one for each size of pizza (in practice, there may be many more). Sausage on a Large pizza might cost $2.00, for example, but only $1.50 on a Medium. Therefore, there are two menu items, Sausage`Large and Sausage`Medium.

In order to find a menu item in RPOWER, both names must match exactly, except upper and lower case do not matter. but spacing and punctuation do. If an item is not found, RPOWER finds either the MiscPLU or MiscModPLU menu item as appropriate.

More information is given below under Advanced Menu Item Name Parsing.

Combination Menu Item Finding

Main article: Prefix and Suffix Items

RPOWER has the ability to link multiple item button pushes together to order a single item in the check. This feature becomes even more important and heavily used in many online ordering setups. On a POS workstation, it's easy to have a single button say "Large Coffee," but online order systems rarely work that way and instead will order an item called "Coffee" modified by another item called "Large." Assume the price of a Large Coffee is $4.00.

To make this work, we need three menu items.

Coffee`^Coffee|B 
This is the the "entree" item — the base item being modified. It is a base suffix-type prefix item. Its additional name ("^Coffee") will combine as a suffix on non-prefix modifiers that have target options of "|B" to find or create a different item.

Note that this item could be entered as ^Coffee`|B, but doing so might create a minor cosmetic problem if it is used in a different context, in which case the up-caret "^" in the primary name would appear in print. This problem only occurs on base prefix items. In normal "two-key" prefix combo situations, RPOWER removes the "^" characters. On base items, RPOWER must retain the original name exactly to allow the check to be edited later on.

Large`|B 
This is the non-prefix modifier with the "include base group" target option set ("|B").
Large Coffee 
This is a Regular Menu Item in the database that has the correct price set in RPOWER, because this price will be used on the check.

Now the following order sequence takes place:

  1. <Item pn="Coffee`^Coffee|B$0" qty="1" p="$US4.00">
  2. <Mod n="Select Size">
  3. <Mod pn="Large`|B" /></Mod></Item>

The "$0" in the first item sets the price of this item to zero in RPOWER. The first modifier level ("Select Size") is ignored. Then the Large modifier combines with ^Coffee according the position of the "^" character, giving Large Coffee, which in turn is found in the database, and whose RPOWER price is used. If the price in RPOWER were not $4.00, the check would not balance correctly to the online order total. Later revisions of the online order system may change how this works, but backward compatibility will be maintained.

Now

 1..Coffee
    Large Coffee      4.00

will appear on guest checks. While this is OK, it may be undesireable in this and other cases to have the word "Coffee" repeat itself in this manner. It is possible to change the name of the root item, for example, to "Web Order." The simplest way to do this is to provide a primary name override in the pn= string, for example

  • <Item pn="Coffee`^Coffee|B`Web Order$0" qty="1" p="$US4.00">

giving

 1..Web Order
    Large Coffee      4.00

See Advanced Menu Item Name Parsing (next) for more information.

Advanced Menu Item Name Parsing

The POS name (pn=) consists of up to four parts separated by single backquote characters.

In addition, a price override may follow a $ character at the end of a POS name.

In addition, mutliple POS names may be transmitted in a pn= string, each separated by a backslash (\) plus a single letter (either f or r) to indicate whether or not this item is a "fake" part not using the <Item> or <Mod> record's p= (price) or plu= attributes.

As it stands right now, pn= cannot exceed 63 characters, or else it will be clipped on the right.

Item Name Partitions

A single item's components look like this:

Primary Name`Add'l Name`Force Name`Lang 2 Name$Price
Primary Name (17 characters) 
This is the menu item's Name in RPOWER. The primary name is the one that is displayed on the screen and printed on remote printers and guest checks, unless the workstation or output destination has its Language #2 checkbox checked, in which case the Lang #2 name in RPOWER will display or print of that name is not blank.

The primary name can be blank in order to force the additional name (next) to be used as a PLU number lookup.

Add'l Name (15 characters) 
This is the menu item's Add'l name in RPOWER. It is also known as the specifier name. It is used to find items that have the same names but are differentiated "behind the scenes."

The additional name can alternatively be a PLU number used to find an item if the primary name is blank.

"Force Name" — Primary Name Override (17 characters) 
This changes the name of the item that will be displayted and printed (its primary name).
Lang 2 Name 
This sets the Language #2 name (also known as the alternate language name) in RPOWER to be displayed or printed according to Language #2 options in workstations and output destinations.
$Price 
If any name (no matter how many ` partitions) is followed by a $, then the <Item> or <Mod> record's p= price is overridden by the amount following the $..

Multiple Item Finding

You can include more than one name in a pn= string. "Real" items use the p= (price) and plu= attributes in the <Item> or <Mod> record, whereas "fake" items just use their names and have zero prices. In most cases there will be only one real item. A real items is either the first item in the string or is preceded by \r. Fake items are preceded by \f.

POSCNX API Records, Flags, and Enums

Xyzzy Built-In API Records, Flags, and Enums

These are the Xyzzy Built-In API Records, Flags, and Enums used by POSCNX:

POSCNX Item Status Enum ePCX_ItemStatus st=

  • normal : Item is normal. This is the default if st= is not in the record.
  • unkitem : Item is the "unknown menu item" set up in POSCNX.ini.
  • unkfreemod : Item is the "unknown non-priced modifier" set up in POSCNX.ini.
  • unkpricedmod : Item is the "unknown priced modifier" set up in POSCNX.ini.
  • biplu : Item is a "built-in PLU" item, meaning its plu is one of TAX, COMMENT, TIP, or DFEE.
  • setuperror : POSCNX.ini configuration error. Item is unknown and wants to be one of the "unknown" enums but the system can't find the item.

POSCNX Item Records

POSCNX Base Item Record PCX_TKMOD_L4 (included in other records)

This is also included in the CUSCNX CCX_TKITEM record.

plu (str11)  
First item-finding string. It can be the PLU or UPC of the item, or a "built-in" PLU.
upc (str15)  
This is actually not used for anything. If you want to find by an item's UPC code, put it in plu=.
pn (str63)  
POS Name. Second item-finding string. Separate multi-part names with single backquote ( ) characters.
n (str63)  
Name. Third item-finding string. This the typically the descriptive name from the Web site. Exported from NAME= in the publication record.
wbn (str63)  
Web Name. Explicit macro-string override of pn= that can either replace pn or append to it if prefixed with a plus sign (+). Exported from WBNM= in the publication record.
qty (number)  
Quantity. If not present, then assumed to be one (1). Even though this is a floating point number for use in other contexts, RPOWER will round it to an integer for actually adding menu items to checks.
p (money)  
Price Each. This is the price for a single unit (qty 1). It is not the extended price. If not present, it will be calculated from the ttl= extended price.
ttl (money)  
Extended Price or Total. This is the price per unit times the quanity. It is only used for one thing: to calculate the unit price (p=) if it is missing. The unit price is rounded to the nearest cent. Therefore, the resulting total could be different from the ttl= value. As it stands right now, this could cause the systems to be out of balance, so it is important that ttl= be an exact multiple of qty=.
st (ePCX_ItemStatus) 
Internal item status, not typically provided from an external source. Used for export.
unk (bool)  
Item is unknown in general. Used for export.

Other POSCNX Modifier Records PCX_TKMOD_L3 et al. <Mod>

The PCX_TKMOD_L3, PCX_TKMOD_L2, and PCX_TKMOD_L1 are all identical to the base record (PCX_TKMOD_L4) plus:

<Mod>[n] (PCX_TKMOD_L?) 
An array of item records one "level" greater than the containing record that modify the containing record.

POSCNX Ticket Item Record PCX_TKITEM <Item>

This root ticket item record is the PCX_TKMOD_L4 record plus:

ref (str63)  
Web app item reference ID.
seat (uint32)  
Optional seat/guest name assignment.
seats (uint64)  
Guest number bit flags 1..64.
note (str1023)  
Formatted XT_APPNOTE buffer.
<Mod>[n] (PCX_TKMOD_L1) 
An array of first-level modifiers.
<CRMCard> (XFR_CARD)  
Receive-on-account gift card recrod.

POSCNX Export Item Record PCX_PRODUCT <PCT_PRODUCT>

This record is used for the GETITEMINFO command. It is the PCX_TKMOD_L4 record plus:

desc (str1023) 
The body of the item's description record.

POSCNX Payment Record PCX_TKPAY <Payment>

ref (str63)  
Web app reference
pm (str23)  
Payment method name.
pmid (str23)  
Payment method MID (XXTYPE format).
paid (bool)  
true means item money was collected by Web site.
locked (bool)  
true means the payment and therefore the ticket are locked and cannot be changed.
closeorder (bool)  
true tells POSCNX to close the check (to this payment, and others, if the payment is successful).
note (str63)  
Payment reference note.
amt (money)  
Base amount of the payment, not including tip=.
tip (money)  
Tip amount in addition to the amt= base amount. This could possibly be modified on the check later.
<CrCard> (XFR_CARD) 
Credit card record. Interchangeable with <Card>. Don't use both.
<Card> (XFR_CARD) 
Other payment pard record. Interchangeable with <CrCard>. Don't use both.
apv (str11e)  
Approval code of a paid credit card. Not currently used.

POSCNX "Delivery Type" Flags fCCX_DLVTYPE dlvt=

These are implemented as flags but used as a mutually-exclusive enum. In the future, non-exclusive flags could be added. Also, it is possible that both DELIVERY and CATERING could be set at the same time, but right now that distinction is not relevant.

The <Ticket> room= attribute can override these flags and should be used if possible.

  • DELIVERY : Delivery.
  • TAKEOUT : Pick-Up, To-Go, Carry-Out. Not Delivery and not Dine-In.
  • DINEIN : For Here.
  • CATERING : Not used. A subtype of DELIVERY.

POSCNX Ticket Record PCX_TICKET <Ticket>

ref (str63)  
dt (datetimel)  
Explicit local time.
dlvt (fPCX_DLVTYPE) 
room (str23)  
Explicit check location — sets dlvt=.
need_dt (datetimel)  
Explicit local time. If not provided then assumed ASAP.
asap (bool)  
Flag to be used if need_dt= given so that delay can be programmed on Web site.
locked (bool)  
Lock ticket to (successful) payment so that it cannot be changed.
note (str1023)  
Formatted XT_APPNOTE buffer.
<ShipTo> (XFR_CUS)  
Ship to customer record. Only needed if different from <PCX_ORDER> <Customer>.
<Item>[0] (PCX_TKITEM)  
Array of root items on the check.
<Payment>[0] (PCX_TKPAY)  
Array of payments on the check. If not given, Cash is assumed.
tax (money)  
Used if plu='tax' built-in item PLU not used.
tip (money)  
Used if plu='tip' built-in item PLU not used.
gttl (money)  
Optional grand balancing total.
pcenter (int32)  
Internal profit center number.

POSCNX Commands ePCX_CMDS api_command=

eXT(ORDER          , ePCXCMD_ORDER,      1) //... <PCX_ORDER> ... </PCX_ORDER>
eXT(GETX509KEY     , ePCXCMD_GETKEY,     2) //... specify 8 (site) or 9 (shared) in int511
eXT(GETORDERSTATUS , ePCXCMD_GETORDSTAT, 3) //...
eXT(GETITEMINFO    , ePCXCMD_GETMITINFO, 4)

POSCNX Order PCX_ORDER <PCX_ORDER>

XTSTR63     (ref            )
XTSTR31     (host           )
XTRECORD    (Login          , XFR_LOGIN)
XTRECORD    (GroupCust      , XFR_CUS) //... used for GROUP orders
XTRECORD    (Customer       , XFR_CUS)
XTRECORD    (ShipTo         , XFR_CUS)
XTRECORD    (Ticket         , PCX_TICKET)

POSCNX Ticket Status Flags fPCX_TKSTATUS f=

fXT(ok             , fTKST_OK,   0x0001)

POSCNX Ticket Status Record PCX_TKSTATUS <Ticket>

XTSTR63     (ref            )
XTFLAGS     (f              , fPCX_TKSTATUS)
XTSTR255    (desc           )

POSCNX Order Status Record PCX_OSTATUS <PCX_OSTATUS>

XTSTR63     (ref            )
XTARRAY     (Ticket         , PCX_TKSTATUS)
Views
Personal tools