Lottery Purchases (Invoice) Conexxus Data Mapping
Data in this section is described in accordance with the Conexxus Standard: https://www.conexxus.org/.
In this section, the following information about the lottery purchases invoices data is presented:
- Entering lottery purchases in CStoreOffice®
- Lottery purchases (invoice) data mapping table
- Sample XML
- Lottery purchases (invoice) data export via the Business Documents API
This information becomes accessible through the Business Documents API after accepting pending invoices through CStoreOffice®.
Entering lottery purchases in CStoreOffice®
Invoice XML contains data submitted in Lottery Purchases (Invoices) (Data Entry > Lottery > Purchases).
A separate file is created for each operation:
- Creating a new invoice.
- Editing the invoice.
- Deleting the invoice.
Lottery purchases (invoice) data mapping table
Data set uses Conexxus 1.5.23 NAXML-BusDocInvoice XSD schema of Retail Merchandise Interface.
Mapping between CStoreOffice® Invoices Report for particular and resulting XML is shown below:

XML Path |
Description |
Supplier (Vendor information) |
|
NAXML-BusDoc/Parties/Supplier/Name |
The name of the lottery vendor the invoice was received from. |
NAXML-BusDoc/Parties/Supplier/OrganizationId |
Unique identifier of the lottery vendor in CStoreOffice®. |
NAXML-BusDoc/Parties/Supplier/ Contact/Name |
Lottery's vendor contact person (if any), populated from vendor settings. |
Invoice details |
|
NAXML-BusDoc/Invoice/InvoiceNumber |
Invoice number. |
NAXML-BusDoc/Invoice/InvoiceDate |
Invoice date. |
NAXML-BusDoc/Invoice/Currency |
The currency in which the invoice is issued. This value is based on the CStoreOffice® account's currency setting. By default, this value is US dollar ( |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem |
The order number of separate item line for the document. Created by the Service. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/PurchaseOrderInfo/PurchaseOrderDate |
The default value is |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/PurchaseOrderInfo/PurchaseOrderNumber |
The default value is |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/PurchaseOrderInfo/PurchaseOrderQty |
The default value is |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/PurchaseOrderInfo/PurchaseOrderUnitId |
Item's serial number. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/InvoiceUnit/InvoiceUnitId |
GTIN-code of the item. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/InvoiceUnit/InvoiceUnitDescription |
UPC or lottery item name. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/InvoiceUnit/InvoiceUnitQty |
The number of tickets in pack, calculated by multiplying the Unit in Case by Number of Cases. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/InvoiceUnit/InvoiceUnitCost |
Unit cost. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/InvoiceUnit/LineItemGrossAmt |
Case cost. |
NAXML-BusDoc/Invoice/InvoiceDetail/LineItem/InvoiceUnit/LineItemNetAmt |
The default value is |
Invoice summary |
|
NAXML-BusDoc/Invoice/InvoiceDetail/InvoiceSummary/InvoiceTotals/TotalInvoiceUnits |
The total number of items (lines) in the invoice. |
NAXML-BusDoc/Invoice/InvoiceDetail/InvoiceSummary/InvoiceTotals/TotalLineItemNetAmt |
Total cost of all items in the invoice. |
NAXML-BusDoc/Invoice/InvoiceDetail/InvoiceSummary/InvoiceTotals/TotalInvoiceDueAmt |
Invoice's total amount. |
NAXML-BusDoc/Invoice/InvoiceDetail/InvoiceSummary/Terms/TermsType |
Supply terms. |
NAXML-BusDoc/Invoice/InvoiceDetail/InvoiceSummary/Terms/Discount |
Self-closed tag. |
Sample XML
The XML example below contains only one item. Other items are omitted to save space.

<pcats:NAXML-BusDoc version="1.0"
xmlns:pcats="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.naxml.org/Retail-EDI/Vocabulary/2003-10-16 ../RetailMerchandise_Schemas_V1.5.23/NAXML-BusDocInvoice15.xsd">
<pcats:TransmissionHeader>
<pcats:TransmissionId>1</pcats:TransmissionId>
<pcats:TransmissionDate>2024-10-14</pcats:TransmissionDate>
<pcats:TransmissionTime>12:04:49</pcats:TransmissionTime>
<pcats:TransmissionStatus actionType="original">Cash</pcats:TransmissionStatus>
</pcats:TransmissionHeader>
<pcats:Parties>
<pcats:Supplier>
<pcats:Name>PA Lottery</pcats:Name>
<pcats:OrganizationId>742</pcats:OrganizationId>
</pcats:Supplier>
<pcats:Buyer>
<pcats:Contact>
<pcats:Name>John Doe</pcats:Name>
</pcats:Contact>
</pcats:Buyer>
</pcats:Parties>
<pcats:Invoice>
<pcats:InvoiceNumber>56765</pcats:InvoiceNumber>
<pcats:InvoiceDate>2024-10-13</pcats:InvoiceDate>
<pcats:Currency code="USD"/>
<pcats:InvoiceDetail>
<pcats:LineItem count="1">
<pcats:PurchaseOrderInfo>
<pcats:PurchaseOrderDate>2000-01-01</pcats:PurchaseOrderDate>
<pcats:PurchaseOrderNumber>0</pcats:PurchaseOrderNumber>
<pcats:PurchaseOrderQty>0</pcats:PurchaseOrderQty>
<pcats:PurchaseOrderUnitId>165211111</pcats:PurchaseOrderUnitId>
</pcats:PurchaseOrderInfo>
<pcats:InvoiceUnit>
<pcats:InvoiceUnitId identType="GTIN">00644018116522</pcats:InvoiceUnitId>
<pcats:InvoiceUnitDescription>$100.000 A YEAR FOR LIFE</pcats:InvoiceUnitDescription>
<pcats:InvoiceUnitQty cstoreUOMBasis="Ticket">60</pcats:InvoiceUnitQty>
<pcats:InvoiceUnitCost currency="USD">10.00</pcats:InvoiceUnitCost>
<pcats:LineItemGrossAmt>600</pcats:LineItemGrossAmt>
<pcats:LineItemNetAmt>0</pcats:LineItemNetAmt>
</pcats:InvoiceUnit>
</pcats:LineItem>
<pcats:InvoiceSummary>
<pcats:InvoiceTotals>
<pcats:TotalInvoiceUnits count="1"/>
<pcats:TotalLineItemNetAmt identType="Credit">600</pcats:TotalLineItemNetAmt>
<pcats:TotalInvoiceDueAmt identType="Credit">1485.00</pcats:TotalInvoiceDueAmt>
</pcats:InvoiceTotals>
</pcats:InvoiceSummary>
<pcats:Terms>
<pcats:TermsType></pcats:TermsType>
<pcats:Discount/>
</pcats:Terms>
</pcats:InvoiceDetail>
</pcats:Invoice>
</pcats:NAXML-BusDoc>
Lottery purchases (invoice) data export via the Business Documents API
To export the XML files with the lottery purchases (invoice) data via the Business Documents API:
- Prepare the location (station) or company identifier as the input data.
- Start calling the API from the
/business-unit-level-resources
endpoint. - Use lottery-purchase as the Document type identifier value.
For more information, see Calling the Business Documents API at the Business Unit Level.