PhreeBooks Manual

Previous Chapter | Chapter 1 - Sales Order Interface | Next Chapter

Chapter Heading

Table of Contents

1.0 Introduction
2.0 Change History
3.0 Overview
4.0 General Programming Information
4.1 Access Request Interface Specification
4.2 Response Request Interface Specification
4.3 Examples
5.0 Programming Information
5.1 Access Request Interface Specification
5.2 Response Request Interface Specification
5.3 Examples
6.0 Appendices
6.1 Glossary
6.2 Return Status and Error Codes
6.3 Reference Tables
6.4 Frequently Asked Questions

# 1.0 Introduction

This chapter covers the sales order interface.

# 2.0 Change History

Revision | Description of Change | Date
1.0 | Initial Release | 1/1/2007

# 3.0 Overview

Sales orders are submitted to phreebooks through XML

With the sales order interface you can:

- Submit new sales orders to the PhreeBooks system
- Check status of existing sales orders
- Change open sales orders
- Close open sales orders

# 4.0 General Programming Information

Access to the interface requires an open XML account in PhreeBooks, refer to user maintenance for information on creating and maintaining the XML users interface.

Security

DTD's

SSL

## 4.1 Access Request Interface Specification

*Yes - required if the container tag is present.

Element (XMLPath) | Required/Cardinality | Type | Length | Description/Values
AccessRequest | Yes / One | Container |  | Access Request container tag
AccessRequest/ AccessUserID | Yes / One | Alpha-numeric | 5 to 15 | XML User ID for request
AccessRequest/ AccessPassword | Yes / One | Any | 5 to 20 | XML User Password for request
AccessRequest/ AccessFunction | Yes / One | Text | 5 to 20 | Must be 'SalesOrderEntry' for this entry. This value matched with the username and password to verify access privileges to this function.
SalesOrderEntry | Yes / One | Container |  | Top level container tag for the request
SalesOrderEntry/ Request | Yes / One | Container |  | Container tag for the general parameters of the request
SalesOrderEntry/ Request/ Version | Yes / One | Alpha-numeric | 4 | The XML interface version to the SalesOrder function. Current versions supported are: 1.00 - Intial release
SalesOrderEntry/ Request/ RequestAction | Yes / One | Text | 15 | The action requested for this transaction. Possible options are: New - New Sales Order Status - Status an existing sales order Change - Change an existing sales order Close - Close an existing sales order
SalesOrderEntry/ Request/ ReferenceName | No / Zero or One | Any | 0 to 64 | This field may be used to correlate the requests with the response for multiple submissions. The data from this field are returned with the response without modification.
SalesOrderEntry/ Request/ Originator | Yes / One | Container |  | Container tag for originator of sales order
SalesOrderEntry/ Request/Originator/ StoreID | Yes / One | Alpha-numeric | 1 to 16 | Contains the Store ID for the sales order submission. The value must correspond to a valid store ID as defined in the XML input/output configuration in PhreeBooks.
SalesOrderEntry/ Request/Originator/ SalesRepID | No / One | Alpha-numeric | 1 to 15 | Contains the Sales Rep ID for the sales order submission.
SalesOrderEntry/ SalesOrder | Yes / One | Container |  | Container for a single sales order. NOTE: At this time only one sales order can be processed per XML transaction.
SalesOrderEntry/ SalesOrder/ OrderSummary | Yes / One | Container |  | Container for the order summary information.
SalesOrderEntry/ SalesOrder/ OrderSummary/ SalesOrderID | Yes / One | Alpha-numeric | 1 to 16 | Sales Order ID reference. This value will be the key for processing and all future references to this sales order. This number must be unique to all values from all stores within the sales order journal. If left blank or omitted, a sales order number will be generated by the receiver.
SalesOrderEntry/ SalesOrder/ OrderSummary/ SalesOrderDate | No / Zero or One | Date Format | 10 or 19 | Date format must be of the form 'YYYY-MM-DD HH:MM:SS' or abbreviated 'YYYY-MM-DD'
SalesOrderEntry/ SalesOrder/ OrderSummary/ ItemTotal | No / Zero or One | Numeric | Float | Subtotal for all items contained within the sales order. This value will be verified against the quantities and prices of the sales orders line items.
SalesOrderEntry/ SalesOrder/ OrderSummary/ TaxTotal | No / Zero or One | Numeric | Float | Total tax charged for this sales order. This value will be verified against the total taxes charged within the sales orders line items.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShippingTotal | No / Zero or One | Numeric | Float | Total shipping charged for this sales order.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShippingCarrier | No / Zero or One | Alpha-numeric | 3 to 15 | Carrier to be used for this order. Must match an existing carrier as defined in PhreeBooks.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShippingMethod | Yes / One | Alpha-numeric | 3 to 15 | Shipping delivery service requested for this order. Must match codes as defined in PhreeBooks. Current codes are: 01 - Next Day Air 02 - Second Day Air 03 - Three Day Delivery GD - Ground or Standard
SalesOrderEntry/ SalesOrder/ OrderSummary/ OrderNotes | No / One | Text | 0 to 255 | Customer or Requestor special notes associated with this order.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer | Yes / One | Container |  | Container for the billing or customer information.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ CustomerID | Yes / One | Alpha-numeric | 1 to 32 | Customer ID link to requesting store.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ PrimaryName | Yes / One | Alpha-numeric | 1 to 32 | Customer or company name.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Contact | No / Zero or One | Alpha-numeric | 1 to 32 | Customer contact, used for mostly businesses.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Telephone1 | No / Zero or One | Alpha-numeric | 1 to 32 | Customer telephone number 1.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Telephone2 | No / Zero or One | Alpha-numeric | 1 to 32 | Customer telephone number 2, used for mostly businesses.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Fax | No / Zero or One | Alpha-numeric | 1 to 32 | Customer fax number, used for mostly businesses.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Email | No / Zero or One | Alpha-numeric | 1 to 32 | Customer e-mail address.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Website | No / Zero or One | Alpha-numeric | 1 to 32 | Customer website, used for mostly businesses.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Address1 | Yes / One | Alpha-numeric | 1 to 32 | Customer address line 1.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ Address2 | No / Zero or One | Alpha-numeric | 1 to 32 | Customer address line 2.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ CityTown | Yes / One | Alpha-numeric | 1 to 32 | Customer city or town.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ StateProvince | Yes / One | Alpha-numeric | 1 to 32 | Customer state, province or region.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ PostalCode | Yes / One | Alpha-numeric | 1 to 15 | Customer zipcode or postalcode.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ CountryCode | No / Zero or One | Alpha-numeric | 2 | Customer 2 character ISO country code. If no country code is provided, the country code found in Company/My Company will be used.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ SalesGLAccount | No / One | Alpha-numeric | 0 to 15 | Sales/Income GL Account for this sales order. If left blank, the order of precedence will be: 1. The customer default account from the customer record, if defined. 2. The default account as defined in My Company.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ TaxIDNumber | No / One | Alpha-numeric | 0 to 15 | Customer sales tax ID number. May also be used for resale number, FEIN, VAT license, etc.
SalesOrderEntry/ SalesOrder/ OrderSummary/ Customer/ AccountNumber | No / One | Alpha-numeric | 0 to 15 | Customer account number.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo | No / One | Container |  | Container for the billing or customer information. If this container is not provided, the customer information will be used as the bill to information.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ PrimaryName | *Yes / One | Alpha-numeric | 1 to 32 | Customer or company name.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ Contact | No / Zero or One | Alpha-numeric | 1 to 32 | Customer contact, used for mostly businesses.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ Address1 | *Yes / One | Alpha-numeric | 1 to 32 | Customer address line 1.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ Address2 | No / Zero or One | Alpha-numeric | 1 to 32 | Customer address line 2.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ CityTown | *Yes / One | Alpha-numeric | 1 to 32 | Customer city or town.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ StateProvince | *Yes / One | Alpha-numeric | 1 to 32 | Customer state, province or region.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ PostalCode | *Yes / One | Alpha-numeric | 1 to 15 | Customer zipcode or postalcode.
SalesOrderEntry/ SalesOrder/ OrderSummary/ BillTo/ CountryCode | No / Zero or One | Alpha-numeric | 2 | Customer ISO country code. If no country code is provided, the country code found in Company/My Company will be used.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo | No / One | Container |  | Container for the shipping information. If this container is not provided, the customer information will be used as the ship to information.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ PrimaryName | *Yes / One | Alpha-numeric | 1 to 32 | Customer or company name.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ Contact | No / Zero or One | Alpha-numeric | 1 to 32 | Customer contact, used for mostly businesses.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ Address1 | *Yes / One | Alpha-numeric | 1 to 32 | Customer address line 1.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ Address2 | No / Zero or One | Alpha-numeric | 1 to 32 | Customer address line 2.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ CityTown | *Yes / One | Alpha-numeric | 1 to 32 | Customer city or town.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ StateProvince | *Yes / One | Alpha-numeric | 1 to 32 | Customer state, province or region.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ PostalCode | *Yes / One | Alpha-numeric | 1 to 15 | Customer zipcode or postalcode.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ CountryCode | No / Zero or One | Alpha-numeric | 2 | Customer ISO country code. If no country code is provided, the country code found in Company/My Company will be used.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ DropShipIndicator | No / Zero or One | Empty | 0 | Flag indicating this order is to be drop shipped. True if this container is present, false otherwise.
SalesOrderEntry/ SalesOrder/ OrderSummary/ ShipTo/ BlindShipIndicator | No / Zero or One | Empty | 0 | Flag indicating this order is to be blind shipped. True if this container is present, false otherwise.
SalesOrderEntry/ SalesOrder/ ItemDetails | Yes / One to Many | Container |  | Container tag for each line item in the sales order.
SalesOrderEntry/ SalesOrder/ ItemDetails/ ItemID | Yes / One | Alpha-numeric | 1 to 15 | SKU/UPC code for the line item.
SalesOrderEntry/ SalesOrder/ ItemDetails/ Description | No / Zero to One | Alpha-numeric | 1 to 64 | Short description of the line item.
SalesOrderEntry/ SalesOrder/ ItemDetails/ Quantity | Yes / One | Numeric | Float | Quantity of the line item being ordered.
SalesOrderEntry/ SalesOrder/ ItemDetails/ UnitPrice | Yes / One | Numeric | Float | Unit price of the line item being ordered.
SalesOrderEntry/ SalesOrder/ ItemDetails/ SalesTax | No / Zero to One | Numeric | Float | Sales tax of the line item being ordered. This field must match one of the sales tax rates define in PhreeBooks to properly alloate the tax to the proper tax authorities.

## 4.2 Response Request Interface Specification

*Yes - will be present if the container tag is present.

Element (XMLPath) | Required/Cardinality | Type | Length | Description/Values

## 4.3 Examples

# 5.0 Programming Information

## 5.1 Access Request Interface Specification

## 5.2 Response Request Interface Specification

## 5.3 Examples

# 6.0 Appendices

## 6.1 Glossary

## 6.2 Return Status and Error Codes

## 6.3 Reference Tables

## 6.4 Frequently Asked Questions

##