Post on 30-Sep-2018
1
Application Programming Interface (API) Guide
2
Table of Contents
Release Notes ………………………………………………………………………………..…………………………………………………..….3
Introduction……………………………………………………………….………………………….……………………………………………….9
Prerequisites ………………………………………………………,………………………………….………………………………………….….9
Installation Instructions……………………………………………………………………………….….………………………………………9
API Support Policy……………………………………………………………………………………..……………………………………….…13
Using the M.O.M. API………………………………………………………………………………….…………………………………………13
API Functions…………………………………………………………………………………………………..………………………………….…14
Frequently Asked Questions………………………………………………………………………………………………………………..198
Appendix A (Sample Code)…………………………………………………………………………………………………………………..199
Appendix B (Data Dictionary)……………………………………………………………………………………………………….……..278
Reference……………………………………………………………………………………………………………………………………………337
3
Release Notes
Version Date Notes
1.5.1000 03/27/2012
Product Attribute related functions o Product_Attribute_Create() o Product_Attribute_Data_Get_XML() o Product_Attribute_Delete() o Product_Attribute_Info() o Product_Attribute_Mapping_Create() o Product_Attribute_Mapping_Data_Get_XML() o Product_Attribute_Mapping_Delete() o Product_Attribute_Mapping_Info() o Product_Attribute_Value_Create() o Product_Attribute_Value_Delete() o Product_Attribute_Value_Info()
Miva related functions:
o Product_Miva_SKU_Create() o Product_Miva_SKU_Info() o Product_Miva_SKU_Data_Get_XML() o Product_Miva_FeedMgr_Create() o Product_Miva_FeedMgr_Delete() o Product_Miva_FeedMgr_Info() o Product_Miva_FeedMgr_Get_XML()
Purchase related functions:
o Purchase_Receive_Product_All() o PurDetail_Receive_Product() o PurDetail_Deliverto()
Inventory related functions: o Inventory_Process_Updates()
Tax related functions: o Tax_SalesTaxRate_Avalara()
1.4.1002 03/20/2012 Patch Release
Fixed issue with DB_CONNECT_VFP() function. The build, version, and license properties were not being set after call to function.
Product_Miva_SKU_Create(). Fixed issue with SKU parameter is being ignored when MIVA tables are created. It was following MOM’s default behavior of using the 1st 10 characters of the MOM stock Item Number. Also, fixed COM Exception when the system is using a VFP backend.
Product_Miva_FeedMgr_Info(). COMException occurs when a stock item number already exists in FeedMgr table.
4
Product_Miva_FeedMgr_Get_XML(). Changed input parameter to be the MOM Stock Item Number instead of the MIVA Sku.
Fix COMException with mom_api.momparams object.
Miva related functions: Product_Miva_SKU_Create() Product_Miva_SKU_Info() Product_Miva_SKU_Data_Get_XML() Product_Miva_FeedMgr_Create() Product_Miva_FeedMgr_Delete() Product_Miva_FeedMgr_Info() Product_Miva_FeedMgr_Get_XML()
5
1.4.1001 03/02/2012
Patch Release Fix COM Exception was unhandled error: Creating an instance of the COM component with CLSID {97EDD412-0626-4E89-A344-3F344F00E93D} from the IClassFactory failed due to the following error:80004005.
1.4.1000 02/21/2012
Shipping related functions: Get shipping method
Shipping_Method_Get_XML() Shipping_Method_Set_Data_Pull() Shipping_Method_Get_Data_Pull()
Accounting related functions: Get Credit Card Merchant Accounts
Accounting_CCMerchantAccount_Get_XML Accounting_CCMerchantAccount _Set_Data_Pull () Accounting_CCMerchantAccount_Get_Data_Pul ()
Update sales tax rates
Tax_National_SalesTaxRate() Tax_State_SalesTaxRate() Tax_County_SalesTaxRate() Tax_Zip_SalesTaxRate()
Output sales tax rates
Tax_National_SalesTaxRate_Get_XML() Tax_National_SalesTaxRate_Set_Data_Pul() Tax_National_SalesTaxRate_Get_Data_Pul ()
Tax_State_SalesTaxRate_Get_XML () Tax_State_SalesTaxRate_Set_Data_Pull() Tax_State_SalesTaxRate_Get_Data_Pul ()
Tax_County_SalesTaxRate_Get_XML () Tax_County_SalesTaxRate_Set_Data_Pull () Tax_County_SalesTaxRate_Get_Data_Pul ()
Tax_Zip_SalesTaxRate_Get_XML () Tax_Zip_SalesTaxRate_Set_Data_Pull () Tax_Zip_SalesTaxRate_Get_Data_Pul ()
Order related functions:
Order_Payment_PP() – Allow paypal orders. Order_Payment_CC_Ex() – Allow Pre-paid Credit Cards
Bug fixes
Shipping is not updated using Order_Shipping() with llShipModify parameter.
Price is not updated when using OrdDetail_Create() with llUse_Price parameter.
1.3.1000 01/20/2012
Order related functions: Update order fulfillment status
6
(Picked, Packed, marked as Shipped, Invoiced) Order_Process_Pick() Order_Process_Pack() Order_Process_Invoice() Order_Process_ForceShip()
Cancel an order Order_Cancel()
Update pick location of order line item OrdDetail_SetPickLocation()
Box tracking information Order_Box_SetTracking()
Output related functions:
Get status and box information of order Order_Status_Get_XML() Order_Box_Get_XML() Order_BoxContent_Get_XML()
Get full order information Order_Data_Get_XML()
Get invoice information Invoice_Data_Get_XML ()
Get Stock Bin locations Stock_Bin_Get_XML()
7
1.2.1001 01/06/2012
Patch Release Customer_Create() – corrected invalid return value of 1 Order_Get() – revert changes to XML tag. Next release will have new
Order_Get_XML() function with descriptive XML tag Customer_Get() – revert changes to XML tag. Next release will have new
Customer_Get_XML() function with descriptive XML tag
1.2.1000 12/20/2011
Introduce order import like functions Set Order Hold Status Stop Order for Review Set Alternate IDs:
Alternate Order ID Internet ID
Modify Order Instructions/Notes Introduce customer written/phone contact functions
Create Customer Contact Entry Delete Customer Contact Entry Update Customer Contact Entry Get Customer Contact Entries
1.1.1001 12/14/2011
Patch Release:
OrdDetail_Create()- Erroneous Error message: “Quantity is a required parameter for the OrdDetail_Create function call.”
Order_Get() – Parsing Error: Encrypted Credit Card XML parsing issue. Stock_Create() - Erroneous Error message: “Stock number already exists.”.
1.1.1000 11/15/2011
New Purchase Order related functions. Additional Order related function
1.0.3000 11/07/2011
Patch Release
Stock_Get()- COM error “Order_Address” functions - COM errors
1.0.2000 10/21/2011
Patch Release
COM exception error
1.0.1000 10/17/2011
Data pull functions:
Customer Stock Orders
Receive payment authorization Echeck Credit Card
Update Order Addresses Update Order Line Item information
1.0.0000 10/01/2011 Initial Release
8
Here’s the new functionality:
Product Related Functions Product_Attribute_Create() Product_Attribute_Data_Get_XML() Product_Attribute_Delete() Product_Attribute_Info() Product_Attribute_Mapping_Create() Product_Attribute_Mapping_Data_Get_XML() Product_Attribute_Mapping_Delete() Product_Attribute_Mapping_Info() Product_Attribute_Value_Create() Product_Attribute_Value_Delete() Product_Attribute_Value_Info()
Miva Product Related Functions Product_Miva_SKU_Create() Product_Miva_SKU_Info() Product_Miva_SKU_Data_Get_XML() Product_Miva_FeedMgr_Create() Product_Miva_FeedMgr_Delete() Product_Miva_FeedMgr_Info() Product_Miva_FeedMgr_Get_XML()
Purchase Related Functions Purchase_Receive_Product_All() PurDetail_Receive_Product() PurDetail_DeliverTo()
Inventory Related Functions Inventory_Process_Updates()
Tax Related Functions Tax_SalesTaxRate_Avalara()
9
Introduction The M.O.M. API is a programmable interface that provides access to your M.O.M. system information using simple, powerful and secure application programming interfaces. To use this document and the API, you must have software development, programming and M.O.M. usage experience. The API was developed to provide high-level business-based transaction functions to interface with major areas of M.O.M., including Order, Customer, Stock and Inventory. By using the API instead of going directly to the database, data and usage is validated by M.O.M.’s business logic. Transaction and data integrity is preserved the same way as if the data was entered through the User Interface.
Prerequisites
The API is developed to support M.O.M. 8.x The API will run on Microsoft Windows XP, Windows Vista and Windows 7 32-bit/64-bit The API is a COM-based interface thus programs working with M.O.M 8 API must allow use of a
COM-based interface M.O.M. Workstation 8 is installed. .Net Framework 4.0
Installation Instructions
1. Log into the PC where API will be installed using a valid Windows account with admin rights.
2. Log into the Dydacomp support site: http://dydacomp.com/support.
3. Under On-Line Technical Support and Downloads, select Misc. Utilities and MOM 8 then click Go.
4. Click the link for M.O.M. API Installer to begin the download and save the file (MOM_API.exe) to a folder on the PC and note the location.
5. Go to Control Panel to unininstall the existing M.O.M. API install.
6. Go to the Windows System folder to verify the following 4 files are not found. If found, delete them manually:
10
7. Launch the installer.
8. Follow the on-screen instructions to finish the install.
9. Make sure “Install Samples” is checked to save the sample documentation/code and MOM API User Guide to the specified location.
10. Verify the install, as well as the API version, by viewing the Windows Add/Remove Programs screen (Figure 1) or viewing the Windows system folder (Figure 2).
Figure 1a Windows 7 Programs and Features screen
11
Figure 1b WindowsXP Add/Remove Programs screen
Figure 2a Windows7 64-bit system folder shows the MOM API files
12
Figure 2b Windows XP system folder shows the MOM API files
NOTE: All 3 mom_api.* files must have the same Modified date. If not, uninstall (remove) the MOM API, then delete all 3 mom_api.* files, then reinstall the MOM API.
13
API Support Policy
The API is developed to work with M.O.M. version 8.x. All questions regarding the API should be directed to customer support. Dydacomp does not guarantee that an application written against one API version will work with future API versions. Our intent is to keep the API consistent from version to version and minimize changes required to port applications to newer API versions.
The API version supported coincides with the support lifecycle of the product version. This means that as long as M.O.M. 8 is not end-of-life and is supported, the API will be supported.
Dydacomp provides support for the M.O.M. API but not programming advice and resources to interface with the API. It is assumed that the programmer working with the API will have the technical expertise on the language they chose to interface with the API. In the How-To Sample Code section later in this guide, we provide sample codes for several different programming languages to illustrate using the API to complete common transactions.
If you require professional services to support your API programming needs, please contact our customer support at (800) 858-3666.
Using the M.O.M. API
The M.O.M. API is a programmable interface that enables other programs to exchange data with the M.O.M. database. This is a COM based interface and an instance of the API must be created and used as a reference for all the functions supported by the API.
There are specific functions in the API that must be called to establish the working environment. They need to be called in a set order before using the API to exchange data with the M.O.M. system. These functions are listed in the appendix. Also, the API offers specific functions to help make working with orders, stock items and customers more streamlined.
Establish the working environment Before you can use the API, you need to create an instance of the API object based on its class definition, and store the reference to the object you create for all future calls. An instance of the API is created by using the CREATEOBJECT command in the programming language you are using to access the API. The class definition of the MOM API is mom_api.momfunctions.
Example: ox = CreateObject(“mom_api.momfunctions”)
14
ox now contains a reference to the M.O.M. API object and all of the API functions/properties are exposed to it. There are two additional function calls that MUST be made, in sequence, to complete the API to M.O.M. connection. These only need to be called once for each session.
1. Connect the API to a specific M.O.M. database. If using the SQL version of M.O.M., use the DB_Connect_SQL function. For the FoxPro version of M.O.M., use the DB_Connect_VFP function.
2. Log into the API with a valid M.O.M. user ID and password. It is highly recommended that you do not use a login ID that is active in M.O.M. during the time the API will be in use.
API Functions
System Related Functions The following functions allow you to connect and login to the API.
The System Related Functions include:
DB_Connect_SQL DB_Connect_VFP Log_In Add_Parameter Clear_Parameters Get_Parameter_Count Is_Parameter Is_ParameterList_ok
15
DB_Connect_SQL This function connects the API to a specified SQL M.O.M. database.
Parameters:
Name Description Required
lcConnStr String value - connection information for the server and database the API will connect to
Yes
Return Values:
Return Value Description
-1 Failure to connect to specified server/database
Positive Value Success
Output: None
Examples:
Visual FoxPro:
Connecting using a trusted connection:
nRetVal = ox.DB_Connect_SQL(“Driver=SQL Server;server=momserver;database=mailordermanager”)
Connecting using a non trusted connection:
nRetVal = ox.DB_Connect_SQL(“Driver=SQL Server;server=momserver;database=mailordermanager;uid=userid;pwd=password;trusted_connection=no”)
16
DB_Connect_VFP This function connects the API to a specified FoxPro M.O.M. database.
Parameters:
Name Description Required
lcMainDir String value - full path to the folder where specific company M.O.M. database (momdata.dbc) resides
Yes
lcSharedDir String value - full path to the folder where shared M.O.M. database (momshare.dbc) resides
Return Values:
Return Value Description
-1 Failure to connect to M.O.M. database
Positive Value Success
Output: .Error_Msg will contain reason for failed connection.
Examples:
Visual FoxPro:
nRetVal = ox.DB_Connect_VFP(“E:\MOMWIN\Company2”,”E:\MOMWIN”)
17
Log_In This function must be called after connecting to a VFP or SQL M.O.M. database. You will need a valid M.O.M. user login ID and password to use the API.
Parameters:
Name Description Required
lcUserCode String value - valid three character M.O.M. Login ID
Yes
lcUserPassword String value - valid password for M.O.M. Login ID
Yes
Return Values:
Return Value Description
-1 Failure to log in
1 Successfully logged in
Output: ox.Error_Msg will contain reason for failed log in attempt.
Examples:
Visual FoxPro:
nRetVal = ox.Log_In(“MOM”,”Password”)
18
Add_Parameter This function returns the number of parameters added using the ADD_PARAMETER() API function.
Parameters:
Name Description Required
lcFieldName Field Name Yes
lcValue String representation of field names data type. See Function’s optional parameter table.
No
Return Values:
Return Value Description
-1 Failed to add parameter
1 Successfully added parameter
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Add_Parameter(‘NTAXR’,’’)
19
Clear_Parameters This function clears the parameters that were added using the ADD_PARAMETER() API function.
Parameters:
Name Description Required
None
Return Values:
Return Value Description
-1 Failed to clear the parameters added using the ADD_PARAMETER()
1 Successfully cleared the parameters added using the ADD_PARAMETER()
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Clear_Parameters()
20
Get_Parameter_Count This function returns the number of parameters added using the ADD_PARAMETER() API function.
Parameters:
Name Description Required
None
Return Values:
Return Value Description
-1 Failed to determine parameter count
Zero value or positive value If successful, returns the number of parameters added using the ADD_PARAMETER()
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Get_Parameter_Count()
21
Order Related Functions The following functions expose the ability to modify existing or new orders in the M.O.M. database. You can work on multiple orders at the same time using this API. By default, the API will not automatically save changes to the database for new orders created using the Order_Create function if the reference to the API object is released before explicitly calling the Order_Save function for each open order. To override this default behavior, set the Save_Partial_Orders property of the API object to True. This can be done as follows:
ox.Save_Partial_Orders = .t.
Before working on an order, you either have to create a new order using the Order_Create function, or open an existing order using the Order_Modify function. You can create and edit as many orders as you want in a single session, as all the other order related functions accept the order number as a parameter.
The data dictionary, located in the M.O.M. help file, provides definitions of every field of information stored in the CMS file.
The Order Related Functions Include: Order_Create Order_Modify Order_Save Order_Payment_CC Order_Payment_CC_Auth Order_Payment_EC Order_Payment_EC_Auth Order_Payment_CK Order_Payment_IN Order_Payment_COD Order_Payment_PP Order_Sales_Info Order_Promotion Order_Shipping Order_Calculate_Totals Order_Address_ShippingType Order_Address_BillTo Order_Address_ShipTo Order_Address_SoldTo Order_Add_Item OrdDetail_Delete OrdDetail_Info OrdDetail_Address
22
OrdDetail_GiftMessage Order_Hold Order_StopReview Order_Notes Order_BoxLabel Order_Instructions Order_Memo_Default Order_Memo_Custom Order_Alternate_ID Order_Internet_ID
Order_Create This function is used to create a new order in the M.O.M. database. You need to supply the M.O.M. customer number that will be the bill-to customer for the order. Optionally, you can also set the ship-to customer, sold-to customer and type of order.
Parameters:
Name Description Required
lnCustnum Integer value – M.O.M. customer number. This will be the bill-to customer for the order.
Yes
lnShipNum Integer value – M.O.M. customer number. This will be the ship-to customer for the order.
No – default 0
lnSoldNum Integer value – M.O.M. customer number. This will be the sold-to customer for the order.
No – default 0
lcShipType String value - Order shipping type. If not blank, value must be one of the following: B, S, M, G
B = Billing Address is same as Shipping address
No – default ‘B’
23
S = Separate Shipping Address for Entire Order
M = Multiple – Separate Shipping Address for each Line Item
G = Gift Order – One or More Recipients
Return Values:
Return Value Description
-1 Failure to create new order
Positive value New Order Number – required for other order specific functions
Output: ox.Error_Msg will contain reason why system could not create new order.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Create(1001,0,0,’B’)
24
Order_Modify This function must be called once before modifying an existing order in the M.O.M. database. If the order is being accessed in the M.O.M. system, the API will not be able to modify it. If the API can grab the order, users in the M.O.M. system will not be able to access the order until the API releases it.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure - could not modify order
1 Success
Output: ox.Error_Msg will contain reason why system could not modify the order.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(1001)
25
Order_Save This function will save any changes you have made to the order; release the hold on the order the API has, and makes the order available in the M.O.M. system.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Save(1001)
26
Order_Payment_CC This function will set the payment method for an order to credit card.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcCardType String value – two digit M.O.M. credit card type value
Yes
lcCardNumber String value – credit card number **
Yes
lcExp_Date String value – credit card expiration date format MM/YY
Yes
lcCC_CVC String value – credit card CVC code
No
Return Values:
Return Value Description
-1 Failure
1 Success
** The credit card number can be passed in as plain text, or as an encrypted value as long as you set the Enc_Key and Enc_Type properties of the API. See the Reference section for supported encryption types.
If lcReference and paid are set the order will be marked as pre-paid and ignore the pre-approval information.
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_CC(1001,’VI’,’4444333322221111’,01/13’,1234’)
27
Order_Payment_CC_Ex This function will set the payment method for an order to credit card. Similar to Order_Payment_CC(), but provides additional parameters. The card holder name, the pre-paid amount, and pre-paid reference information.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcCardType String value – two digit M.O.M. credit card type value
Yes
lcCardNumber String value – credit card number **
Yes
lcExp_Date String value – credit card expiration date format MM/YY
Yes
lcCC_CVC String value – credit card CVC code
No
lcCardHolder Name on Credit Card No
lcReference Reference for pre-paid amount No
lnPaid Pre-Paid Amount. If not zero, the pre-approval information is ignored.
No
Return Values:
Return Value Description
-1 Failure
1 Success
** The credit card number can be passed in as plain text, or as an encrypted value as long as you set the Enc_Key and Enc_Type properties of the API. See the Reference section for supported encryption types.
28
If lcReference and paid are set the order will be marked as pre-paid and ignore the pre-approval information.
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_CC_Ex(1001,’VI’,’4444333322221111’,01/13’,1234’, ‘John Doe’, “ref123”, 24.98)
29
Order_Payment_CC_Auth This function will set the payment method for an order to credit card with a payment authorization code.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcCardType String value – two digit M.O.M. credit card type value
Yes
lcCardNumber String value – credit card number **
Yes
lcExp_Date String value – credit card expiration date format MM/YY
Yes
lcCC_CVC String value – credit card CVC code
No Default: Empty String
lcRcode String value – response code of the transaction
Yes
lcApproval String value – approval code of the transaction
Yes
lcAnTrans_id String value – transaction id for this authorization.
Yes
lnAuth_Amt Number value – dollar amount that has been authorized.
Yes
lcAuth_Time String value – datatime format
YYYY-MM-DD
Yes
lcAVS String value -Address verification response
No Default: Empty String
lcCardHolder String value – name as it appears on the credit card.
No Default: Empty String
30
lcReference String value- Extra info regarding pre-payment amount
No Default: Empty String
lnPaid Number value- Pre-payment amount
No Default: 0.00
Return Values:
Return Value Description
-1 Failure
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
** The credit card number can be passed in as plain text, or as an encrypted value as long as you set the Enc_Key and Enc_Type properties of the API. See the Reference section for supported encryption types.
If lcReference and paid are set the order will be marked as pre-paid and ignore the pre-approval information.
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_CC_Auth(
1001,’VI’,’4444333322221111’,’01/13’,1234’,’1’,’1234567890’,’12345’, 99.99, ”2011-10-19”, “”,””,””,0
)
31
Order_Payment_EC This function will set the payment method for an order to eCheck.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcRoutingNum String value – ABA Routing No Default: empty string
lcBankName String value – Bank No Default: empty string
lcAccountNum String value – Account No Default: empty string
lcAcctType2 String value – P or B No Default: empty string
lcAcctType String value – Checking or Savings
No Default: empty string
lcCheckNum String value – Check No Default: empty string
lcCardHolder String value – Account Holder No Default: empty string
lcBankState String value –Bank State No Default: empty string
lcDrlicense String value –Driver’s License No Default: empty string
lcDlState String value –License State No Default: empty string
** If parameter is not required, you will still need to pass the default parameter value.
Return Values:
Return Value Description
-1 Failure
1 Success
32
** The routing number and account number can be passed in as plain text, or as an encrypted value as long as you set the Enc_Key and Enc_Type properties of the API. See the Reference section for supported encryption types.
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_EC(
10031,’999999999’,’XYZ Bank’,’111111111’,’P’,’Checking’,’0755’,’123456’,’’,’’,’’)
33
Order_Payment_EC_Auth This function will set the payment method for an order to eCheck with a payment authorization code.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcRoutingNum String value – ABA Routing Yes
lcBankName String value – Bank Yes
lcAccountNum String value – Account Yes
lcAcctType2 String value – P or B No Default: empty string
lcAcctType String value – Checking or Savings
Yes
lcCheckNum String value – Check No Default: empty string
lcCardHolder String value – Account Holder No Default: empty string
lcBankState String value –Bank State No Default: empty string
lcDrlicense String value –Driver’s License No Default: empty string
lcDlState String value –License State No Default: empty string
lcRcode String value- Response code of the transaction. For an authorize.net account this field should be 1= approved. 2 = declined. This should always be a 1 because you should not allow an order to go through on the web if the eCheck is declined.
Yes
lcApproval String value-Approval code of the transaction provided by authorize.net
Yes
lcAnTrans_id String value – the authorize.net Yes
34
transaction ID for this authorization. This must be filled in otherwise the system will not be able to locate the authorization on authorize.net to capture the funds. The Authorize.net transaction ID is 9 digits long.
lnAuth_Amt Number value – dollar amount that has been authorized.
Yes
lcAuth_Time String value – datatime format :
YYYY-MM-DD
Yes
Note: If not passing in parameter value, use empty string for string parameters and zero for numeric parameters.
Return Values:
Return Value Description
-1 Failure
1 Success
** The routing number and account number can be passed in as plain text, or as an encrypted value as long as you set the Enc_Key and Enc_Type properties of the API. See the Reference section for supported encryption types.
If lcReference and paid are set the order will be marked as pre-paid and ignore the pre-approval information.
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_EC_Auth(
35
10031,’999999999’,’XYZ Bank’, ‘111111111’, ’P’, ’Checking’, ’0755’, ’123456’, ’’,’’,’’, ,’1’,’1234567890’,’123456789’,99.99,’2011-10-19’)
Order_Payment_CK This function will set the payment method for an order to check.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcCheckNum String value – Check number Yes
lnCheckAmount Numeric value – Check amount Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_CK(1001,’12345’,10.95)
Order_Payment_IN This function will set the payment method for an order to invoice.
Parameters:
Name Description Required
36
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lnDiscountPercent Numeric value – discount percentage if offering terms
No
lnDiscountDays Numeric value – discount days if offering terms
No
lnDueDays Numeric value – due days if offering terms
No
lcPoNumber String value – purchase order number
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_IN(1001,5,10,30,’PO12345’)
37
Order_Payment_COD This function will set the payment method for an order to COD.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
llCashOnly No
llFedExAnyPayment No
llFedExGuaranteedFunds No
llFedExCurrency No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Payment_COD(1001)
38
Order_Payment_PP This function will set the payment method for an order to PayPal.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcPayPalid String value – The PayPal ID (Typically E-Mail Address) of the Buyer.
Yes
lcAnTrans_id String value – 17 Digit Code that comes back from PayPal called the txn_id value.
Yes
lnAuth_Amt Number value – dollar amount of the PayPal Transaction
Yes
lcAuth_Time String value – datatime format
YYYY-MM-DD
The date and time in which the PayPal Transaction was completed.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
39
Visual FoxPro:
nRetVal = ox.Order_Payment_PP(1001)
40
Order_Sales_Info This function allows you to set specific data elements related to sales information on the order.
Parameters:
Name Description Required
lnOrderNo Integer value –M.O.M. order number to modify.
Yes
lcSourceKey String value – source key for order.
No
lcCatalog_Code String value – catalog code for order
No
lcSales_ID String value – M.O.M. sales ID for order.
No
lcOrder_Type String value – M.O.M. order type.
No
lcOrder_Priority String value – M.O.M. order priority. Either blank or ‘H’ for high priority.
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Sales_Info(1001,’SOURCE11’,’CAT11’,’MOM’,’WEB’,’H’)
41
Order_Promotion This function allows you to set or remove an order promotion code on the order.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcOrdPromo String value – M.O.M. order promotion code.
No
llRemove Boolean value – will remove any existing order promotion from the order if True.
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Promotion(1001,’PROMO11’)
42
Order_Shipping This function allows you to set specific the shipping method, charges and ship ahead flag on the order.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcShippingMethod String value – M.O.M. shipping method code.
Yes
llShipAhead Boolean value – True to ship available items now, False to wait for all items to be filled before shipping.
No
lnShippingAmount Numeric value – fixed shipping amount to be used for the order.
No
llShipModify Boolean value – setting to True will lock shipping charge at it’s current value.
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Shipping(1001,’UPS’,.F.,10.95,.T.)
43
Order_Calculate_Totals This function will calculate the order total by running the same business logic used in M.O.M. Order promotions, shipping calculations and tax calculations are all performed in this step.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Calculate_Totals(1001)
44
Order_Address_ShippingType This function is used to update the shipping type of an order in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnBillNum Integer value –M.O.M. Bill-to customer number to modify.
Yes
lnShipNum Integer value –M.O.M. Ship-to customer number to modify.
Yes
lnSoldNum Integer value –M.O.M. Sold-to customer number to modify.
No Default: 0
lcShipType String value - Order shipping type. If not blank, value must be one of the following: B, S, M, G
B = Billing Address is same as Shipping address
S = Separate Shipping Address for Entire Order
M = Multiple – Separate Shipping Address for each Line Item
G = Gift Order – One or More Recipients
No Default: Empty String
Notes:
When lcShipType=’B’, lnShipNum must be zero
When lcShipType=’S’, lnShipNum must be greater than zero
When lcShipType=’G’, lnShipNum must be zero
When lcShipType=’M’, lnShipNum must be zero
Return Values:
45
Return Value Description
-1 Failure to add line item
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
Output: ox.Error_Msg will contain reason why system could not update order.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Address_ShippingType(123456789, 1234, 2468, 3691, ’S’)
46
Order_Address_BillTo This function is used to update the bill-to address of an order in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnBillNum Integer value –M.O.M. Bill-to customer number to modify.
Yes
Return Values:
Return Value Description
-1 Failure to add line item
1 Success
Output: ox.Error_Msg will contain reason why system could not update order.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Address_Billto(123456789, 1234)
47
Order_Address_ShipTo This function is used to update the ship-to address of an order in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnShipNum Integer value –M.O.M. Ship-to customer number to modify.
Yes
Return Values:
Return Value Description
-1 Failure to add line item
1 Success
Output: ox.Error_Msg will contain reason why system could not update order .
Examples:
Visual FoxPro:
nRetVal = ox.Order_Address_Shipto(123456789, 1234)
48
Order_Address_SoldTo This function is used to update the sold-to address of an order in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnSoldNum Integer value –M.O.M. Sold-to customer number to modify.
Yes
Return Values:
Return Value Description
-1 Failure to add line item
1 Success
Output: ox.Error_Msg will contain reason why system could not update order.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Address_Soldto(123456789, 1234)
49
Order_Add_Item This function is used to add a new line item to an order in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lcItem String value - full M.O.M. stock number of item to be added.
Yes
lnQuantity Numeric value – quantity of item to add to the order.
Yes
llUse_Price Boolean value - If True, you must also pass the lnPrice and lnDiscount parameters.
No – default False
lnPrice Numeric value – selling price of item.
No
lnDiscount Integer value – discount on item. No
lnShip_to Integer value – ship-to customer number for item. (Used for Multiple ship-to and Gift-to orders)
No
lcShip_Via String value – Valid three character M.O.M. shipping code. Shipping method for this item.
No
lcGiftMsg1 String value – gift message line 1 No
lcGiftMsg2 String value – gift message line 2 No
lcGiftMsg3 String value – gift message line 3 No
lcGiftMsg4 String value – gift message line 4 No
lcGiftMsg5 String value – gift message line 5 No
lcGiftMsg6 String value – gift message line6 No
50
Return Values:
Return Value Description
-1 Failure to add line item
1 Success
Output: ox.Error_Msg will contain reason why system could not add line item.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Add_Item(1001,’A-OTHER’,1,.T.,100,10)
51
OrdDetail_Create This function is used to add a new line item to an order in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lcNumber String value - full M.O.M. stock number of item to be added.
Yes
lnQty Numeric value – quantity of item to add to the order.
Yes
llUse_Price Boolean value - If True, you must also pass the lnPrice and lnDiscount parameters. If FALSE, MOM will set default price and discount.
No – default False
lnPrice Numeric value – selling price of item.
No
lnDiscount Integer value – discount on item. No
Return Values:
Return Value Description
-1 Failure to add line item
Positive value Success
Output: ox.Error_Msg will contain reason why system could not create line item.
Examples:
Visual FoxPro:
nRetVal = ox.OrdDetail(1001,’A-OTHER’,1,.T.,100,10)
52
OrdDetail_Delete This function is used to update the Order Line Item general info in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnItem_id Integer value –Order Line Item ID
Yes
lcReasonCode String value – M.O.M. Reason Code
Yes
Return Values:
Return Value Description
-1 Failed to update
1 Success
Output: ox.Error_Msg will contain reason why system could not delete line item.
Examples: Visual FoxPro: nRetVal = ox.OrdDetail_Delete(123456789, 8888, ‘Z’)
53
OrdDetail_Info This function is used to update the Order Line Item general info in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnItem_id Integer value –Order Line Item ID
Yes
lnOrderQty Integer value – Order Qty of line item
No Default: 0
lnDisc Integer value - Discount % off No Default: 0
lcCustInfo String value – Line Item Custom Info
No Default: Empty String
lcShip_When String value – Order Line Item Schedule Shipment Date
No Default: Empty String
lcShipVia String value – Order Line Item Special Shipping Via (Optional)
No Default: Empty String
Return Values:
Return Value Description
-1 Failed to update
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
Output: ox.Error_Msg will contain reason why system could not add line item.
Examples: Visual FoxPro: nRetVal = ox.OrdDetail_Info(1534, 2021, 2, 0,’****’,’’,’UPN’)
54
OrdDetail_Address This function is used to update the order line item address in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnItem_id Integer value –Order Line Item ID
Yes
lnCustNum Integer value – M.O.M. customer number. This will be the Ship-to or Gift-to customer number for the order.
Yes
Return Values:
Return Value Description
-1 Failed to update
1 Success
Output: ox.Error_Msg will contain reason why system could not update line item.
Examples:
Visual FoxPro:
nRetVal = ox.OrdDetail_Address(123456789, 8888, 1234)
55
OrdDetail_GiftMessage This function is used to update the order line item gift message in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number the item belongs to.
Yes
lnItem_id Integer value –Order Line Item ID
Yes
lcGiftMsg1 String value – gift message line 1 No Default: Empty String
lcGiftMsg2 String value – gift message line 2 No Default: Empty String
lcGiftMsg3 String value – gift message line 3 No Default: Empty String
lcGiftMsg4 String value – gift message line 4 No Default: Empty String
lcGiftMsg5 String value – gift message line 5 No Default: Empty String
lcGiftMsg6 String value – gift message line 6 No Default: Empty String
Return Values:
Return Value Description
-1 Failed to update
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
Output: ox.Error_Msg will contain reason why system could not update line item.
Examples:
Visual FoxPro:
nRetVal = ox.OrdDetail_GiftMessage(123456789, 8888, ‘you,’say’,’goodbye’,’I’,’say’,’hello’)
56
Order_Hold This function is used to put an order on Hold in the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number.
Yes
lnHoldType Integer value – Hold Type.
0 = Remove from Hold 1 = Do Not Ship/Manifest Until 2= Do Not Process Order Until 3= On Permanent Hold
No – default 0
lcHoldReason String value – Valid M.O.M. Order Hold Reason Code.
No – default: Empty String
lcHold_Until String value – Date YYYY-MM-DD
Yes – when lnHoldType = 1 or 2
Return Values:
Return Value Description
-1 Failure to create new order
1 Success
Output: ox.Error_Msg will contain reason why system could not put order on hold.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Hold(1001,1, ’H1’, ‘2011-11-30’)
57
Order_StopReview This function stops an order for review and prevents further processing of order. Once order is marked, it requires a manager’s Authorization to release the order for processing.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcComment Stop Review Comment No
llRelease Release from Order Review. User must be a manager to release order for processing.
No Default: false
58
Return Values:
Return Value Description
-1 Failure - could not modify order
1 Success
Output: ox.Error_Msg will contain reason why system could not stop order for review.
Examples:
Visual FoxPro:
nRetVal = ox.Order_StopReview(1001,”API”, .F.)
59
Order_Notes This function will update the Order Notes of a specified Order Number. Left pane of Instructions/Notes tab on order entry screen.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcNote String value – Order Notes No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Notes(1001, “Order Notes”)
60
Order_BoxLabel This function will set the Instructions to Appear on All Box Labels of a specified Order Number. Center pane of Instructions/Notes tab on order entry screen.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcInstruct1 String value – Instructions to Appear on All Box Label Line 1.
No Default: Empty String
lcInstruct2 String value – Instructions to Appear on All Box Label Line 2.
No Default: Empty String
lcInstruct3 String value – Instructions to Appear on All Box Label Line 3.
No Default: Empty String
lcInstruct4 String value – Instructions to Appear on All Box Label Line 4.
No Default: Empty String
lcInstruct5 String value – Instructions to Appear on All Box Label Line 5.
No Default: Empty String
lcInstruct6 String value – Instructions to Appear on All Box Label Line 6.
No Default: Empty String
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_BoxLabel(1001,’line1’,’ line2’,’ line3’,’ line4’,’ line5’,’line6’)
61
Order_Instructions This function will update the Order Instructions of a specified Order Number. Right pane of Instructions/Notes tab on order entry screen.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcInstruct String value – Order Instructions No Default: Empty String
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Instructions(1001, “Order Instructions”)
62
Order_Memo_Default This function will update the Order Memo of a specified Order Number based on the source key parameter. Sales Information tab of order entry screen.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcSourceKey String value – Valid Source Key No Default: empty string
** If parameter is not required, you will still need to pass the default parameter value.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Memo_Default(1001, “Source Key”)
63
Order_Memo_Custom This function will update the Order Memo of a specified Order Number. Sales Information tab of order entry screen.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcLine1 String value – Order Memo Line 1 No Default: empty string
lcLine2 String value – Order Memo Line 2 No Default: empty string
lcLine3 String value – Order Memo Line 3 No Default: empty string
** If parameter is not required, you will still need to pass the default parameter value.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Memo_Custom(1001, “Line1”, “Line2”, “Line3”)
64
Order_Alternate_ID This function will update the Alternate Order ID of a specified Order Number
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcAlt_Order String value – Alternate Order ID No Default: empty string
** If parameter is not required, you will still need to pass the default parameter value.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Alternate_ID(1001, “ORD12345”)
65
Order_Internet_ID This function will update the Internet ID of a specified Order Number
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcInternetID String value – Internet ID No Default: empty string
** If parameter is not required, you will still need to pass the default parameter value.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Internet_ID(1001, “INET12345”)
66
Order_Process_Pick
This function performs the stage 1 order processing in MOM, if possible. Because this stage is the first stage, it is not latched to any other stage. However, depending on whether you require an order to be picked before or after the credit card is charged, this stage may be dependent on the completion of credit card approval before processing. Currently, MOM orders having Fedex shipping methods will not generate the tracking number. However, if the Fedex tracking number is generated externally, the tracking number can be updated using the ORDER_BOX_SETTRACKING() API function.
Notes:
Check status of order after running this function to determine if succesfull.
Pick List/Tickets can be completely eliminated from order processing. Some retail mail order companies prefer to pick from the packing slip instead. See Maintain Global Parameters - Forms.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number.
Yes
Return Values:
Return Value Description
-1 Failure to process order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.Order_Process_Pick(268380)
67
Order_Process_Pack
This function performs stage 2 order processing in MOM, if possible. This stage is dependent on completion of Stage 1 unless that stage is not included in order processing, and then the stage is dependent on Credit Card Processing. Currently, MOM orders having Fedex shipping methods will not generate the tracking number. However, if the Fedex tracking number is generated externally, the tracking number can be updated using the ORDER_BOX_SETTRACKING() API function.
Note: Check status of order after running this function to determine if succesfull.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure - could not process order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.Order_Process_Pack(268380)
68
Order_Process_Invoice
This function performs stage 11 order processing in MOM, if possible. For orders that must be shipped, this stage is dependent on the completion of Stage 10. For drop shipped orders, this stage is dependent on the completion of Stage 8-9. For service item orders that are not shipped or drop shipped, this stage is dependent only on the completion of Credit Card Processing.
Notes:
Check status of order after running this function to determine if succesfull. Some companies prefer to combine invoices with packing slips and pack the invoice right in the
customer's box. M.O.M. provides several options for this. See Maintain Global Parameters - Forms for more information.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
llInvoiceCopy Boolean value – Output Invoice Copy
Yes. Default=false
lcInvoicePart String value – invoice part Yes
if llInvoiceCopy is false, Default to empty string.
if llInvoiceCopy is true, set to empty for all invoices – Statement of the order. Set to specified inpart letter.
Return Values:
Return Value Description
-1 Failure - could not process order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
69
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.Order_Process_Pack(268380)
70
Order_Process_ForceShip
This function forces the status of the order to shipped, if possible.
Note: Check status of order after running this function to determine if succesfull.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure - could not process order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.Order_Process_ForceShip(268380)
71
Order_Box_SetTracking
This function updates the tracking number for a specified box of an order in MOM.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lnBox_Id Integer value – M.O.M. box id Yes
lcTrackingNo String value – tracking # Yes
lcShip_date String Value – YYYY-MM-DD Yes. A valid date string or empty string for blank date.
Return Values:
Return Value Description
-1 Failure - could not process order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.Order_Box_SetTracking(268380, 2345, “1Z27384901234”, “2012-02-20” )
72
Order_Cancel
This function cancels an order in MOM.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcLostCode String value – M.O.M. lost code Yes
lcReturnCode String value – M.O.M. return code
Yes
lcNotation String value – Notation for cancellation
No.
Return Values:
Return Value Description
-1 Failure - unable to perform action on order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.Order_Cancel(268380, “Z”, “L”,”not needed”)
73
OrdDetail_SetPickLocation()
This function sets the pick location of a line item on an order in MOM.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to modify.
Yes
lcItem_id Integer value – Line Item ID Yes
lcWarehouse String value – M.O.M. warehouse code
Yes
lcBinNumber String value – M.O.M. bin number.
Yes.
Return Values:
Return Value Description
-1 Failure - unable to perform action on order
1 Success
Output: ox.Error_Msg will contain reason why system could not perform action.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Modify(268380) nRetVal = ox.OrdDetail_SetPickLocation(268386, 295, "WHS2 ", "0001")
74
Customer Related Functions The following functions expose the ability to modify existing or new customers in the M.O.M. database. You can only work on a single customer at a time. After issuing a call to Customer_Create or Customer_Modify, the API exposes the values of the individual columns in a collection object named OCUST. The structure of this collection is objectname.fieldname. The object name for the customer collection is always OCUST. The first name value can be referenced as ox.OCUST.FirstName.
The data dictionary, located in the M.O.M. help file, provides definitions of every field of information stored in the CUST file.
The Customer Related Functions Include:
Customer_Create Customer_Modify Customer_Save Customer_Find Customer_Contact_Phone_Create Customer_Contact_Phone_Delete Customer_Contact_Phone Customer_Contact_Written_Create Customer_Contact_Written_Delete Customer_Contact_Written
75
Customer_Create This function allows you to create a new customer in the M.O.M. database. This function also sets the OCUST property of the API object to the data from the new customer so you can edit it directly.
Parameters: None
Return Values:
Return Value Description
-1 Failure
Positive Value Success – customer number of new record
Output: API property OCUST will contain all data from customer record.
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Create()
You can then set the values for each column in the table:
ox.OCUST.FirstName = ‘John’
ox.OCUST.Lastname = ‘Doe’
76
Customer_Modify This function allows you to edit an existing customer in the M.O.M. database. This function also sets the OCUST property of the API object to the data from the selected customer so you can edit it directly.
Parameters:
Name Description Required
lnCustnum Integer value containing the M.O.M. customer number to modify.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: API property OCUST will contain all data from customer record.
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Modify(1001)
77
Customer_Save This function saves any changes you have made to a customer record accessed either through the Customer_Create or Customer_Modify functions.
Parameters:
Name Description Required
lnCustnum Integer value containing the M.O.M. customer number to save.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Save(1001)
78
Customer_Find This function allows you to search for an existing customer record using the same logic that M.O.M. uses during an order import. You can also tell this function to create a new customer record if a match is not found.
Parameters: All are required, even if blank.
Name Description Required
lcFirstName String value – first name of customer
Yes
lcLastName String value – last name of customer
Yes
lcAddress1 String value – address line 1 of customer
Yes
lcAddress2 String value – address line 2 of customer
Yes
lcCity String value – city of customer Yes
lcState String value – state of customer Yes
lcZipCode String value – zip/postal code of customer
Yes
lcCountry String value – three digit M<OM country code
Yes
lcHono String value – honorific of customer
Yes
lcCompany String value – company name of customer
Yes
llAdd_New Boolean value – if True and no match is found, API will create a new customer record
Yes
Return Values:
79
Return Value Description
-1 Failure
Positive value Success – customer number of matching or new record
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Find(‘John’,’Doe’,’123 Main Street’,’’,’Totowa’,’NJ’,’07512’,’001’,’’,’Dydacomp’,.f.)
80
Customer_Contact_Phone_Create This function allows you to create a new phone contact entry for a specified customer in the M.O.M. database.
Parameters:
Name Description Required
lnCustNum Integer value – M.O.M. order number
Yes
lcSourceKey String value – Valid Source Key No Default: empty string
lcCallDateTime String Value – YYYY-MM-DD Yes. A valid date string or empty string for NULL date.
lcScriptCode String value – Call Script Code No Default: Empty String
lnInterest Integer value – Interest Level # No Default: 0
lcCallLog String value – Call Log test No Default: Empty String
Return Values:
Return Value Description
-1 Failure
Positive Value Success – contact ID
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Phone_Create(1052, “TEST”, “2011-12-30”,”T1”,1,”log message”)
81
Customer_Contact_Phone_Delete This function allows you to delete a phone contact entry from a specified customer by customer number in the M.O.M. database. Parameters:
Name Description Required
lnCustNum Integer value – M.O.M. order number
Yes
lnContact_id Integer value – Contact ID Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Examples:
Visual FoxPro:
nRetVal = ox. Customer_Contact_Phone_Delete(1052, 118)
82
Customer_Contact_Phone This function allows you to edit an existing customer phone contact entry in the M.O.M. database.
Parameters:
Name Description Required
lnCustNum Integer value – M.O.M. order number
Yes
lnContact_ID Integer value – Contact ID Yes
lcSourceKey String value – Valid Source Key No Default: empty string
lcCallDateTime String value – Call Date No Default: Empty String
lcScriptCode String value – Call Script Code No Default: Empty String
lnInterest Integer value – Interest Level No Default: 0
lcCallLog String value – Call Log No Default: Empty String
llCompleteCall Boolean – Mark Call Entry Completed.
No Default: .F.
Return Values:
Return Value Description
-1 Failure
1 Success
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Phone(1001, 123, “TEST”,”2011-12-20”,”T1”,2,”message….”,.F.)
83
Customer_Contact_Written_Create This function allows you to create a new written contact entry for a specified customer in the M.O.M. database.
Parameters:
Name Description Required
lnCustNum Integer value – M.O.M. order number
Yes
lcSourceKey String value – Valid Source Key No Default: empty string
lcCatCode String value – Valid Catalog Code No Default: empty string
llCatLabelReq Boolean – Mark Entry with Print a Catalog Mailing Label?
No Default: .F.
lcHold_Date String value – Do not mail until date
No Default: Empty String
lcLetterCode String value – Valid Letter/Notice Code
No Default: empty string
llEmailReq Boolean – Mark Call Entry ‘Send Email’ flag
No Default: .F.
llFaxReq Boolean – Mark Call Entry ‘Send Fax’ flag
No Default: .F.
llLetterReq Boolean – Mark Call Entry ‘Set Print to Printer’ flag
No Default: .F.
lcSubject String value – Subject Header for e-mail or fax.
No Default: empty string
Ignored when llEmailReq = .f. and llFaxReq = .f.
Return Values:
Return Value Description
84
-1 Failure
Positive Value Success – new customer contact ID
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Written_Create(1054, “TEST”,”CAT1”,.f.,”2011-12-20”,”L1”,.f.,.f.,.f.,”SUBJECT HEADER”
85
Customer_Contact_ Written_Delete This function allows you to delete a written contact entry from a specified customer by customer number in the M.O.M. database.
Parameters:
Name Description Required
lnCustNum Integer value – M.O.M. order number
Yes
lnContact_id Integer value – Contact ID Yes
Return Values:
Return Value Description
-1 Failure
1 Success – customer written contact entry is removed
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Create()
86
Customer_Contact_Written This function allows you to edit an existing written contact entry of a specified customer by customer number in the M.O.M. database. Parameters:
Name Description Required
lnCustNum Integer value – M.O.M. Customer Number
Yes
lnContact_ID Integer value – M.O.M. customer contact ID
Yes
lcSourceKey String value – Valid Source Key No Default: empty string
lcCatCode String value – Valid Catalog Code No Default: empty string
llCatLabelReq Boolean – Mark Entry with Print a Catalog Mailing Label?
No Default: .F.
lcHold_Date String value – Do not mail until date
No Default: Empty String
lcLetterCode String value – Valid Letter Code No Default: empty string
llEmailReq Boolean – Mark Call Entry ‘Send Email’ flag
No Default: .F.
llFaxReq Boolean – Mark Call Entry ‘Send Fax’ flag
No Default: .F.
llLetterReq Boolean – Mark Call Entry ‘Set Print to Printer’ flag
No Default: .F.
lcSubject String value – Subject Header for e-mail or fax.
No Default: empty string
Ignored when llEmailReq = .f. and llFaxReq = .f.
Note: Must have either llCatLabelReq, llEmailReq, llFaxReq, or llLetterReq set to TRUE
Return Values:
87
Return Value Description
-1 Failure
1 Success – Customer Written Contact Entry Updated
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Written(1054, 118, “TEST”,”CAT1”,.f.,”2011-12-20”,”L1”,.f.,.f.,.f.,”SUBJECT HEADER”
88
Stock Related Functions The following functions expose the ability to modify existing or new stock items in the M.O.M. database. You can only work on a single stock item at a time. After issuing a call to Stock_Create or Stock_Modify, the API exposes the values of the individual columns in a collection object named OSTOCK. The structure of this collection is objectname.fieldname. The object name for the stock item collection is always OSTOCK. The first description line value can be referenced as ox.OSTOCK.desc1.
The data dictionary, located in the M.O.M. help file, provides definitions of every field of information stored in the STOCK file.
The Stock Related Functions Include:
Stock_Create Stock_Modify Stock_Save Product_Miva_SKU_Create() Product_Miva_SKU_Info() Product_Miva_FeedMgr_Create() Product_Miva_FeedMgr_Delete() Product_Miva_FeedMgr_Info() Product_Miva_SKU_Data_Get_ XML() Product_Miva_FeedMgr_Get_ XML() Product_Attribute_Create() Product_Attribute_Data_Get_XML() Product_Attribute_Delete() Product_Attribute_Info() Product_Attribute_Mapping_Create() Product_Attribute_Mapping_Data_Get_XML() Product_Attribute_Mapping_Delete() Product_Attribute_Mapping_Info() Product_Attribute_Value_Create() Product_Attribute_Value_Delete() Product_Attribute_Value_Info() Inventory_Process_Updates()
89
Product_Miva_SKU_Create This function allows you to setup the Attributes for a specified eCommerce site. Before running this function, there is an optional parameter object that can be used to update additional fields. To create the object, do the following: oParam = createobject(“mom_api.momparams”) and set the oParam.cfunctionname = “Product_Miva_SKU_Create”. Parameters can be added using oParam.add_param(). See below regarding optional parameters.
Parameters:
Name Description Required
lcNumber String value – M.O.M. Stock Number
Yes
lcSKU String value – Miva SKU Yes
lcAttrSkuCode1 String value – Miva Product Attribute Code 1
No
lcAttrValue1 String value – Miva Product Attribute Code 1 Value
No
lcAttrSkuCode2 String value – Miva Product Attribute Code 2
No
lcAttrValue2 String value – Miva Product Attribute Code 2 Value
No
lcAttrSkuCode3 String value – Miva Product Attribute Code 3
No
lcAttrValue3 String value – Miva Product Attribute Code 3 Value
No
lcStoreCode String value – MOM Store Code No. Default to empty string
loOptParam Object – “mom_api.momparams” COM object.
No. Default to null
Return Values:
90
Return Value Description
-1 Failure
1 Success
loOptParam holds the optional parameter values for the following:
Use loOptParam.ADD_PARAM(Name, String Value) function to add optional parameters to loOptParam.
Name Description Data Type String Value
MIVAPRICE Miva Sku Price Numeric(20,2)
MIVACOST Miva Sku Cost Numeric(20,2)
MIVAACTIVE Product is Active in Miva for Sale?
Logical
TAXABLE Product is Taxable? Logical
PRODDESC Miva Sku Product Description
Text
MAINIMAGE Full Size Image URL Char(100)
THUMBNAIL Miva Sku Thumbnail URL Char(100)
CATEGORY Miva Sku Category Code Text
ATTR1TYPE_SKU Integer – Miva Product Attribute Code 1 Type 1=drop down 2 = radio button
Integer
ATTR1TITLE_SKU String value – Miva Product Attribute Code 1 Prompt (parent)
Char(50)
ATTR1TITLE Attribute Code 1 Prompt (child)
Char(50)
ATTR1IMAGE Attribute Code 1 Image (Child)
Char(100)
ATTR1PRICE Attribute Code 1 Price (Child) Numeric(20,2)
91
Parameters (continue):
Name Description Data Type String Value
ATTR2TYPE_SKU Integer – Miva Product Attribute Code 2 Type 1=drop down 2 = radio button
Integer
ATTR2TITLE_SKU String value – Miva Product Attribute Code 2 Prompt (parent)
Char(50)
ATTR2TITLE Attribute Code 2 Prompt (child)
Char(50)
ATTR2IMAGE Attribute Code 2 Image (Child)
Char(100)
ATTR2PRICE Attribute Code 2 Price (Child)
Numeric(20,2)
ATTR3TYPE_SKU Integer – Miva Product Attribute Code 3 Type 1=drop down 2 = radio button
Integer
ATTR3TITLE_SKU String value – Miva Product Attribute Code 3 Prompt (parent)
Char(50)
ATTR3TITLE Attribute Code 3 Prompt (child)
Char(50)
ATTR3IMAGE Attribute Code 3 Image (Child)
Char(100)
ATTR3PRICE Attribute Code 3 Price (Child)
Numeric(20,2)
SYNC_QTY Units from available units for sale
Numeric(10,0)
SYNC_PCT % of available units for sale
Numeric(3,0)
SYNC_LOW When quantity is equal or lower than #
Numeric(10,0)
UNITS Units available for Numeric(10,0)
92
sale WEIGHT Product weight Numeric(13,2)
PRODTITLE Product SKU Name C(100)
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: oParam = createobject(“mom_api.momparams”) oparam.cfunctionname = “Product_Miva_SKU_Create” nRetVal = oParam.Add_Param(“ATTR1TYPE”, “1”) nRetVal = oParam.Add_Param(“ATTR1TITLE_SKU”, “A1 Prompt (parent)”) nRetVal = ox. Product_Miva_SKU_Create(‘FR-R92 B-99’,’FR-R92’,’Type’,’B’,’Size’,’-99’,’’,’’,’’,oParam)
93
Product_Miva_SKU_Info This function allows you to setup the Attributes for a specified eCommerce site. Before running this function, there is an optional parameter object that can be used to update additional fields. To create the object, do the following: oParam = createobject(“mom_api.momparams”) and set the oParam.cfunctionname = “Product_Miva_SKU_General”. Parameters can be added using oParam.add_param(). See below regarding optional parameters.
Parameters:
Name Description Required
lcNumber String value – M.O.M. Stock Number
Yes
lcSKU String value – Miva SKU Yes
loOptParam Object – “mom_api.momparams” COM object.
No. Default to null
Return Values:
Return Value Description
-1 Failure
1 Success
loOptParam holds the optional parameter values for the following:
Use loOptParam.ADD_PARAM(Name, String Value) function to add optional parameters to loOptParam.
Name Description Data Type String Value
MIVAPRICE Miva Sku Price Numeric(20,2)
MIVACOST Miva Sku Cost Numeric(20,2)
MIVAACTIVE Product is Active in Miva for Sale?
Logical
94
TAXABLE Product is Taxable? Logical
PRODDESC Miva Sku Product Description
Text
MAINIMAGE Full Size Image URL Char(100)
THUMBNAIL Miva Sku Thumbnail URL Char(100)
CATEGORY Miva Sku Category Code Text
ATTR1CODE Miva Product Attribute Code 1
Char(20)
ATTR1VALUE Miva Product Attribute Code 1 Value
Char(30)
ATTR1TYPE_SKU Integer – Miva Product Attribute Code 1 Type 1=drop down 2 = radio button
Integer
ATTR1TITLE_SKU String value – Miva Product Attribute Code 1 Prompt (parent)
Char(50)
ATTR1TITLE Attribute Code 1 Prompt (child)
Char(50)
ATTR1IMAGE Attribute Code 1 Image (Child)
Char(100)
ATTR1PRICE Attribute Code 1 Price (Child) Numeric(20,2)
Parameters (continue):
Name Description Data Type String Value
ATTR2CODE Miva Product Attribute Code 2
Char(20)
ATTR2VALUE Miva Product Attribute Code 2 Value
Char(30)
ATTR2TYPE_SKU Integer – Miva Product Attribute Code 2 Type 1=drop down 2 = radio button
Integer
ATTR2TITLE_SKU String value – Miva Char(50)
95
Product Attribute Code 2 Prompt (parent)
ATTR2TITLE Attribute Code 2 Prompt (child)
Char(50)
ATTR2IMAGE Attribute Code 2 Image (Child)
Char(100)
ATTR2PRICE Attribute Code 2 Price (Child)
Numeric(20,2)
ATTR3TYPE_SKU Integer – Miva Product Attribute Code 3 Type 1=drop down 2 = radio button
Integer
ATTR3CODE Miva Product Attribute Code 3
Char(20)
ATTR3VALUE Miva Product Attribute Code 3 Value
Char(30)
ATTR3TITLE_SKU String value – Miva Product Attribute Code 3 Prompt (parent)
Char(50)
ATTR3TITLE Attribute Code 3 Prompt (child)
Char(50)
ATTR3IMAGE Attribute Code 3 Image (Child)
Char(100)
ATTR3PRICE Attribute Code 3 Price (Child)
Numeric(20,2)
SYNC_QTY Units from available units for sale
Numeric(10,0)
SYNC_PCT % of available units for sale
Numeric(3,0)
SYNC_LOW When quantity is equal or lower than #
Numeric(10,0)
UNITS Units available for sale
Numeric(10,0)
WEIGHT Product weight Numeric(13,2)
Output: if function fails, ox.Error_Msg will contain error message
Examples:
96
Visual FoxPro: oParam = createobject(“mom_api.momparams”) oParam.cFunctionName = “Product_Miva_SKU_Info” nRetVal = oParam.Add_Parameter(“ATTR1TYPE”, “1”) nRetVal = oParam.Add_Parameter(“ATTR1TITLE_SKU”, “A1 Prompt (parent)”) nRetVal = ox. Product_Miva_SKU_Info(‘FR-R92 B-99’,’FR-R92’, oParam)
97
Product_Miva_FeedMgr_Create This function allows you to create a Miva Feed Manager Record.
Parameters:
Name Description Required
lcNumber String value – new stock item number to create
Yes
lcStoreCode String value – MOM eComM store code
Yes, if multiple stores are setup in MOM
lcStatus String Value – MOM Feed Manager status character
Yes. R=Ready to Publish P=Published
llActive Boolean Value – MOM Product is Available for store
No. Default to false
llPublished Boolean Value – MOM Product has already been published
No. Default to false
Return Values:
Return Value Description
-1 Failure
Positive value Success – Feed Manager record has been created.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Miva_FeedMgr_Create(‘FR-R92 B-52 ’,’’,’P’,.T.,.T.)
98
Product_Miva_FeedMgr_Delete This function allows you to delete a Miva Feed Manager Record.
Parameters:
Name Description Required
lcNumber String value – new stock item number to create
Yes
lcStoreCode String value – MOM eComM store code
Yes, if multiple stores are setup in MOM
Return Values:
Return Value Description
-1 Failure
Positive value Success – Feed Manager record has been created.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Miva_FeedMgr_Delete(‘FR-R92 B-52 ’,’0001’)
99
Product_Miva_FeedMgr_Info This function allows you to modify a Miva Feed Manager Record.
Parameters:
Name Description Required
lcNumber String value – new stock item number to create
Yes
lcStoreCode String value – MOM eComM store code
Yes, if multiple stores are setup in MOM
lcStatus String Value – MOM Feed Manager status character
Yes. R=Ready to Publish P=Published
llActive Boolean Value – MOM Product is Available for store
No. Default to false
llPublished Boolean Value – MOM Product has already been published
No. Default to false
Return Values:
Return Value Description
-1 Failure
Positive value Success – Feed Manager record has been created.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Miva_FeedMgr(‘FR-R92 B-52 ’,’’,’P’,.T.,.T.)
100
Product_Attribute_Create This function allows you to setup the MOM Product Attributes for a specified size/color Stock Item.
Parameters:
Name Description Required
lcParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lcOptcode String value – Product Attribute Code
Yes
lcOptTitle String value – Product Attribute Code Name
No
lcOptType String value – Product Attribute Attribute type
Yes.
‘D’ for Drop Down Selection ‘R’ for Radio Button
Selection ‘T’ for Text Entry
llSKULink String value – Miva Product
Attribute Code 2 No
lnValLen Numeric value – Attribute type Text Entry Field Length
Yes only when lcOptType = ‘T’
lcValType String value – Validation type for Attribute type Text Entry
Yes only when lcOptType = ‘T’
‘C’ for plain text ‘N’ for Numeric Value ‘D’ for Date Value
lnValDec Numeric value - Attribute type
Text Entry Decimals Yes only when lcOptType = ‘T’
Return Values:
Return Value Description
-1 Failure
101
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Create("SAA737","COLOR","COLOR:","D",.T.,0,"",0)
102
Product_Attribute_Delete This function allows you to delete a MOM Product Attribute for a specified size/color Stock Item.
Parameters:
Name Description Required
lcParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lcOptcode String value – Product Attribute Code
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Delete("SAA737","COLOR")
103
Product_Attribute_Info This function allows you to modify the MOM Product Attributes for a specified size/color Stock Item.
Parameters:
Name Description Required
lcParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lcOptcode String value – Product Attribute Code
Yes
lcOptTitle String value – Product Attribute Code Name
No
lcOptType String value – Product Attribute Attribute type
Yes.
‘D’ for Drop Down Selection ‘R’ for Radio Button
Selection ‘T’ for Text Entry
llSKULink String value – Miva Product
Attribute Code 2 No
lnValLen Numeric value – Attribute type Text Entry Field Length
Yes only when lcOptType = ‘T’
lcValType String value – Validation type for Attribute type Text Entry
Yes only when lcOptType = ‘T’
‘C’ for plain text ‘N’ for Numeric Value ‘D’ for Date Value
lnValDec Numeric value - Attribute type
Text Entry Decimals Yes only when lcOptType = ‘T’
Return Values:
Return Value Description
-1 Failure
104
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Info("SAA737","COLOR","COLOR:","D",.T.,0,"",0)
105
Product_Attribute_Data_Get_XML This function gives you the Product Attribute Data for a specified size/color product.
Parameters:
Name Description Required
lnParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Attribute_Data_Get_XML(268387, 0)
106
Product_Attribute_Value_Create This function allows you to setup the MOM Product Attribute values for a specified Product Attribute Code.
Parameters:
Name Description Required
lcParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lcOptcode String value – Product Attribute Code
Yes.
lcOptValue String value – Product Attribute Code Value
Yes.
lcOptPrice String value – Product Attribute Code Value Price Modification
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Value_Create "SAA737 ","COLOR","B",0.00)
107
Product_Attribute_Value_Delete This function allows you to delete a MOM Product Attribute value for a specified Product Attribute Code of a Product SKU.
Parameters:
Name Description Required
lcParentSKU String value – first 10 characters of stock number.
Yes
lcOptcode String value – Product Attribute Code
Yes.
lcOptValue String value – Product Attribute Code Value
Yes.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Value_Delete("SAA737 ","COLOR","B)
108
Product_Attribute_Value_Info This function allows you to modify the MOM Product Attribute values for a specified Product Attribute Code of a MOM Product SKU.
Parameters:
Name Description Required
lcParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lcOptcode String value – Product Attribute Code
Yes.
lcOptValue String value – Product Attribute Code Value
Yes.
lcOptPrice String value – Product Attribute Code Value Price Modification
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Value_Info("SAA737 ","COLOR","B",0.00)
109
Product_Attribute_Mapping_Create This function allows you to setup the MOM Product Attribute mappings for a MOM size/color product
Parameters:
Name Description Required
lcNumber String value – MOM Stock Item Number.
Yes
lcCodeValue String value – Comma delimited string containing list of Product Attribute Code/value pairs.
Yes.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Mapping_Create(" SAA734 PAINTED", "COLOR,BLU,SIZE,SM")
110
Product_Attribute_Mapping_Delete This function allows you to delete the MOM Product Attribute mappings for a MOM size/color product
Parameters:
Name Description Required
lcNumber String value – MOM Stock Item Number.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Mapping_Delete(" SAA734 PAINTED)
111
Product_Attribute_Mapping_Info This function allows you to modify the MOM Product Attribute mappings for a MOM size/color product
Parameters:
Name Description Required
lcNumber String value – MOM Stock Item Number.
Yes
lcCodeValue String value – Comma delimited string containing list of Product Attribute Code/value pairs.
Yes.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Product_Attribute_Mapping_Info(" SAA734 PAINTED", "COLOR,BLU,SIZE,SM")
112
Product_Attribute_Mapping_Data_Get_XML This function gives you the Product Attribute Mapping Data for a specified size/color product.
Parameters:
Name Description Required
lnParentSKU String value – Product SKU. (first 10 characters of stock number)
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Attribute_Mapping_Data_Get_XML(268387, 0)
113
Inventory_Process_Updates() When products are received, this function allows users to process any additions or changes to inventory.
Parameters: None
Return Values:
Return Value Description
-1 Failure
Positive value Success – Process updates to inventory has been successful.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Inventory_Process_Updates()
114
Stock_Create This function allows you to create a new stock item in the M.O.M. database. This function also sets the OSTOCK property of the API object to the data from the new stock item so you can edit it directly.
Parameters:
Name Description Required
lcNumber String value – new stock item number to create
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – primary key of new stock record – required as parameter for stock_save function
Output: API property OSTOCK will contain all data from stock record.
Examples:
Visual FoxPro:
nRetVal = ox.Stock_Create(‘NEWSTOCKNUMBER’)
115
Stock_Modify This function allows you to modify an existing stock item in the M.O.M. database. This function also sets the OSTOCK property of the API object to the data from the selected stock item so you can edit it directly.
Parameters:
Name Description Required
lcNumber String value – new stock item number to create
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – primary key of new stock record – required as parameter for stock_save function
Output: API property OSTOCK will contain all data from stock record.
Examples:
Visual FoxPro:
nRetVal = ox.Stock_Create(‘NEWSTOCKNUMBER’)
116
Stock_Save This function saves any changes you have made to a stock record accessed either through the Stock_Create or Stock_Modify functions.
Parameters:
Name Description Required
lnStock_ID Integer value – primary key value of stock record to save
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Stock_Save(1001)
117
Purchase Order Related Functions
The following functions expose the ability to modify existing or new orders in the M.O.M. database. You can work on multiple orders at the same time using this API. By default, the API will not automatically save changes to the database for new orders created using the Order_Create function if the reference to the API object is released before explicitly calling the Order_Save function for each open order. To override this default behavior, set the Save_Partial_Orders property of the API object to True. This can be done as follows:
ox.Save_Partial_Orders = .t.
Before working on an order, you either have to create a new order using the Order_Create function, or open an existing order using the Order_Modify function. You can create and edit as many orders as you want in a single session, as all the other order related functions accept the order number as a parameter.
The data dictionary, located in the M.O.M. help file, provides definitions of every field of information stored in the CMS file.
The Order Related Functions Include: Purchase_Modify Purchase_Save Purchase_info Purchase_info_Additional Purchase_Instructions Purchase_Receive_Product_All() PurDetail_delete PurDetail_Info PurDetail_SupplierDesc PurDetail_Instructions PurDetail_Custom PurDetail_DeliverTo() PurDetail_Receive_Product()
118
Purchase_Modify This function must be called once before modifying an existing purchase order in the M.O.M. database. If the purchase order is being accessed in the M.O.M. system, the API will not be able to modify it. If the API can grab the purchase order, users in the M.O.M. system will not be able to access the purchase order until the API releases it.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure - could not modify purchase order
1 Success
Output: ox.Error_Msg will contain reason why system could not modify the purchase order.
Examples:
Visual FoxPro:
nRetVal = ox.Purchase_Modify(1001)
119
Purchase_Save This function will save any changes you have made to the purchase order; release the hold on the purchase order the API has, and makes the purchase order available in the M.O.M. system.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Purchase_Save(1001)
120
Purchase_Info This function will update key information of a purchase order.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lcReference String value – Brief notation to describe the purchase order for internal purposes.
Yes
lcExpect_on String value – Date shipment is expected to arrive from your supplier for all items in the purchase order.
Yes
llPrinted String value – Determines if PO will be reprinted in the next run of the print purchase order.
TRUE=PO will NOT be reprinted
FALSE=PO will be reprinted
Yes
lcShipVia String value – Shipping method that you want your supplier to use in the SHIP VIA field.
No
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
121
Visual FoxPro:
nRetVal = ox.Purchase_info(1001,’PO#1234’,’2011-10-29T12:00:00’,.f.,‘FEX’)
122
Purchase_Info_Additional This function updates shipping and tax purchase order info.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes.
lnShipping Numeric value – Purchase order shipping cost.
Yes.
lnTax Numeric value – Purchase order tax amount.
Yes.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Purchase_info_Additional(1001, 5.00, 3.25)
123
Purchase_Instructions This function will update special instructions that you want the supplier to be aware of for the purchase order.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lcInstruct1 String value – two digit M.O.M. credit card type value
No Default:empty string
lcInstruct2 String value – credit card number **
No Default:empty string
lcInstruct3 String value – credit card expiration date format MM/YY
No Default:empty string
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Purchase_Instructions(10011,’Line1’,’Line2’, ‘Line3’)
124
Purchase_Receive_Product_All() This function will receive all products in a specified purchase order.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnShipping Numeric value – purchase order shipping cost.
No. Default to zero
lnTax Numeric value – purchase order tax amount.
No. Default to zero
lnAdjustment Numeric value – purchase order adjustment amount
No. Default to zero
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.Purchase_Receive_Product_All(10011, 5.00 , 3.25, 0.00)
125
PurDetail_Delete This function is used to delete a Purchase Order Line Item
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
Return Values:
Return Value Description
-1 Failed to update
1 Success
Output: ox.Error_Msg will contain reason why system could not delete line item.
Examples: Visual FoxPro: nRetVal = ox.PurDetail_Delete(123456789, 8888)
126
PurDetail_Create This function is used to Create a Purchase Order Line Item
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lcNumber String value – M.O.M. Stock Item number
Yes
lnQty Numeric value – Quantity Ordered
No Default:0
lcUOM String value – unit of measure for the amount purchased; for example, dz(dozen), ea(each)
No Default:Empty String
lnVolume Numeric value – Volume No Default:0
lnWeight Numeric value – Weight No Default:0
lcExpect_on String value – Expected delivery date string format YYYY-MM-DD
No Default:Empty String
lnQtyDeliv Numeric value – Quantity already delivered
No Default:0
llUse_Cost Boolean value - If True, you must also pass the lnFactor, lnUnit_Cost and lnDiscount parameters. If FALSE, MOM will set default factor, unit cost and discount from last buylevel used.
No Default:False
lnFactor Numeric value – multiplying factor.
No Default:1
127
lnUnit_Cost Numeric value – Unit cost. the supplier’s cost to you for the item.
No uses unit cost from buying level
lnDiscount Integer value – discount % value. Between 1 and 100
No Default:0
Return Values:
Return Value Description
-1 Failed to create
1 Success
Output: ox.Error_Msg will contain reason why system could not create line item.
Examples: Visual FoxPro: nRetVal = ox.PurDetail_Create(123456789, 8888, ‘V-YANKEES’,1,’’,1,0,0,0,0,’’)
128
PurDetail_Info This function is used to update the key info of a purchase Order Line Item in the M.O.M. database.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
lnQty Numeric value – Quantity Ordered
No Default: 0
lcUOM String value – unit of measure for the amount purchased; for example, dz(dozen), ea(each)
No Default: 0
lnVolume Integer value –Volume No Default: 0
lnWeight Integer value –Weight No Default: 0
lcExpect_On String value – Expected delivery date string format YYYY-MM-DD
No Default:Empty String
llChange_Cost Boolean value - If True, you must also pass the lnFactor, lnUnit_Cost and lnDiscount parameters. If FALSE, factor, unit_cost, and discount remains unchanged.
No default False
lnFactor Numeric value – multiplying factor.
No Default:1
lnUnit_cost Numeric value – Unit cost. the supplier’s cost to you for the item.
No Default:0
lnDiscount Integer value – discount % value. Between 1 and 100
No Default:0
129
Return Values:
Return Value Description
-1 Failed to update
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
Output: ox.Error_Msg will contain reason why system could not update line item.
Examples: Visual FoxPro: nRetVal = ox.PurDetail_Info(15123434, 2021, 10,’’,0,0,’’,.T., 1, 9.99,10)
130
PurDetail_CustomInfo This function is used to update the purchase order line item custom information in the M.O.M. database.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
lnCustomInfo string value – Custom information. Any additional information about the item being purchased.
No Default:Empty String
Return Values:
Return Value Description
-1 Failed to update
1 Success
Output: ox.Error_Msg will contain reason why system could not update custom info of line item.
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_customInfo(123456789, 8888, “this is a message”)
131
PurDetail_Instructions This function is used to update the purchase order line item special supplier instructions in the M.O.M. database.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
lcInstruct1 string value – Line 1 Special supplier instruction
No. Default = empty string
lcInstruct2 string value – Line 2 Special supplier instruction
No. Default = empty string
lcInstruct3 string value – Line 3 Special supplier instruction
No. Default = empty string
Return Values:
Return Value Description
-1 Failed to update
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
Output: ox.Error_Msg will contain reason why system could not update line item.
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_Instructions(123456789, 8888, ‘you,’say’,’goodbye’)
132
PurDetail_SupplierDesc This function is used to update the purchase order line item description to supplier in the M.O.M. database.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
lcDesc1 string value – Line 1 description to supplier
No. Default = empty string
lcDesc2 string value – Line 2 description to supplier
No. Default = empty string
Return Values:
Return Value Description
-1 Failed to update
1 Success
** If parameter is not required, you will still need to pass the default parameter value.
Output: ox.Error_Msg will contain reason why system could not update line item.
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_SupplierDesc(123456789, 8888, ‘desc 1’, ’desc 2’)
133
PurDetail_DeliverTo This function is used to update the purchase order line item deliver to location in the M.O.M. database. Valid Bin IDs for the purchase order line item stock number can be retrieved using Stock_Bin_Get_XML()
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
lnBin_ID Integer value – System Bin ID of line item stock number.
Yes
Return Values:
Return Value Description
-1 Failed to update
1 Success
Output: ox.Error_Msg will contain reason why system could change Deliver to location of line item.
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_DeliverTo(4000, 345, 40)
134
PurDetail_Receive_Product() This function will receive all products in a specified purchase order.
Parameters:
Name Description Required
lnPONumber Integer value – M.O.M. purchase order number to modify.
Yes
lnPurItem_id Integer value –Purchase Order Line Item ID
Yes
lnReceiveQty Numeric value – Receive qty for specified Purchase Order Line Item.
No. Default to zero
lnShipping Numeric value – purchase order shipping cost.
No. Default to zero
lnTax Numeric value – purchase order tax amount.
No. Default to zero
lnAdjustment Numeric value – purchase order adjustment amount
No. Default to zero
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.Error_Msg will contain reason for failure.
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_Receive_Product(10011, 100, 5, 5.00 , 3.25, 0.00)
135
Tax Related Functions
The following functions expose the ability to update Sales Tax Information
The Tax Related Functions include:
Tax_National_SalesTaxRate() Tax_State_SalesTaxRate() Tax_County_SalesTaxRate() Tax_Zip_SalesTaxRate() Tax_SalesTaxRate_Avalara()
136
Tax_National_SalesTaxRate This function allows you to update the standard National Sales Tax and other info. Before running this function, you must call the Add_Parameter() API function to add at least one of the following optional parameter names shown below.
Required Parameters:
Name Description Required
lcCountry string value – M.O.M. country code
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Standard optional parameters:
Use ADD_PARAMETER(Name, String Value) function to add optional parameters to function.
Name Description Data Type String Value
NTAXR National Sales Tax Rate Numeric 7,4 ‘8.0625’
TAXSHIP Tax Shipping Flag Logical ‘True’ or ‘False’
NONTAXBOX Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag
Logical ‘True’ or ‘False’
TAXHAND Tax Handling Fees Only Flag
Logical ‘True’ or ‘False’
Tax class optional parameters:
Name Description Data Type String Value
137
TAX_CLASSA TAX_CLASSB TAX_CLASSC TAX_CLASSD TAX_CLASSE
Tax Class is not Taxable
Boolean ‘True’ or ‘False’
RATECLASSA RATECLASSB RATECLASSC RATECLASSD RATECLASSE
Tax Rate for Tax Class Letter.
Numeric 7,4 ‘0.0000’
N_LCAPA N_LCAPB N_LCAPC N_LCAPD N_LCAPE
Stop Taxing After Order Total Exceeds Flag for Tax Class Letter
Logical ‘True’ or ‘False’
N_NCAPA N_NCAPB N_NCAPC N_NCAPD N_NCAPE
Stop Taxing After Order Total Exceeds Amount for Tax Class Letter
Numeric 7,4 ‘0.0000’
N_LTAXITA N_LTAXITB N_LTAXITC N_LTAXITD N_LTAXITE
Only Tax Items That Exceeds Flag for Tax Class Letter
Logical ‘True’ or ‘False’
N_NTAXITA N_NTAXITB N_NTAXITC N_NTAXITD N_NTAXITE
Only Tax Items That Exceeds Amount for Tax Class Letter.
Numeric 7,4 ‘0.0000’
NTAXTHRESA NTAXTHRESB NTAXTHRESC NTAXTHRESD NTAXTHRESE
Do Not Tax Portion Below amount specified in Only Tax Items that exceeds amount for tax class letter.
Logical ‘True’ or ‘False’
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Clear_Parameters() nRetVal = ox.Add_Parameter(“NTAXR”, “4.0625”) nRetVal = ox.Add_Parameter(“TAXSHIP”, “True”) nRetVal = ox.Tax_National_SalesTaxRate([001])
138
Tax_State_SalesTaxRate This function allows you to update the standard State Sales Tax and other info. Before running this function, you must call the Add_Parameter() API function to add at least one of the following optional parameter names shown below.
Required Parameters:
Name Description Required
lcCountry string value – M.O.M. country code
Yes
lcState string value – M.O.M. state code Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Standard optional parameters:
Use ADD_PARAMETER(Name, String Value) function to add optional parameters to function.
Name Description Data Type String Value
TAXRATE Tax Rate For State Numeric 7,4 ‘8.0625’
FIN_RATE Finance Charges Rate For State
Numeric 7,4 ‘3.0000’
TAXSHIP Tax Shipping Flag Logical ‘True’ or ‘False’
NONTAXBOX Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag
Logical ‘True’ or ‘False’
TAXHAND Tax Handling Fees Only Flag
Logical ‘True’ or ‘False’
139
Tax class optional parameters:
Name Description Data Type String Value
TAX_CLASSA TAX_CLASSB TAX_CLASSC TAX_CLASSD TAX_CLASSE
Tax Class is not Taxable
Boolean ‘True’ or ‘False’
RATECLASSA RATECLASSB RATECLASSC RATECLASSD RATECLASSE
Tax Rate for Tax Class.
Numeric 7,4 ‘0.0000’
S_LCAPA S_LCAPB S_LCAPC S_LCAPD S_LCAPE
Stop Taxing After Order Total Exceeds Flag for Tax Class
Logical ‘True’ or ‘False’
S_NCAPA S_NCAPB S_NCAPC S_NCAPD S_NCAPE
Stop Taxing After Order Total Exceeds Amount for Tax Class
Numeric 7,4 ‘0.0000’
S_LTAXITA S_LTAXITB S_LTAXITC S_LTAXITD S_LTAXITE
Only Tax Items That Exceeds Flag for Tax Class
Logical ‘True’ or ‘False’
S_NTAXITA S_NTAXITB S_NTAXITC S_NTAXITD S_NTAXITE
Only Tax Items That Exceeds Amount for Tax Class.
Numeric 7,4 ‘0.0000’
STAXTHRESA STAXTHRESB STAXTHRESC STAXTHRESD STAXTHRESE
Do Not Tax Portion Below amount specified in Only Tax Items that exceeds amount for tax class.
Logical ‘True’ or ‘False’
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Clear_Parameters()
140
nRetVal = ox.Add_Parameter(“TAXRATE”, “4.0625”) nRetVal = ox.Add_Parameter(“TAXSHIP”, “True”) nRetVal = ox.Tax_State_SalesTaxRate([001])
141
Tax_County_SalesTaxRate This function allows you to update the standard County Sales Tax and other info. Before running this function, you must call the Add_Parameter() API function to add at least one of the following optional parameter names shown below.
Required Parameters:
Name Description Required
lcCountry string value – M.O.M. country code
Yes
lcState string value – M.O.M. state code Yes
lcCounty string value – M.O.M. county code
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Standard optional parameters:
Use ADD_PARAMETER(Name, String Value) function to add optional parameters to function.
Standard parameters:
Name Description Data Type String Value
CTAXR Tax Rate For State Numeric 7,4 ‘8.0625’
TAXSHIP Tax Shipping Flag Logical ‘True’ or ‘False’
NONTAXBOX Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag
Logical ‘True’ or ‘False’
TAXHAND Tax Handling Fees Only Flag
Logical ‘True’ or ‘False’
142
Tax class optional parameters:
Name Description Data Type String Value
TAX_CLASSA TAX_CLASSB TAX_CLASSC TAX_CLASSD TAX_CLASSE
Tax Class is not Taxable
Boolean ‘True’ or ‘False’
RATECLASSA RATECLASSB RATECLASSC RATECLASSD RATECLASSE
Tax Rate for Tax Class.
Numeric 7,4 ‘0.0000’
C_LCAPA C_LCAPB C_LCAPC C_LCAPD C_LCAPE
Stop Taxing After Order Total Exceeds Flag for Tax Class
Logical ‘True’ or ‘False’
C_NCAPA C_NCAPB C_NCAPC C_NCAPD C_NCAPE
Stop Taxing After Order Total Exceeds Amount for Tax Class
Numeric 7,4 ‘0.0000’
C_LTAXITA C_LTAXITB C_LTAXITC C_LTAXITD C_LTAXITE
Only Tax Items That Exceeds Flag for Tax Class
Logical ‘True’ or ‘False’
C_NTAXITA C_NTAXITB C_NTAXITC C_NTAXITD C_NTAXITE
Only Tax Items That Exceeds Amount for Tax Class.
Numeric 7,4 ‘0.0000’
CTAXTHRESA CTAXTHRESB CTAXTHRESC CTAXTHRESD CTAXTHRESE
Do Not Tax Portion Below amount specified in Only Tax Items that exceeds amount for tax class.
Logical ‘True’ or ‘False’
Output: if function fails, ox.Error_Msg will contain error message
Examples:
143
Visual FoxPro: nRetVal = ox.Clear_Parameters() nRetVal = ox.Add_Parameter(“CTAXR”, “4.0625”) nRetVal = ox.Add_Parameter(“TAXSHIP”, “True”) nRetVal = ox.Tax_County_SalesTaxRate([001],[NY],[027])
144
Tax_Zip_SalesTaxRate This function allows you to update the standard State Sales Tax and other info. Before running this function, you must call the ADD_PARAMETER() API function to add at least one of the following optional parameter names shown below.
Required Parameters:
Name Description Required
lcCountry string value – M.O.M. country code
Yes
lcZip string value – M.O.M. zip code Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Optional standard parameters:
Use ADD_PARAMETER(Name, String Value) function to add optional parameters to function.
Name Description Data Type String Value
ITAXR Tax Rate For Zip Numeric 7,4 ‘8.0625’
TAXSHIP Tax Shipping Flag Logical ‘True’ or ‘False’
NONTAXBOX Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag
Logical ‘True’ or ‘False’
TAXHAND Tax Handling Fees Only Flag
Logical ‘True’ or ‘False’
PRESENCE Always Report Sales Flag
Logical ‘True’ or ‘False’
145
Optional Tax class Parameters:
Name Description Data Type String Value
TAX_CLASSA TAX_CLASSB TAX_CLASSC TAX_CLASSD TAX_CLASSE
Tax Class is not Taxable
Boolean ‘True’ or ‘False’
RATECLASSA RATECLASSB RATECLASSC RATECLASSD RATECLASSE
Tax Rate for Tax Class.
Numeric 7,4 ‘0.0000’
I_LCAPA I_LCAPB I_LCAPC I_LCAPD I_LCAPE
Stop Taxing After Order Total Exceeds Flag for Tax Class
Logical ‘True’ or ‘False’
I_NCAPA I_NCAPB I_NCAPC I_NCAPD I_NCAPE
Stop Taxing After Order Total Exceeds Amount for Tax Class
Numeric 7,4 ‘0.0000’
I_LTAXITA I_LTAXITB I_LTAXITC I_LTAXITD I_LTAXITE
Only Tax Items That Exceeds Flag for Tax Class
Logical ‘True’ or ‘False’
I_NTAXITA I_NTAXITB I_NTAXITC I_NTAXITD I_NTAXITE
Only Tax Items That Exceeds Amount for Tax Class.
Numeric 7,4 ‘0.0000’
ITAXTHRESA ITAXTHRESB ITAXTHRESC ITAXTHRESD ITAXTHRESE
Do Not Tax Portion Below amount specified in Only Tax Items that exceeds amount for tax class.
Logical ‘True’ or ‘False’
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Clear_Parameters() nRetVal = ox.Add_Parameter(“ITAXR”, “4.0625”)
146
nRetVal = ox.Add_Parameter(“TAXSHIP”, “True”) nRetVal = ox.Tax_Zip_SalesTaxRate([001], [12553])
147
Tax_ SalesTaxRate_Avalara This function allows you to update the MOM sales tax tables from Avalara input file.
The Avalara input file is defined in an Excel document located in C:\MOMSDK\MOMAPI\Plugins\MOMAPI_SalesTaxRates\Config\Y2K_Rate_Format-RATE-ISPI_dydacomp.xls.
The format file for the Avalara input file is defined in an xml document located in C:\MOMSDK\MOMAPI\Plugins\MOMAPI_SalesTaxRates\Config\Taxsales_Format.xml
Required Parameters:
Name Description Required
lcFileName string value – Avalara Input File Yes. File should be placed in the IN folder defined in the configuration file (MOMAPI_SalesTaxRates.exe.config) where plugin is located.
lcFormatFile string value – Avalara XML Format File Yes. The format file for the Avalara input file. C:\MOMSDK\MOMAPI\Plugins\MOMAPI_SalesTaxRates\Config\Taxsales_Format.xml
Return Values:
Return Value Description
-1 Failure
1 Success
148
Output: if function fails, ox.Error_Msg will contain error message
Examples:
Visual FoxPro: nRetVal = ox.Tax_ SalesTaxRate_Avalara(“C:\MOMSDK\MOMAPI\Plugins\MOMAPI_SalesTaxRates\In\ Taxsales.TXT”, “C:\MOMSDK\MOMAPI\Plugins\MOMAPI_SalesTaxRates\Config\Taxsales_Format.xml”)
149
Pulling Data from M.O.M. The following functions allow you to pull data, in XML format, from the M.O.M. database. You can only work on a single table at a time.
The Pulling Data Related Functions Include:
Customer_Get Customer_Set_Data_Pull Customer_Get_Data_Pull Customer_Contact_Get Customer_Contact_Phone_Get Customer_Contact_Written_Get
Stock_Get Stock_Set_Data_Pull Stock_Get_Data_Pull Order_Get Order_Set_Data_Pull Order_Get_Data_Pull OrdDetail_Get OrdDetail_Set_Data_Pull OrdDetail_Get_Data_Pull Purchase_Get Purchase_Set_Data_Pull Purchase_Get_Data_Pull PurDetail_Get PurDetail_Set_Data_Pull PurDetail_Get_Data_Pull Order_Status_Get_XML() Order_Box_Get_XML() Order_BoxContent_Get_XML() Order_Data_Get_XML() Invoice_Data_Get_XML() Stock_Bin_Get_XML() Accounting_CCMerchantAccount_Get_XML() Accounting_CCMerchantAccount_Get_Data_Pull() Accounting_CCMerchantAccount_ Set_Data_Pull()
150
Shipping_Carrier_Get_XML() Shipping_Carrier_Get_Data_Pull() Shipping_Carrier_Set_Data_Pull() Tax_National_SalesTaxRate_Get_XML() Tax_National_SalesTaxRate_Get_Data_Pull() Tax_National_SalesTaxRate_Set_Data_Pull() Tax_State_SalesTaxRate_Get_XML() Tax_State_SalesTaxRate_Get_Data_Pull() Tax_State_SalesTaxRate_Set_Data_Pull() Tax_County_SalesTaxRate_Get_XML() Tax_County_SalesTaxRate_Get_Data_Pull() Tax_County_SalesTaxRate_Set_Data_Pull() Tax_Zip_SalesTaxRate_Get_XML() Tax_Zip_SalesTaxRate_Get_Data_Pull() Tax_Zip_SalesTaxRate_Set_Data_Pull()
151
Customer_Get This function allows you to query the MOM database for a single record from the [customers] table using the customer number.
Parameters:
Name Description Required
lnCustnum Integer value – M.O.M. customer number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Customer record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Get(1001)
152
Customer_Set_Data_Pull This function allows you to query the MOM database for multiple records from the [customers] table based on a filter condition you supply. It is used in conjunction with the Customer_Get_Data_Pull function, and must be called before Customer_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Set_Data_Pull(”Lastname=’SMITH’”)
153
Customer_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Customer_Set_Data_Pull. By default the API will return one row for each call to Customer_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Customer records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.Customer_Get_Data_Pull()
154
Customer_Contact_Get This function allows you to query the contact history entries of a specific customer using the customer number.
Parameters:
Name Description Required
lnCustnum Integer value – M.O.M. customer number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Customer record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Get(1001)
155
Customer_Contact_Phone_Get This function allows you to query the phone contact entries of a specific customer using the customer number.
Parameters:
Name Description Required
lnCustnum Integer value – M.O.M. customer number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Customer record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Phone_Get(1001)
156
Customer_Contact_Written_Get This function allows you to query the written contact entries of a specific customer using the customer number.
Parameters:
Name Description Required
lnCustnum Integer value – M.O.M. customer number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Customer record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Customer_Contact_Written_Get(1001)
157
Stock_Get This function allows you to query the MOM database for a single record from the [Stock Items] table using the stock item number.
Parameters:
Name Description Required
lcNumber string value – M.O.M. Stock Item number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Stock record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Stock_Get(1001)
158
Stock_Set_Data_Pull This function allows you to query the MOM database for multiple records from the [Stock Items] table based on a filter condition you supply. It is used in conjunction with the Stock_Get_Data_Pull function, and must be called before Stock_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Stock_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Stock_Set_Data_Pull(”number >=’S’”)
159
Stock_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Stock_Set_Data_Pull. By default the API will return one row for each call to Stock_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Stock records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.Stock_Get_Data_Pull()
160
Order_Get This function allows you to query the MOM database for a single record from the [Orders] table using the order number.
Parameters:
Name Description Required
lnOrderNo integer value – M.O.M. order number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Order record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Get(1001)
161
Order_Set_Data_Pull This function allows you to query the MOM database for multiple records from the [Orders] table based on a filter condition you supply. It is used in conjunction with the Order_Get_Data_Pull function, and must be called before Order_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Order_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Order_Set_Data_Pull(”orderno >=1000 and orderno < 1050”)
162
Order_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Order_Set_Data_Pull. By default the API will return one row for each call to Order_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.Order_Get_Data_Pull()
163
OrdDetail_Get This function allows you to query the MOM database by order number for all Order Line Items from the [Order Line Items] table.
This function allows you to pull all Order Line Items for a specific order number from the M.O.M. database.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number to get.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain all the Line Items of a particular order in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.OrdDetail_Get(1001)
164
OrdDetail_Set_Data_Pull This function allows you to query the MOM database for multiple records from the [Order Line Items] table on a filter condition you supply. It is used in conjunction with the OrdDetail_Get_Data_Pull function, and must be called before OrdDetail_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Stock_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.OrdDetail_Set_Data_Pull(”orderno >=1000 and orderno < 1050”)
165
OrdDetail_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to OrdDetail_Set_Data_Pull. By default the API will return one row for each call to OrdDetail_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order Line Items of multiple orders in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.OrdDetail_Get_Data_Pull()
166
Purchase_Get
This function allows you to query the MOM database for a single record from the [Purchase] table using the PO number.
Parameters:
Name Description Required
lnPONumber integer value – M.O.M. purchase order number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the selected Order record in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Get(1001)
167
Purchase_Set_Data_Pull This function allows you to query the MOM database for multiple records from the [Purchase] table based on a filter condition you supply. It is used in conjunction with the Purchase_Data_Pull_Get function, and must be called before Purchase_Data_Pull_Get.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Purchase_Get_Data_Pull function.
Yes
lnStatus Integer value- 0=All, 1=Unprinted, 2=Outstanding
No. Default:0
lnType Integer value- 0=All, 1=Standard POs, 2=Drop Ship POs
No. Default:0
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Purchase_Set_Data_Pull(0,0,”ponumber >=1000 and ponumber < 1050”)
168
Purchase_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Purchase_Data_Pull_Set. By default the API will return one row for each call to Purchase_Data_Pull_Get. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.Purchase_Data_Pull_Get()
169
PurDetail_Get This function allows you to query the MOM database by Purchase order number for all purchase order Line Items from the [Purchase order Line Items] table.
This function allows you to pull all Purchase Order Line Items for a specific purchase order number from the M.O.M. database.
Parameters:
Name Description Required
lnPONumber integer value – M.O.M. purchase order number to retrieve.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain all the Line Items of a particular order in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_Get(10012)
170
PurDetail_Set_Data_Pull This function allows you to query the MOM database for multiple records from the [Purchase Order Line Items] table on a filter condition you supply. It is used in conjunction with the PurDetail_Get_Data_Pull function, and must be called before PurDetail_Get_Data_Pull
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Purchase_Data_Pull_Get function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.PurDetail_Data_Pull_Set(0,0, ”ponumber >=1000 and ponumber < 1050”)
171
PurDetail_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to PurDetail_Data_Pull_Set. By default the API will return one row for each call to PurDetail_Data_Pull_Get. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order Line Items of multiple orders in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.PurDetail_Data_Pull_Get()
172
Order_Status_Get_XML This function gives you the status code and description of an order.
Parameters:
Name Description Required
lnOrderNo Integer value – M.O.M. order number.
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Status_Get_XML(10012, 0)
173
Order_Box_Get_ XML This function gives you all boxes used in an order.
Parameters:
Name Description Required
lnOrderNo integer value – M.O.M. order number.
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Box_Get_XML(10012, 0)
174
Order_BoxContent_Get_ XML This function gives you all items found in all boxes of an order.
Parameters:
Name Description Required
lnOrderNo integer value – M.O.M. order number.
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Order_BoxContent_Get_XML(10012, 0)
175
Order_Data_Get_ XML This function gives you the full information of a specified order. Addresses, order line items, and packaging data.
Parameters:
Name Description Required
lnOrderNo integer value – M.O.M. order number.
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Order_Data_Get_XML(268387, 0)
176
Invoice_Data_Get_XML This function gives you all invoices generated for a specified order.
Parameters:
Name Description Required
lnOrderNo integer value – M.O.M. order number.
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Invoice_Data_Get_XML(268387,0)
177
Stock_Bin_Get_XML This function gives you all bins for a specified stock item.
Parameters:
Name Description Required
lcNumber string value – M.O.M. stock item number.
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Stock_Bin_Get_XML([ITEM NUMBER],0)
178
Product_Miva_SKU_Data_Get_ XML This function gives you the full Miva eCommerce Channel Management data. General, Extended Info, Attributes, and inventory.
Parameters:
Name Description Required
lcSku String value – Miva Sku Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Miva_Sku_Data_Get_XML(‘FR-R92’, 0)
179
Product_Miva_FeedMgr_Get_ XML This function gives you the all feed manager records for the Miva eCommerce Stores.
Parameters:
Name Description Required
lcSku String value – Miva Sku Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Product_Miva_Sku_Data_Get_XML(‘FR-R92’, 0)
180
Tax_National_SalesTaxRate_Get_XML
This function gives you a specified record in the National Sales Tax Table by M.O.M. Country Code.
Parameters:
Name Description Required
lcCountryCode string value – M.O.M. country code
Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Tax_National_SalesTaxRate_Get_XML (“001”,0)
181
Tax_National_SalesTaxRate_Set_Data_Pull This function allows you to query the MOM database for multiple records from the National Sales Tax Rate table based on a filter condition you supply. It is used in conjunction with the Tax_National_SalesTaxRate_Get_Data_Pull function, and must be called before Tax_National_SalesTaxRate_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Tax_National_SalesTaxRate _Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox. Tax_National_SalesTaxRate_Set_Data_Pull(”1=1”)
182
Tax_National_SalesTaxRate_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Order_Set_Data_Pull. By default the API will return one row for each call to Tax_National_SalesTaxRate_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox. Tax_National_SalesTaxRate_Get_Data_Pull()
183
Tax_State_SalesTaxRate_Get_XML
This function gives you a specified record in the State Sales Tax Rate Table by M.O.M. Country Code and state code.
Parameters:
Name Description Required
lcCountry string value – M.O.M. country code
Yes
lcState string value – State code Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Tax_State_SalesTaxRate_Get_XML (“001”,”NJ”,0)
184
Tax_State_SalesTaxRate_Set_Data_Pull This function allows you to query the MOM database for multiple records from the State Sales Tax Rate table based on a filter condition you supply. It is used in conjunction with the Tax_State_SalesTaxRate_Get_Data_Pull function. This function must be called before calling the Tax_State_SalesTaxRate_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Tax_State_SalesTaxRate _Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox. Tax_State_SalesTaxRate_Set_Data_Pull(”1=1”)
185
Tax_State_SalesTaxRate_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Order_Set_Data_Pull. By default the API will return one row for each call to Order_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox. Tax_State_SalesTaxRate_Get_Data_Pull()
186
Tax_County_SalesTaxRate_Get_XML This function returns an xml representation of a record or records in the County sales tax rate table. For table structure, see Appendix B under Table File Structure – County Sales Tax Rates.
Parameters:
Name Description Required
lcCountry string value – M.O.M. Country code
Yes
lcState string value – M.O.M. State code Yes
lcCounty string value – M.O.M. County code
Yes
lnOption Integer value – 0 or 1
0 = get specified record.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output:
if function fails, ox.Error_Msg will contain error message.
If function successful, ox.xml contains the xml representation of a single or all records in the specified table.
Examples:
Visual FoxPro: nRetVal = ox. Tax_County_SalesTaxRate_Get_XML(“001”,”NJ”,”001”,0) lcXML = ox.XML
187
Tax_County_SalesTaxRate_Set_Data_Pull This function allows you to query the MOM database for multiple records from the County sales tax rate table based on a filter condition you supply. It is used in conjunction with the Tax_County_SalesTaxRate_Get_Data_Pull function, and must be called before Tax_County_SalesTaxRate_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Tax_County_SalesTaxRate_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Tax_County_SalesTaxRate_Set_Data_Pull(”1=1”)
188
Tax_County_SalesTaxRate_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Tax_County_SalesTaxRate_Set_Data_Pull. By default the API will return one row for each call to Tax_County_SalesTaxRate_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox. Tax_County_SalesTaxRate_Get_Data_Pull()
189
Tax_Zip_SalesTaxRate_Get_XML
This function gives you a specified record in the Zip code Sales Tax Rate Table by M.O.M. Country Code and state code.
Parameters:
Name Description Required
lcCountry string value – M.O.M. country code
Yes
lcZipCode string value – Zip code Yes
lnOption Integer value – used for future enhancement to allow for output flexabilty.
Yes. Must be zero.
Return Values:
Return Value Description
-1 Failure
1 Success
Output: ox.XML will contain the output in XML format.
Examples:
Visual FoxPro:
nRetVal = ox.Tax_Zip_SalesTaxRate_Get_XML ([001],[08752],0)
190
Tax_Zip_SalesTaxRate_Set_Data_Pull This function allows you to query the MOM database for multiple records from the State Sales Tax Rate table based on a filter condition you supply. It is used in conjunction with the Tax_Zip_SalesTaxRate_Get_Data_Pull function. This function must be called before calling the Tax_Zip_SalesTaxRate_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Tax_Zip_SalesTaxRate_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox Tax_Zip_SalesTaxRate_Set_Data_Pull(”1=1”)
191
Tax_Zip_SalesTaxRate_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Tax_Zip_SalesTaxRate_Set_Data_Pull. By default the API will return one row for each call to Tax_Zip_SalesTaxRate_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox Tax_Zip_SalesTaxRate_Get_Data_Pull()
192
Accounting_CCMerchantAccount_Get_XML This function returns an xml representation of the Credit Card Merchant Accounts Table record or records. For table structure, see Appendix B under Table File Structure – Credit Card Merchant Accounts.
Parameters:
Name Description Required
lcCC_Code string value – M.O.M. Card Code Yes
lnOption Integer value – 0 or 1
0 = get specified record in the credit card merchant account using MOM card code.
1 = get all records in the credit card merchant account. Ignores lcCC_Code parameter.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output:
if function fails, ox.Error_Msg will contain error message.
If function successful, ox.xml contains the xml representation of the credit card merchant account for single record or all records.
Examples:
Visual FoxPro: nRetVal = ox.Accounting_CCMerchantAccount_XML([AX], 0) lcXML = ox.XML
193
Accounting_CCMerchantAccount_Set_Data_Pull This function allows you to query the MOM database for multiple records from the Credit Card Merchant Accounts table based on a filter condition you supply. It is used in conjunction with the Accounting_CCMerchantAccount_Get_Data_Pull function. This function must be called before calling the Accounting_CCMerchantAccount_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Accounting_CCMerchantAccount_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox. Accounting_CCMerchantAccount_Set_Data_Pull(”1=1”)
194
Accounting_CCMerchantAccount_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Accounting_CCMerchantAccount_Set_Data_Pull. By default the API will return one row for each call to Accounting_CCMerchantAccount_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows. For table structure, see Appendix B under Table File Structure – Credit Card Merchant Accounts.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Order records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.Accounting_CCMerchantAccount_Get_Data_Pull()
195
Shipping_Method_Get_XML This function returns an xml representation of a record or records in the Shipping Methods Table. For table structure, see Appendix B under Table File Structure - Shipping Methods.
Parameters:
Name Description Required
lcCA_Code string value – M.O.M. shipping method code
Yes
lnOption Integer value – 0 or 1
0 = get specified record in the shipping methods table using MOM shipping method code.
1 = get all records in the shipping methods table. Ignores lcCA_Code parameter.
Yes
Return Values:
Return Value Description
-1 Failure
1 Success
Output:
if function fails, ox.Error_Msg will contain error message.
If function successful, ox.xml contains the xml representation of a single or all records in the specified table.
Examples:
Visual FoxPro: nRetVal = ox.Shipping_Carrier_Get_XML([UPS], 0) lcXML = ox.XML
196
Shipping_Method_Set_Data_Pull This function allows you to query the MOM database for multiple records from the shipping method table based on a filter condition you supply. It is used in conjunction with the Shipping_Method_Get_Data_Pull function, and must be called before Shipping_Method_Get_Data_Pull.
Parameters:
Name Description Required
lcWhere String value – filter condition. Any records matching the filter condition will be available using the Shipping_Method_Get_Data_Pull function.
Yes
Return Values:
Return Value Description
-1 Failure
Positive value Success – equals the number of records/rows that match supplied filter condition.
Output: None
Examples:
Visual FoxPro:
nRetVal = ox.Shipping_Method_Set_Data_Pull(”1=1”)
197
Shipping_Method_Get_Data_Pull This function generates the XML on the data that was filtered from a previous call to Shipping_Method_Set_Data_Pull. By default the API will return one row for each call to Shipping_Method_Get_Data_Pull. You can alter the API property RETURN_ROWS to allow this call to return multiple rows. For table structure, see Appendix B under Table File Structure - Shipping Methods.
Parameters:
Name Description Required
Return Values:
Return Value Description
-1 Failure
1 Success – more records may be in the queue
0 All records have been returned
Output: ox.XML will contain the selected Shipping Method records in XML format.
Examples:
Visual FoxPro:
Ox.Return_Rows = 100
nRetVal = ox.Shipping_Method_Get_Data_Pull()
198
Frequently Asked Questions
Q1: Why is the API not included on the M.O.M. Install CD?
A: The API is available on our support website for download. It is included as part of the core M.O.M. product offering. We anticipate rapid improvement cycles and therefore electronic distribution is the most efficient way to provide the updates.
Q2: How often will the API be updated?
A: Our current plan is to provide a monthly update to the API. The monthly update will include enhancements and address feedback from our customers.
Q3: How do I get data from my eCommerce system hosted by another vendor to interact with the M.O.M. API?
A: Computer systems that support a COM (Component Object Model) interface is necessary to interface with the M.O.M. API. Your programming team will need to define the data mapping and workflow necessary to interface with the M.O.M. API. Dydacomp’s professional service can provide fee-based service to help you with your programming and system integration projects.
Q4: Does the API require additional license seats or costs?
A: It is currently included in the M.O.M. license. No additional license seats are required.
Q5: Can the API be used to handle import/export and replace the current file import/export capabilities?
A: Yes
Q6: Does the API support SOAP or any other types of Web Services?
A: There are no plans at the moment to support Web Services. M.O.M. API is a COM (Component Object Model) interface.
Q7: Many APIs use Web Services like SOAP and REST. Why did Dydacomp decide to use COM instead? Are there plans to support SOAP in the future?
A: By exposing the API via COM calls, programmers will have finer control and can build very sophisticated interfaces to M.O.M. based on the large M.O.M. user base and the variety of interfaces that customers and partners want to build, the COM based interface can deliver the level of programming control to meet the wider audience needs.
Last Modified 3/28/2012 9:27 AM
199
Appendix A
How-To Sample Code C# Sample Code is provided below. Other sample codes in PHP and ASP are available on the support web site. Examples:
1. Establishing a Connection and Logging in
2. Creating and Modifying a Customer 3. Searching for a Customer 4. Generating an Output File for a Single Customer
5. Creating an Order 6. Modifying an Order
7. Creating a Stock Item 8. Modifying a Stock Item
9. Generating an Output File for Multiple Customers
10. Generating an Output File for a Single Stock Item 11. Generating an Output File for Multiple Stock Items
12. Generating an Output File for a Single Order 13. Generating an Output File for Multiple Orders 14. Generating an Output File for Items in a Single Order 15. Generating an Output File for Items in a Multiple Orders
16. Set Order Pay Method to eCheck with Authorization 17. Set Order Pay Method to eCheck without Authorization 18. Set Order Pay Method to Credit Card with Authorization
19. Change Order Shipping Type 20. Change Order Billing address 21. Change Order Shipping address 22. Change Order Sold-to address
23. Modifying Information of an Order Line Item 24. Modifying an Address of an Order Line Item 25. Modify the Gift Messages of an Order Line Item
26. Deleting an Order Line Item
200
27. Output single purchase order header information
28. Output multiple purchase order header information
29. Output single purchase order detail
30. Output multiple purchase order detail
31. Modify basic purchase order header information
32. Modifying Purchase Order Header Instructions
33. Adding a Purchase Order Detail
34. Removing a purchase order detail record
35. Modifying a purchase order detail record
36. Modifying purchase order detail supplier description
37. Modifying a purchase order detail special supplier instructions
38. Modifying a purchase order detail custom information
201
1. Establishing a Connection and Logging in
The following code snippet demonstrates how to establish a connection and login to M.O.M.:
mom_api.MOMFUNCTIONS ox = new mom_api.MOMFUNCTIONS();
// MOM versions “Standard” or “Premium”
string MOMVersion = "Standard";
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
string CompanyDir = "c:\\mom800\\";
string SharedDir = "c:\\mom800\\";
string MOMUserID = “MOM”; // Existing M.O.M. operator ID
string MOMPassword = “1234”; // Password for existing M.O.M. operator ID
string ConnStr = "Driver=SQL Server;server=MOM;Database=mailordermanager";
// Establish connection to MOM standard edition
if (MOMVersion == “Standard”)
Result = ox.DB_Connect_VFP(CompanyDir, SharedDir);
else
Result = ox.DB_Connect_SQL(ConnStr);
if (Result < 1)
{
202
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
Return false;
}
// Login to M.O.M.
Result = ox.Log_In(MOMUserID, MOMPassword);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
Return false;
}
Success = true;
Please Note: the following examples assume the following: Object ox has been created. Object has established connection to M.O.M. Object has logged in successfully to M.O.M.
2. Creating and Modifying a Customer
The following code snippet demonstrates how to create and modify a customer using the API functions:
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
203
int NewMOMCustomer; // Stores new M.O.M. customer number
string FirstName, LastName, Address1, City, State, ZipCode, Country;
// Create customer record with defaults.
// custnum = “new customer #” (auto-generated internal M.O.M. customer number)
// entrydate = Today's Date (The date the customer was first entered.)
// custtype = 'P' for prospect. (System assigned customer status)
// act_date = Today's Date (Customer's Last Activity Date.)
// lastuser = “M.O.M. operator ID” (User ID of last operator to view customer.)
// valdate = NULL (Initialize UPS address validation date to default)
// start_date = NULL (RESERVED.)
// end_date = NULL (RESERVED.)
Result = ox.Customer_Create();
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
Return false;
}
// Modify customer record
NewMOMCustomer = Result;
204
Result = ox.Customer_Modify(NewMOMCustomer);
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
Return false;
}
// Modify field values of customer record
FirstName = "John";
LastName = "Doe";
Address1 = "1 Main Street";
City = "Middletown";
State = "KS";
ZipCode = "88888";
Country = "001";
ox.OCUST.firstname = FirstName;
ox.OCUST.lastname = LastName;
ox.OCUST.addr = Address1;
ox.OCUST.city = City;
ox.OCUST.state = State;
ox.OCUST.zipcode = ZipCode;
ox.OCUST.country = Country;
205
// Save customer record
Result = ox.Customer_Save(NewMOMCustomer);
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
Return false;
}
Success = true;
3. Searching for a Customer
The following code snippet demonstrates how to search for a customer in M.O.M.:
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
bool Add_New;
string FirstName, LastName, Address1, Address2, City, State, ZipCode, Country,
Hono, Company;
// Set customer search criteria
FirstName = "John";
LastName = "Doe";
Address1 = "1 Main Street";
Address2 = "";
206
City = "Middletown";
State = "KS";
ZipCode = "88888";
Country = "001";
Hono = "";
Company = "";
Add_New = false;
// Perform customer search
Result = ox.Customer_Find(FirstName, LastName, Address1, Address2,
City, State, ZipCode, Country, Hono, Company, Add_New);
if (Result < 1)
{
/// Customer not found
Console.WriteLine("Customer not Found!");
Return false;
}
Console.WriteLine("Customer Found!");
Success = true;
4. Generating an Output File for a single Customer
The following code snippet demonstrates how to get an XML representation of an existing customer:
207
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
int MOMCustomer = 1234; // Existing M.O.M. customer number
string FullPath = "C:\Customer.xml"; // output file name, including path
Result = ox.Customer_Get(MOMCustomer);
if (Result < 1)
{
//Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
// Create the file and write to it.
File.WriteAllText(FullPath, ox.XML);
if (!File.Exists(FullPath))
{
Console.WriteLine("> File could NOT be created: " + FullPath1);
Return false;
}
Success = true;
208
5. Creating a New Order
The following code snippet demonstrates how to create a new order:
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
int NewMOMOrder; // stores new M.O.M. order number
int MOMCustomer = 1234; // Existing M.O.M. customer number
Result = ox.Order_Create(MOMCustomer, 0, 0, "B");
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
Return false;
}
NewMOMOrder = Result;
Result = ox.OrdDetail_Create(NewMOMOrder,"SHUMAI", 1,false,0.00,0);
If (Result < 1)
{
/// Handle Error
Console.WriteLine("ERROR MESSAGE:" +
ox.ERROR_MSG);
209
Return false;
}
Result = ox.Order_Payment_CK(NewMOMOrder, "123456", 22.83);
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
Result = ox.Order_Shipping(NewMOMOrder, "UPS", false, 0, false);
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
Result = ox.Order_Calculate_Totals(NewMOMOrder);
If (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
210
if (!ox.SAVE_PARTIAL_ORDERS)
{
Result = ox.Order_Save(NewMOMOrder);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
}
Success = true;
6. Modifying an Order
The following code snippet demonstrates how modify an existing order:
211
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
int MOMOrder = 1311; // Existing M.O.M. order number
// Grab Order
Result = ox.Order_Modify(MOMOrder);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
// Set Sales Information on Order
Result = ox.Order_Sales_Info(MOMOrder,"MY SOURCE","02","SAL","","");
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
// Set Order Promotion Code
Result = ox.Order_Promotion(MOMOrder, "FREEPROD", false)
if (Result < 1)
212
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
// Calculate Order Totals
Result = ox.Order_Calculate_Totals(MOMOrder);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
if (!ox.SAVE_PARTIAL_ORDERS)
{
Result = ox.Order_Save(MOMOrder);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
}
213
Success = true;
7. Creating a Stock Item
The following code snippet demonstrates how to create a new product:
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
string NewStockItem; // New M.O.M. Stock Item Number
int NewStockID; // Auto-generated internal M.O.M. Stock Item ID
214
NewStockItem = "NEW ITEM";
Result = ox.Stock_Create(NewStockItem);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
NewStockID = Result;
Success = true;
8. Modifying a Stock Item
The following code snippet demonstrates how to modify an existing product:
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
string StockItem = "BASEBALL"; // Existing M.O.M. Stock Item Number
int StockID; // Auto-generated internal M.O.M. Stock Item ID
215
Result = ox.Stock_Modify(StockItem);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
StockID = Result;
ox.OSTOCK.desc2 = "THE NEW YORK YANKEES";
Result = ox.Stock_Save(StockID);
if (Result < 1)
{
/// Handle Error
Console.WriteLine(ox.ERROR_MSG);
return false;
}
Success = true;
216
9. Generating an Output File for Multiple Customers
The following code snippet demonstrates how to get an XML representation of multiple customers:
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully
string lcPrefix = "CustomerS";
string lcSuffix = Path.GetRandomFileName();
// since we can potentially have hundreds of records,
// we need to break up the records into separate batch files containing a
specified batch count.
217
int nBatchCount = 5;
int nTotalRecords = 0;
string activeDir;
string newPath;
string newFileName1;
string FullPath1;
string lcWhere;
lcWhere = "custnum >= 1200 and custnum < 1205";
Result = ox.Customer_Set_Data_Pull(lcWhere);
if (Result < 0)
return false;
nTotalRecords = Result;
// Store current directory.
activeDir = Directory.GetCurrentDirectory();
//Create a new subfolder under the current active folder.
newPath = Path.Combine(activeDir, "mySubDir");
Directory.CreateDirectory(newPath);
newPath = strFolder;
ox.RETURN_ROWS = nBatchCount;
218
string lcEmptyXML = ox.XML;
//// Determine file count based on total number of records and batch size
// for each file. Store into variable 'cntd'.
// get quotient of x / y
int cntd = nTotalRecords / nBatchCount;
// get remainder of x % y
int cntr = nTotalRecords % nBatchCount;
// if remainder>0, Add 1 to file count
if (cntr > 0)
cntd++;
for (int i = 0; i <= cntd - 1; i++)
{
//if (ox.XML == string.Empty)
// break;
Result = ox.Customer_Get_Data_Pull();
if (Result < 0)
return false;
// Create a new file name. This example generates
// a random string.
string lcNum = (i + 1).ToString().PadLeft(5, Convert.ToChar("0"));
219
if (cntd == 1)
newFileName1 = lcPrefix + "_" + lcSuffix + ".xml";
else
newFileName1 = lcPrefix + "_" + lcNum + "_" + cntd.ToString() + "_" + lcSuffix + ".xml";
// Combine the new file name with the path
FullPath1 = Path.Combine(newPath, newFileName1);
// Create the file and write to it.
File.WriteAllText(FullPath1, ox.XML);
}
Success = true;
220
10. Generating an Output File for a single Stock Item
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. string lcPrefix = "StockItem"; string lcSuffix = Path.GetRandomFileName(); string MOMStockItem = "V-YANKEES"; // Existing M.O.M. customer number string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path Console.WriteLine("1> Get Stock Item"); Result = ox.Stock_Get(MOMStockItem); Success = !(Result < 1); if (!Success) { return false; } // Create the file and write to it. Console.WriteLine("2> Create Stock Item file"); File.WriteAllText(FullPath, ox.XML); Success = File.Exists(FullPath); if (!Success) { return false; } Success = true; Console.WriteLine(" File:" + FullPath); Console.WriteLine(""); return Success;
11. Generating an Output File for multiple Stock Items
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully string lcPrefix = "StockItemS"; string lcSuffix = Path.GetRandomFileName(); // since we can potentially have hundreds of records,
221
// we need to break up the records into separate batch files containing a specified batch count. int nBatchCount = 10; int nTotalRecords = 0; string activeDir; string newPath; string newFileName1; string FullPath1; string lcWhere; lcWhere = "size_color"; Result = ox.Stock_Set_Data_Pull(lcWhere); if (Result < 0) { /// Handle Error Console.WriteLine(ox.ERROR_MSG); return false; } if (Result == 0) { Console.WriteLine("Dataset empty!"); return true; } nTotalRecords = Result; // Store current directory. activeDir = Directory.GetCurrentDirectory(); //Create a new subfolder under the current active folder. newPath = Path.Combine(activeDir, "mySubDir"); Directory.CreateDirectory(newPath); newPath = strFolder; ox.RETURN_ROWS = nBatchCount; string lcEmptyXML = ox.XML; //// Determine file count based on total number of records and batch size for each file. Store into variable 'cntd'. // get quotient of x / y int cntd = nTotalRecords / nBatchCount; // get remainder of x % y int cntr = nTotalRecords % nBatchCount; // if remainder>0, Add 1 to file count if (cntr > 0) cntd++; if (cntd == 1) Console.WriteLine("> Creating batch file with " + nBatchCount.ToString() + " record(s)"); else Console.WriteLine("> Creating " + cntd.ToString() + " file(s) with
222
batches of at most " + nBatchCount.ToString() + " record(s)"); for (int i = 0; i <= cntd - 1; i++) { //if (ox.XML == string.Empty) // break; if (nTotalRecords <= nBatchCount) Console.WriteLine("> Retrieve batch"); else Console.WriteLine("> Retrieve batch of " + nBatchCount); Result = ox.Stock_Get_Data_Pull(); if (Result < 0) { Console.WriteLine("Testing API: Failed."); Console.WriteLine("Testing API: ERROR MESSAGE:" + ox.ERROR_MSG); ox.XML = ""; return false; //break; } else Console.WriteLine("Testing API: Succeeded."); Console.WriteLine("> XML with " + nBatchCount.ToString() + " record(s) from customer table "); // Create a new file name. This example generates // a random string. string lcNum = (i + 1).ToString().PadLeft(5, Convert.ToChar("0")); if (cntd == 1) newFileName1 = lcPrefix + "_" + lcSuffix + ".xml"; else newFileName1 = lcPrefix + "_" + lcNum + "_" + cntd.ToString() + "_" + lcSuffix + ".xml"; // Combine the new file name with the path FullPath1 = Path.Combine(newPath, newFileName1); // Create the file and write to it. File.WriteAllText(FullPath1, ox.XML); Console.WriteLine("> File created: " + FullPath1); Success = true; } Console.WriteLine(""); return Success;
12. Generating an Output File for a single Order
223
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. string lcPrefix = "Order"; string lcSuffix = Path.GetRandomFileName(); int MOMOrderNo = 1470; // Existing M.O.M. order string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path Console.WriteLine("1> Get Order"); Result = ox.Order_Get(MOMOrderNo); Success = !(Result < 1); if (!Success) { return false; } // Create the file and write to it. Console.WriteLine("2> Create Order file"); File.WriteAllText(FullPath, ox.XML); Success = File.Exists(FullPath); if (!Success) { return false; } Success = true; Console.WriteLine(" File:" + FullPath); Console.WriteLine(""); return Success;
13. Generating an Output File for multiple Orders
Console.WriteLine(">> Outputting Order Data Pull.."); sys_Pause("Press any key to continue"); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully string lcPrefix = "OrderS"; string lcSuffix = Path.GetRandomFileName(); // since we can potentially have hundreds of records,
224
// we need to break up the records into separate batch files containing a specified batch count. int nBatchCount = 5; int nTotalRecords = 0; string activeDir; string newPath; string newFileName1; string FullPath1; string lcWhere; lcWhere = "orderno >= 1470 and orderno < 1477"; Result = ox.Order_Set_Data_Pull(lcWhere); if (Result < 0) { /// Handle Error Console.WriteLine(ox.ERROR_MSG); return false; } if (Result == 0) { Console.WriteLine("Dataset empty!"); return true; } nTotalRecords = Result; // Store current directory. activeDir = Directory.GetCurrentDirectory(); //Create a new subfolder under the current active folder. newPath = Path.Combine(activeDir, "mySubDir"); Directory.CreateDirectory(newPath); newPath = strFolder; ox.RETURN_ROWS = nBatchCount; string lcEmptyXML = ox.XML; //// Determine file count based on total number of records and batch size for each file. Store into variable 'cntd'. // get quotient of x / y int cntd = nTotalRecords / nBatchCount; // get remainder of x % y int cntr = nTotalRecords % nBatchCount; // if remainder>0, Add 1 to file count if (cntr > 0) cntd++; if (cntd == 1) Console.WriteLine("> Creating batch file with " + nBatchCount.ToString() + " record(s)"); else Console.WriteLine("> Creating " + cntd.ToString() + " file(s) with
225
batches of at most " + nBatchCount.ToString() + " record(s)"); for (int i = 0; i <= cntd - 1; i++) { //if (ox.XML == string.Empty) // break; if (nTotalRecords <= nBatchCount) Console.WriteLine("> Retrieve batch"); else Console.WriteLine("> Retrieve batch of " + nBatchCount); Result = ox.Order_Get_Data_Pull(); if (Result < 0) { Console.WriteLine("Testing API: Failed."); Console.WriteLine("Testing API: ERROR MESSAGE:" + ox.ERROR_MSG); ox.XML = ""; return false; //break; } else Console.WriteLine("Testing API: Succeeded."); Console.WriteLine("> XML with " + nBatchCount.ToString() + " record(s) from customer table "); // Create a new file name. This example generates // a random string. string lcNum = (i + 1).ToString().PadLeft(5, Convert.ToChar("0")); if (cntd == 1) newFileName1 = lcPrefix + "_" + lcSuffix + ".xml"; else newFileName1 = lcPrefix + "_" + lcNum + "_" + cntd.ToString() + "_" + lcSuffix + ".xml"; // Combine the new file name with the path FullPath1 = Path.Combine(newPath, newFileName1); // Create the file and write to it. File.WriteAllText(FullPath1, ox.XML); Console.WriteLine("> File created: " + FullPath1); Success = true; } Console.WriteLine(""); return Success;
14. Generating an Output File for Items in an Single Order
226
Console.WriteLine(">> Generating an Output File of line items for a single Order...."); sys_Pause("Press any key to continue"); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. string lcPrefix = "OrdDetail"; string lcSuffix = Path.GetRandomFileName(); int MOMOrderNo = 1530; // Existing M.O.M. order string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path Console.WriteLine("1> Get Order"); Result = ox.OrdDetail_Get(MOMOrderNo); Success = !(Result < 1); if (!Success) { return false; } // Create the file and write to it. Console.WriteLine("2> Create Order file"); File.WriteAllText(FullPath, ox.XML); Success = File.Exists(FullPath); if (!Success) { return false; } Success = true; Console.WriteLine(" File:" + FullPath); Console.WriteLine(""); return Success;
15. Generating an Output File for Items Multiple Orders
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully string lcPrefix = "OrdDetailS"; string lcSuffix = Path.GetRandomFileName(); // since we can potentially have hundreds of records,
227
// we need to break up the records into separate batch files containing a specified batch count. int nBatchCount = 5; int nTotalRecords = 0; string activeDir; string newPath; string newFileName1; string FullPath1; string lcWhere; lcWhere = "orderno >= 1494 and orderno < 1500"; Result = ox.OrdDetail_Set_Data_Pull(lcWhere); if (Result < 0) { /// Handle Error Console.WriteLine(ox.ERROR_MSG); return false; } if (Result == 0) { Console.WriteLine("Dataset empty!"); return true; } nTotalRecords = Result; // Store current directory. activeDir = Directory.GetCurrentDirectory(); //Create a new subfolder under the current active folder. newPath = Path.Combine(activeDir, "mySubDir"); Directory.CreateDirectory(newPath); newPath = strFolder; ox.RETURN_ROWS = nBatchCount; string lcEmptyXML = ox.XML; //// Determine file count based on total number of records and batch size for each file. Store into variable 'cntd'. // get quotient of x / y int cntd = nTotalRecords / nBatchCount; // get remainder of x % y int cntr = nTotalRecords % nBatchCount; // if remainder>0, Add 1 to file count if (cntr > 0) cntd++; if (cntd == 1) Console.WriteLine("> Creating batch file with " + nBatchCount.ToString() + " record(s)"); else Console.WriteLine("> Creating " + cntd.ToString() + " file(s) with
228
batches of at most " + nBatchCount.ToString() + " record(s)"); for (int i = 0; i <= cntd - 1; i++) { //if (ox.XML == string.Empty) // break; if (nTotalRecords <= nBatchCount) Console.WriteLine("> Retrieve batch"); else Console.WriteLine("> Retrieve batch of " + nBatchCount); Result = ox.OrdDetail_Get_Data_Pull(); if (Result < 0) { Console.WriteLine("Testing API: Failed."); Console.WriteLine("Testing API: ERROR MESSAGE:" + ox.ERROR_MSG); ox.XML = ""; return false; //break; } else Console.WriteLine("Testing API: Succeeded."); Console.WriteLine("> XML with " + nBatchCount.ToString() + " record(s) from customer table "); // Create a new file name. This example generates // a random string. string lcNum = (i + 1).ToString().PadLeft(5, Convert.ToChar("0")); if (cntd == 1) newFileName1 = lcPrefix + "_" + lcSuffix + ".xml"; else newFileName1 = lcPrefix + "_" + lcNum + "_" + cntd.ToString() + "_" + lcSuffix + ".xml"; // Combine the new file name with the path FullPath1 = Path.Combine(newPath, newFileName1); // Create the file and write to it. File.WriteAllText(FullPath1, ox.XML); Console.WriteLine("> File created: " + FullPath1); Success = true; } Console.WriteLine(""); return Success;
16. Set Order Pay Method to eCheck with Authorization
229
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int NewMOMOrder = -1; // stores new M.O.M. order number int MOMCustomer = -1; // Existing M.O.M. customer number string MOMStockItem1 = string.Empty; string MOMStockItem2 = string.Empty; //MOMCustomer = System.Int32.Parse(ConfigurationManager.AppSettings["MOMCustomer"]); //MOMCustomer = custnum_last; MOMCustomer = 1741; MOMStockItem1 = "3759 11X19"; MOMStockItem2 = "V-YANKEES"; Console.WriteLine("1> Create order number."); Result = ox.Order_Create(MOMCustomer, 0, 0, "B"); NewMOMOrder = Result; Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Add Item."); Result = ox.Order_Add_Item(NewMOMOrder, MOMStockItem1, 1, false, 0.00, 0, 0, "UPN", "", "", "", "", "", ""); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2b> Add Item."); Result = ox.Order_Add_Item(NewMOMOrder, MOMStockItem2, 1, false, 0.00, 0, 0, "UPN", "", "", "", "", "", ""); Success = !(Result < 1); if (!Success) { return false; } string lcAnTrans_id = Path.GetRandomFileName(); Console.WriteLine("3> Set eCheck payment method."); Result = ox.Order_Payment_EC_Auth(NewMOMOrder, "096000661", "TCBNJ", "1010770770", "P", "Checking", "0755", "TEST", "NY", "CAPITAL ONE", "NJ", "1", "1234567890", lcAnTrans_id, 10.01, "2011-10-19"); Success = !(Result < 1); if (!Success) {
230
return false; } Console.WriteLine("4> Set shipping method."); Result = ox.Order_Shipping(NewMOMOrder, "UPS", false, 0, false); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("5> Calculate order total."); Result = ox.Order_Calculate_Totals(NewMOMOrder); Success = !(Result < 1); if (!Success) { return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("6> Save all changes to order."); Result = ox.Order_Save(NewMOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
17. Set Order Pay Method to eCheck without Authorization
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int NewMOMOrder = -1; // stores new M.O.M. order number int MOMCustomer = -1; // Existing M.O.M. customer number string MOMStockItem1 = string.Empty; string MOMStockItem2 = string.Empty; //MOMCustomer = System.Int32.Parse(ConfigurationManager.AppSettings["MOMCustomer"]);
231
//MOMCustomer = custnum_last; MOMCustomer = 1741; MOMStockItem1 = "3759 11X19"; MOMStockItem2 = "V-YANKEES"; Console.WriteLine("1> Create order number."); Result = ox.Order_Create(MOMCustomer, 0, 0, "B"); NewMOMOrder = Result; Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Add Item."); Result = ox.Order_Add_Item(NewMOMOrder, MOMStockItem1, 1, false, 0.00, 0, 0, "UPN", "", "", "", "", "", ""); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2b> Add Item."); Result = ox.Order_Add_Item(NewMOMOrder, MOMStockItem2, 1, false, 0.00, 0, 0, "UPN", "", "", "", "", "", ""); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("3> Set eCheck payment method."); Result = ox.Order_Payment_EC(NewMOMOrder, "096000661", "TCBNJ", "1010770770", "P", "Checking", "0755", "TEST", "NY", "CAPITAL ONE", "NJ"); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("4> Set shipping method."); Result = ox.Order_Shipping(NewMOMOrder, "UPS", false, 0, false); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("5> Calculate order total.");
232
Result = ox.Order_Calculate_Totals(NewMOMOrder); Success = !(Result < 1); if (!Success) { return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("6> Save all changes to order."); Result = ox.Order_Save(NewMOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
18. Set Order Pay Method to Credit Card with
Authorization
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int NewMOMOrder = -1; // stores new M.O.M. order number int MOMCustomer = -1; // Existing M.O.M. customer number string MOMStockItem1 = string.Empty; string MOMStockItem2 = string.Empty; //MOMCustomer = System.Int32.Parse(ConfigurationManager.AppSettings["MOMCustomer"]); //MOMCustomer = custnum_last; MOMCustomer = 1741; MOMStockItem1 = "3759 11X19"; MOMStockItem2 = "V-YANKEES"; Console.WriteLine("1> Create order number."); Result = ox.Order_Create(MOMCustomer, 0, 0, "B"); NewMOMOrder = Result; Success = !(Result < 1); if (!Success)
233
{ return false; } Console.WriteLine("2> Add Item."); Result = ox.Order_Add_Item(NewMOMOrder, MOMStockItem1, 1, false, 0.00, 0, 0, "UPN", "", "", "", "", "", ""); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2b> Add Item."); Result = ox.Order_Add_Item(NewMOMOrder, MOMStockItem2, 1, false, 0.00, 0, 0, "UPN", "", "", "", "", "", ""); Success = !(Result < 1); if (!Success) { return false; } string lcAnTrans_id = Path.GetRandomFileName(); Console.WriteLine("3> Set payment method."); Result = ox.Order_Payment_CC_Auth(NewMOMOrder, "VI", "4007000000027", "12/14", "1234","1", "1234567890",lcAnTrans_id,99.99,"2011-10-19","","","",0); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("4> Set shipping method."); Result = ox.Order_Shipping(NewMOMOrder, "UPS", false, 0, false); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("5> Calculate order total."); Result = ox.Order_Calculate_Totals(NewMOMOrder); Success = !(Result < 1); if (!Success) { return false; } if (!ox.SAVE_PARTIAL_ORDERS)
234
{ Console.WriteLine("6> Save all changes to order."); Result = ox.Order_Save(NewMOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
19. Change Order Shipping Type
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1520; // Existing M.O.M. order number // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set Shipping Type to [S]."); Result = ox.Order_Address_ShippingType(1543, 348, 349, 0, "S"); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) {
235
return false; } } Success = true; Console.WriteLine(""); return Success;
20. Change Order Billing address
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1520; // Existing M.O.M. order number int MOMCustomer_Billto = 656; // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set Bill-to Address to " + MOMCustomer_Billto.ToString()); Result = ox.Order_Address_BillTo(MOMOrder, MOMCustomer_Billto); Success = !(Result < 1); if (!Success) { //return false; } Console.WriteLine("4> Set payment method."); Result = ox.Order_Payment_CC(MOMOrder, "VI", "4007000000027", "12/14", ""); Success = !(Result < 1); if (!Success) { return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("5> Save all changes to order.");
236
Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
21. Change Order Shipping address
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1520; // Existing M.O.M. order number // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set Ship-to Address to 657"); Result = ox.Order_Address_ShipTo(1511, 657); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; }
237
} Success = true; Console.WriteLine(""); return Success;
22. Change Order Sold-to address
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1520; // Existing M.O.M. order number // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set Sold-to Address to 756"); Result = ox.Order_Address_SoldTo(MOMOrder, 756); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
238
23. Modifying information of an Order Line Item
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1470; // Existing M.O.M. order number int LineItemID = 2028; // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set Qty to 1 for line item ID: " + LineItemID.ToString()); Result = ox.OrdDetail_Info(MOMOrder, LineItemID, 5, 50.00, 0, "test", "", ""); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
239
24. Modifying an Address of an Order Line Item
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1470; // Existing M.O.M. order number int LineItemID = 2028; // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set address of line item ID: " + LineItemID.ToString()); Result = ox.OrdDetail_Address(MOMOrder, LineItemID, 285); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
25. Modify the Gift Messages of an Order Line Item
240
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMOrder = 1471; // Existing M.O.M. order number int LineItemID = 1973; // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("2> Set gift messages for line item ID: " + LineItemID.ToString()); Result = ox.OrdDetail_GiftMessage(MOMOrder, LineItemID, "msg1", "msg2", "msg3", "msg4", "msg5", "msg6"); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
26. Deleting an Order Line Item
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully.
241
int MOMOrder = 1525; // Existing M.O.M. order number int MOMOrder_LineID = 2204; //MOMOrder = System.Int32.Parse(ConfigurationManager.AppSettings["MOMOrder"]); // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); Result = ox.Order_Modify(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } Console.WriteLine("3> Delete Line Item."); Result = ox.OrdDetail_Delete(MOMOrder, MOMOrder_LineID, "0"); Success = !(Result < 1); if (!Success) { //return false; } if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("6> Save all changes to order."); Result = ox.Order_Save(MOMOrder); Success = !(Result < 1); if (!Success) { return false; } } Success = true; Console.WriteLine(""); return Success;
242
27. Output single purchase order header information
code snippet:
mom_api.MOMFUNCTIONS ox = new mom_api.MOMFUNCTIONS();
DisplayHeader(sampleid, "Output single purchase order header information]");
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
string lcPrefix = "d_Purchase";
string lcSuffix = Path.GetRandomFileName();
// output file name, including path
string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml";
Console.WriteLine("1. Get Purchase Order");
// Existing M.O.M. order
MOMPONumber = Get_Integer("Enter MOM PO Number:");
Result = _API.Purchase_Get(MOMPONumber);
if (Result < 1)
return false;
// Create the file and write to it.
Console.WriteLine("2. Create Purchase Order output file");
File.WriteAllText(FullPath, ox.XML);
if (File.Exists(FullPath))
{
243
Success = true;
Console.WriteLine("Outpute file created successfully. File:" + FullPath);
}
else
{
Success = false;
Console.WriteLine("Output file could not be created!!!");
}
////_APP.sys_DisplayTask(Success);
return Success;
Please Note: the following examples assume the following: Object ox has been created. Object has established connection to M.O.M. Object has logged in successfully to M.O.M.
28. Output multiple purchase order header information
DisplayHeader(sampleid, "[Output multiple purchase order header information]");
Console.WriteLine("");
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully
244
string lcPrefix = "d_PurchaseS";
string lcSuffix = Path.GetRandomFileName();
// since we can potentially have hundreds of records,
// we need to break up the records into separate batch files containing a specified batch count.
int nBatchCount = 5;
int nTotalRecords = 0;
string activeDir;
string newPath;
string newFileName1;
string FullPath1;
start_ponumber = Get_Integer("Enter start MOM PO Number:");
end_ponumber = Get_Integer("Enter end MOM PO Number:");
string lcWhere;
lcWhere = "ponumber >= " + start_ponumber.ToString() + " and ponumber < " + (end_ponumber+1).ToString() + "";
Result = _API.Purchase_Set_Data_Pull(lcWhere);
nBatchCount = Result;
if (Result < 0)
return false;
if (Result == 0)
{
Console.WriteLine("Dataset empty!");
return true;
245
}
nTotalRecords = Result;
// Store current directory.
activeDir = Directory.GetCurrentDirectory();
//Create a new subfolder under the current active folder.
newPath = Path.Combine(activeDir, "Output");
Directory.CreateDirectory(newPath);
newPath = strFolder;
Console.WriteLine("Set batch record count to " + nBatchCount.ToString());
ox.RETURN_ROWS = nBatchCount;
////_APP.sys_ShowCode("ox.RETURN_ROWS = " + nBatchCount.ToString() + ";");
string lcEmptyXML = ox.XML;
//// Determine file count based on total number of records and batch size for each file. Store into variable 'cntd'.
// get quotient of x / y
int cntd = nTotalRecords / nBatchCount;
// get remainder of x % y
int cntr = nTotalRecords % nBatchCount;
// if remainder>0, Add 1 to file count
if (cntr > 0)
cntd++;
246
if (cntd == 1)
Console.WriteLine("Creating batch file containing " + nBatchCount.ToString() + " record(s)");
else
Console.WriteLine("Creating " + cntd.ToString() + " batch file(s) containing at most " + nBatchCount.ToString() + " record(s)");
for (int i = 0; i <= cntd - 1; i++)
{
//if (ox.XML == string.Empty)
// break;
if (nTotalRecords <= nBatchCount)
Console.WriteLine("Retrieve single batch");
else
Console.WriteLine("Retrieve batch # " + (i+1).ToString());
Result = _API.Purchase_Get_Data_Pull();
if (Result < 0)
{
ox.XML = "";
return false;
}
// Create a new file name. This example generates
// a random string.
string lcNum = (i + 1).ToString().PadLeft(5, Convert.ToChar("0"));
if (cntd == 1)
247
newFileName1 = lcPrefix + "_" + lcSuffix + ".xml";
else
newFileName1 = lcPrefix + "_" + lcNum + "_" + cntd.ToString() + "_" + lcSuffix + ".xml";
// Combine the new file name with the path
FullPath1 = Path.Combine(newPath, newFileName1);
// Create the file and write to it.
File.WriteAllText(FullPath1, ox.XML);
Console.WriteLine("File created: " + FullPath1);
Console.WriteLine("");
Success = true;
}
////_APP.sys_DisplayTask(Success);
return Success;
29. Output single purchase order detail
DisplayHeader(sampleid, "[Output single purchase order detail information]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
248
string lcPrefix = "d_Purdetail";
string lcSuffix = Path.GetRandomFileName();
// Existing M.O.M. order
string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path
Console.WriteLine("1. Get line items for a single Purchase Order");
MOMPONumber = Get_Integer("Enter MOM PO Number:");
Result = _API.PurDetail_Get(MOMPONumber);
if (Result < 1)
return false;
// Create the file and write to it.
Console.WriteLine("2. Create Purchase Order line items output file");
File.WriteAllText(FullPath, _API.ox.XML);
if (!File.Exists(FullPath))
{
Console.WriteLine("Output file could not be created!!!");
return false;
}
Console.WriteLine(" File:" + FullPath);
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
249
30. Output multiple purchase order detail
DisplayHeader(sampleid, "[Output multiple purchase order detail information]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully
string lcPrefix = "d_PuritemS";
string lcSuffix = Path.GetRandomFileName();
// since we can potentially have hundreds of records,
// we need to break up the records into separate batch files containing a specified batch count.
int nBatchCount = 5;
int nTotalRecords = 0;
string activeDir;
string newPath;
string newFileName1;
string FullPath1;
start_ponumber = Get_Integer("Enter start MOM PO Number:");
250
end_ponumber = Get_Integer("Enter end MOM PO Number:");
string lcWhere;
lcWhere = "ponumber >= " + start_ponumber.ToString() + " and ponumber < " + (end_ponumber+1).ToString() + "";
Result = _API.PurDetail_Set_Data_Pull(lcWhere);
nBatchCount = Result;
if (Result == 0)
{
Console.WriteLine("Dataset empty!");
return true;
}
nTotalRecords = Result;
// Store current directory.
activeDir = Directory.GetCurrentDirectory();
//Create a new subfolder under the current active folder.
newPath = Path.Combine(activeDir, "Output");
Directory.CreateDirectory(newPath);
newPath = strFolder;
_API.ox.RETURN_ROWS = nBatchCount;
string lcEmptyXML = _API.ox.XML;
251
//// Determine file count based on total number of records and batch size for each file. Store into variable 'cntd'.
// get quotient of x / y
int cntd = nTotalRecords / nBatchCount;
// get remainder of x % y
int cntr = nTotalRecords % nBatchCount;
// if remainder>0, Add 1 to file count
if (cntr > 0)
cntd++;
if (cntd == 1)
Console.WriteLine("Creating batch file with at most " + nBatchCount.ToString() + " record(s)");
else
Console.WriteLine("Creating " + cntd.ToString() + " batch file(s) with at most " + nBatchCount.ToString() + " record(s)");
for (int i = 0; i <= cntd - 1; i++)
{
//if (_API.ox.XML == string.Empty)
// break;
if (nTotalRecords <= nBatchCount)
Console.WriteLine("Retrieve single batch");
else
Console.WriteLine("Retrieve batch #" + (i+1).ToString());
Result = _API.PurDetail_Get_Data_Pull();
252
if (Result < 0)
{
Console.WriteLine("Testing API: Failed.");
Console.WriteLine("Testing API: ERROR MESSAGE:" + _API.ox.ERROR_MSG);
_API.ox.XML = "";
return false;
//break;
}
//else
//Console.WriteLine("Testing API: Succeeded.");
// Create a new file name. This example generates
// a random string.
string lcNum = (i + 1).ToString().PadLeft(5, Convert.ToChar("0"));
if (cntd == 1)
newFileName1 = lcPrefix + "_" + lcSuffix + ".xml";
else
newFileName1 = lcPrefix + "_" + lcNum + "_" + cntd.ToString() + "_" + lcSuffix + ".xml";
// Combine the new file name with the path
FullPath1 = Path.Combine(newPath, newFileName1);
// Create the file and write to it.
File.WriteAllText(FullPath1, _API.ox.XML);
253
Console.WriteLine("File created: " + FullPath1);
Console.WriteLine("");
Success = true;
}
//_APP.sys_DisplayTask(Success);
return Success;
31. Modify basic purchase order header information
DisplayHeader(sampleid, "[Modifying basic purchase order header information]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
// Existing M.O.M. purchase order number
MOMPONumber = Get_Integer("Enter MOM PO Number:");
Result = _API.Purchase_Modify(MOMPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Set Purchase Order information .");
254
Result = _API.Purchase_Info(MOMPONumber, "ref", "", false, "");
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(MOMPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
32. Modifying Purchase Order Header Instructions
DisplayHeader(sampleid, "[Modifying Purchase Order header instructions]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // Store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
// Existing M.O.M. purchase order number
MOMPONumber = Get_Integer("Enter MOM PO Number:");
255
Result = _API.Purchase_Modify(MOMPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Update Purchase Order Instructions.");
Result = _API.Purchase_Instructions(MOMPONumber, "instruction line 1", "instruction line 2", "instruction line 3");
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(MOMPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
33. Adding a Purchase Order Detail
The following code snippet demonstrates how to create a new product:
DisplayHeader(sampleid, "[Adding a Purchase Order detail]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result = -1; // Store value returned from API Call
256
bool Success = false; // Store whether or not task completed successfully.
int lnPONumber = 4;
string lcNumber = "FR-R92 B-52 ";
int lnQty = 1;
string lcUOM = "";
double lnVolume = 0 ;
double lnWeight = 0 ;
string lcExpect_On = "";
int lnQtyDeliv = 0;
bool llUse_Cost = false ;
int lnFactor = 0;
double lnUnit_Cost =0;
int lnDiscount = 0;
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
lnPONumber = Get_Integer("Enter MOM PO Number:");
lcNumber = Get_String("Enter MOM Stock Item Number:");
Result = _API.Purchase_Modify(lnPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Create purchase order line item record.");
Result = _API.PurDetail_Create(lnPONumber, lcNumber, lnQty, lcUOM, lnVolume, lnWeight, lcExpect_On, lnQtyDeliv, llUse_Cost, lnFactor, lnUnit_Cost, lnDiscount);
if (Result < 1)
return false;
257
MOM_PurItem_id = Result;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(lnPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
34. Removing a purchase order detail record
DisplayHeader(sampleid, "[Removing a purchase order detail]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // Store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
// int MOMPONumber = 167; // Existing M.O.M. purchase order number
// int MOMPO_LineID = 436;
258
int lnPONumber = 4;
int lnPurItem_id = MOM_PurItem_id;
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
lnPONumber = Get_Integer("Enter MOM PO Number:");
Result = _API.Purchase_Modify(lnPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Delete purchase order line item.");
lnPurItem_id = Get_Integer("Enter MOM Puritem_id:");
Result = _API.PurDetail_Delete(lnPONumber, lnPurItem_id);
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(lnPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
259
35. Modifying a purchase order detail record
DisplayHeader(sampleid, "[Modifying a purchase order detail info]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // Store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
260
MOMPONumber = Get_Integer("Enter MOM PONumber:");
Result = _API.Purchase_Modify(MOMPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Update Purchase Order Info.");
MOMPO_LineID = Get_Integer("Enter MOM Puritem_id:");
Result = _API.PurDetail_Info(MOMPONumber, MOMPO_LineID, 1, "", 0, 0, "", false, 0, 0, 0);
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(MOMPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
261
36. Modifying purchase order detail supplier description
DisplayHeader(sampleid, "[Modifying a purchase order detail description to supplier]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // Store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
MOMPONumber = Get_Integer("Enter MOM PONumber:");
Result = _API.Purchase_Modify(MOMPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Update Purchase Order Supplier Descriptions.");
MOMPO_LineID = Get_Integer("Enter MOM Puritem_id:");
Result = _API.PurDetail_SupplierDesc(MOMPONumber, MOMPO_LineID, "Change Desc line 1..", "Change Desc Line 2..");
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
262
Result = _API.Purchase_Save(MOMPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
37. Modifying a purchase order detail special supplier
instructions
DisplayHeader(sampleid, "[Modifying a purchase order detail special supplier instructions]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // Store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
// Existing M.O.M. purchase order number
MOMPONumber = Get_Integer("Enter MOM PONumber:");
Result = _API.Purchase_Modify(MOMPONumber);
if (Result < 1)
return false;
263
Console.WriteLine("2. Update Purchase Order line item instructions.");
MOMPO_LineID = Get_Integer("Enter MOM Puritem_id:");
Result = _API.PurDetail_Instructions(MOMPONumber, MOMPO_LineID, "Change Instruction Line 1...", "Change Instruction Line 2...", "Change Instruction Line 3...");
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(MOMPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
38. Modifying a purchase order detail custom information
DisplayHeader(sampleid, "[Modifying a purchase order detail custom information]");
////_APP.sys_Pause("Press any key to continue");
Console.WriteLine("");
int Result; // Store value returned from API Call
bool Success = false; // Store whether or not task completed successfully.
Console.WriteLine("1. Grab Purchase Order for exlusive use.");
264
// Existing M.O.M. purchase order number
MOMPONumber = Get_Integer("Enter MOM PONumber:");
Result = _API.Purchase_Modify(MOMPONumber);
if (Result < 1)
return false;
Console.WriteLine("2. Update Purchase Order Custom Info.");
MOMPO_LineID = Get_Integer("Enter MOM Puritem_id:");
Result = _API.PurDetail_CustomInfo(MOMPONumber, MOMPO_LineID, "Change Custom info .......");
if (Result < 1)
return false;
Console.WriteLine("3. Save all changes to purchase order.");
Result = _API.Purchase_Save(MOMPONumber);
if (Result < 1)
return false;
Success = true;
//_APP.sys_DisplayTask(Success);
return Success;
265
39. Putting Order on Hold
The following code snippet demonstrates how to put an order on hold using the API functions:
{ Console.WriteLine(">> Put order On Hold.."); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Hold to Do Not Ship/Manifest Until..."); int lnHoldType = 1; string lcHoldReason = “”; string lcHold_Until = “2011-12-30”; Result = ox.Order_Hold(MOMOrder, lnHoldType, lcHoldReason, lcHold_Until); if (!_ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success; }
40. Putting order on Stop Review
The following code snippet demonstrates how to put an order on stop review in M.O.M.: Console.WriteLine(">> Put order On Hold Review.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully.
266
// if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = Get_Integer("Enter MOM Order #:"); Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Order to hold review ."); string lcComment = “comment string”; Boolean llRelease = false; Result = ox.Order_StopReview(MOMOrder, lcComment, llRelease); if (Result < 1) return false; if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success;
41. Modify Order Notes
The following code snippet demonstrates modify notes of a specified order:
Console.WriteLine(">> Update order notes.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); int MOMOrder = 1234; Result = _API.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Change Order Notes."); string lcNote = “Note string”;
267
Result = _ox.Order_Notes(MOMOrder, lcNote); if (Result < 1) return false; if (!_API.ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("5> Save all changes to order."); Result = _API.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; _APP.sys_DisplayTask(Success); return Success; }
42. Modifying Order Box Label
The following code snippet demonstrates how modify the box labels for a specified order:
Console.WriteLine(">> Update order box label.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Box label instructions."); string lcInstruct1 = "Enter Instruction 1:"; string lcInstruct2 = "Enter Instruction 2:"; string lcInstruct3 = "Enter Instruction 3:"; string lcInstruct4 = "Enter Instruction 4:"; string lcInstruct5 = "Enter Instruction 5:"; string lcInstruct6 = "Enter Instruction 6:"; Result = ox.Order_BoxLabel(MOMOrder, lcInstruct1, lcInstruct2, lcInstruct3, lcInstruct4, lcInstruct5, lcInstruct6); if (Result < 1) return false;
268
if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("5> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success;
43. Modifying Order Instructions
The following code snippet demonstrates how to modify the instructions of a specified order:
Console.WriteLine(">> Update order Instructions.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Order Instructions."); string lcInstruct = "Enter Instructions:"; Result = _API.Order_Instructions(MOMOrder, lcInstruct); if (Result < 1) return false; if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("5> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; _APP.sys_DisplayTask(Success); return Success;
269
44. Modifying Order Memo using Default
The following code snippet demonstrates how to update the order memo to source code default:
Console.WriteLine(">> Update order memo to default.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Memo to source key default."); string lcSourceKey = “Valid Source Code”; Result = ox.Order_Memo_Default(MOMOrder, lcSourceKey); if (Result < 1) return false; if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("5> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success;
45. Update Order Memo to Custom
The following code snippet demonstrates how to update the Order Memo Custom lines:
Console.WriteLine(">> Update order memo to custom.."); Console.WriteLine("");
270
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Update order memo to custom."); string lcLine1 = "Enter Line 1:"; string lcLine2 = "Enter Line 2:"; string lcLine3 = "Enter Line 3:"; Result = ox.Order_Memo_Custom(MOMOrder, lcLine1, lcLine2, lcLine3); if (Result < 1) return false; if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success;
46. Modifying Order’s Alternate ID
Console.WriteLine(">> Update order Alternate ID.."); Console.WriteLine("");
271
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Alternate Order ID."); string lcAlt_Order = "Enter Alternate Order ID:"; Result = ox.Order_Alternate_ID(MOMOrder, lcAlt_Order); if (Result < 1) return false; if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("5> Save all changes to order."); Result = Ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success;
47. Modifying Order’s Internet ID
Console.WriteLine(">> Update Order Internet ID.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // if possible lock order, so no users can access the order. Console.WriteLine("1> Grab Order for exlusive use."); // Existing M.O.M. order number int MOMOrder = 1234; Result = ox.Order_Modify(MOMOrder); if (Result < 1) return false; Console.WriteLine("2> Set Internet ID .");
272
string lcInternet_ID = "Enter Internet ID:"; Result = ox.Order_Internet_ID(MOMOrder, lcInternet_ID); if (Result < 1) return false; if (!ox.SAVE_PARTIAL_ORDERS) { Console.WriteLine("3> Save all changes to order."); Result = ox.Order_Save(MOMOrder); if (Result < 1) return false; } Success = true; return Success;
48. Create Phone Contact Entry
Console.WriteLine(">> Add Phone Contact.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. // Existing M.O.M. customer number int MOMCustomer =1234; string lcSourceKey = "Enter Source Key:"; string lcCallDateTime = "Enter Call Date YYYY-MM-DD"; string lcScriptCode = "Enter Script Code:"; int lnInterest = 1; string lcCallLog = "Enter Call Log:"; Console.WriteLine("1> Create phone contact."); Result = ox.Customer_Contact_Phone_Create(MOMCustomer, lcSourceKey, lcCallDateTime, lcScriptCode, lnInterest, lcCallLog); if (Result < 1) return false; Success = true; return Success;
49. Delete Phone Contact Entry
Console.WriteLine(">> Remove Phone Contact.."); Console.WriteLine("");
273
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. int MOMcustomer = 12345; int MOMContact_ID = 354; Console.WriteLine("1> Delete Phone Contact Entry."); Result = ox.Customer_Contact_Phone_Delete(MOMcustomer, MOMContact_ID); if (Result < 1) return false; Success = true; return Success;
50. Modify Phone Contact Entry
Console.WriteLine(">> Modify Phone Contact.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. Console.WriteLine("1> Modifying customer phone contact entry."); // Existing M.O.M. customer number int MOMCustomer = 123456; int MOMContact_id = 1234; string lcSourceKey = "Enter Source Key:"; string lcCallDateTime = "Enter Call Date:"; string lcScriptCode = "Enter Script Code:"; int lnInterest = 1; string lcCallLog = "Enter Call Log:"; Boolean llCompleteCall = false; Result = _API.Customer_Contact_Phone(MOMCustomer, MOMContact_id, lcSourceKey, lcCallDateTime, lcScriptCode, lnInterest, lcCallLog, llCompleteCall); if (Result < 1) return false; Success = true; return Success;
51. Create Written Contact Entry
Console.WriteLine(">> Add Written Contact.."); Console.WriteLine("");
274
int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. Console.WriteLine("1> Create Written Contact Entry."); int MOMCustomer = 123456; string lcSourceKey = "Enter Source Key:"; string lcCatalog = "Enter Catalog Code to Send:"; bool llCatLabelReq = true; string lcHold_date = "Enter Do not Mail Until Date:"; string lcLetterCode = "Enter Letter Code:"; bool llEmailReq = true; bool llFaxReq = false; bool llLetterReq = true; string lcSubject = "Enter Subject Header for E-Mail or Fax?:"; Result = ox.Customer_Contact_Written_Create(MOMCustomer, lcSourceKey, lcCatalog, llCatLabelReq, lcHold_date, lcLetterCode, llEmailReq, llFaxReq, llLetterReq, lcSubject); if (Result < 1) return false; Success = true; return Success;
52. Delete Written Contact Entry
Console.WriteLine(">> Remove Written Contact.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. Console.WriteLine("1> Remove Written Contact Entry."); int MOMCustomer = 123456; int MOMContactID = 1234; Result = ox.Customer_Contact_Written_Delete(MOMCustomer, MOMContactID); if (Result < 1) return false; Success = true; return Success;
53. Modify Written Contact Entry
275
Console.WriteLine(">> Modify Written Contact.."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. Console.WriteLine("1> Edit Customer Written Contact Entry."); int MOMCustomer = 123456; int MOMContactID = 1234; string lcSourceKey = "Enter Source Key:"; string lcCatalog = "Enter Catalog Code to Send:"; bool llCatLabelReq = true; string lcHold_date = “”; string lcLetterCode = "Enter Letter Code:"; bool llEmailReq = true; bool llFaxReq = false; bool llLetterReq = true; string lcSubject = "Enter Subject Header for E-Mail or Fax?:"; Result = ox.Customer_Contact_Written(MOMCustomer, MOMContactID, lcSourceKey, lcCatalog, llCatLabelReq,lcHold_date,lcLetterCode, llEmailReq, llFaxReq, llLetterReq,lcSubject); if (Result < 1) return false; Success = true; return Success;
54. Get Contact History Entries
Console.WriteLine(">> Generating an Output File of contact history entries for a specific Customer...."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. string lcPrefix = "Customer_ContactHist"; string lcSuffix = Path.GetRandomFileName(); // Existing M.O.M. customer int MOMCustomer = 123456; string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path Console.WriteLine("1> Get contact history entries for a specific Customer"); Result = ox.Customer_Contact_Get(MOMCustomer); if (Result < 1)
276
return false; // Create the file and write to it. Console.WriteLine("2> Create XML file"); File.WriteAllText(FullPath, ox.XML); if (!File.Exists(FullPath)) return false; Console.WriteLine(" File:" + FullPath); Success = true; return Success;
55. Get Phone Contact Entries
Console.WriteLine(">> Generating an Output File of phone contact entries for a specific Customer...."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. string lcPrefix = "Customer_ContactPhone"; string lcSuffix = Path.GetRandomFileName(); // Existing M.O.M. customer int MOMCustomer = 123456; string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path Console.WriteLine("1> Get phone contact entries for a specific Customer"); Result = ox.Customer_Contact_Phone_Get(MOMCustomer); if (Result < 1) return false; // Create the file and write to it. Console.WriteLine("2> Create XML file"); File.WriteAllText(FullPath, ox.XML); if (!File.Exists(FullPath)) return false; Console.WriteLine(" File:" + FullPath); Success = true; return Success;
56. Get Written Contact Entries
277
Console.WriteLine(">> Generating an Output File of written contact entries for a specific Customer...."); Console.WriteLine(""); int Result; // store value returned from API Call bool Success = false; // Store whether or not task completed successfully. string lcPrefix = "Customer_ContactWritten"; string lcSuffix = Path.GetRandomFileName(); // Existing M.O.M. customer int MOMCustomer = 123456; string FullPath = strFolder + lcPrefix + "_" + lcSuffix + ".xml"; // output file name, including path Console.WriteLine("1> Get written contact entries for a specific Customer"); Result = ox.Customer_Contact_Written_Get(MOMCustomer); if (Result < 1) return false; // Create the file and write to it. Console.WriteLine("2> Create XML file"); File.WriteAllText(FullPath, ox.XML); if (!File.Exists(FullPath)) return false; Console.WriteLine(" File:" + FullPath); Success = true; return Success;
278
Appendix B
File Structure - Customers
File Name: CUST.DBF
File Contents: Contains all of the customer information in the system.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 CUSTNUM Integer
(Auto Increment)
4 0 RESERVED.
2 ALTNUM Character 15 N/A The user assigned customer number.
3 CUSTTYPE Character 1 N/A System assigned customer status.
279
4 LASTNAME Character 20 N/A Last name.
5 FIRSTNAME Character 15 N/A First name.
6 COMPANY Character 40 N/A Company name.
7 ADDR Character 40 N/A First address line.
8 ADDR2 Character 40 N/A Second address line.
9 CITY Character 30 N/A City.
10 COUNTY Character 3 N/A County code.
11 STATE Character 3 N/A State/Province.
12 ZIPCODE Character 10 N/A ZIP Code/Postal Code.
13 COUNTRY Character 3 N/A Country code
14 PHONE Character 14 N/A Format (xxx) xxx-xxxx
15 PHONE2 Character 14 N/A Format (xxx) xxx-xxxx
16 ORIG_AD Character 9 N/A Original Source key designator.
17 CTYPE Character 1 N/A User defined Customer type.
18 LAST_AD Character 9 N/A Last source key designator.
19 CATCOUNT Numeric 3 0 Total count of catalogs mailed.
20 ODR_DATE Datetime 8 N/A Last date of activity.
21 PAYMETHOD Character 2 N/A Last method of payment used.
22 CARDNUM Character 60 N/A Last credit card used.
23 CARDTYPE Character 2 N/A RESERVED.
280
24 EXP Character 5 N/A RESERVED.
25 SHIPLIST Character 3 N/A Last method of shipment used.
26 EXPIRED Logical 1 N/A Expired flag. A deleted customer is marked as true.
27 BADCHECK Logical 1 N/A Bad credit flag.
28 ORDERREC Numeric 8 0 The most recent order placed by this
29 NET Numeric 10 2 The total net sales from this customer.
30 GROSS Numeric 10 2 The total gross sales from this customer.
31 ORD_FREQ Numeric 6 0 The total number of orders placed by
32 COMMENT Character 60 N/A Customer comment area.
33 CUSTBAL Numeric 9 2 Misc credit/debit amount owed/due from
34 CUSTREF Numeric 8 0 RESERVED.
35 DISCOUNT Numeric 3 0 Standard discount applied to this customers
36 EXEMPT Logical 1 N/A Tax exempt status.
37 AR_BALANCE Numeric 11 2 Current open A/R balance controlled
38 CREDIT_LIM Numeric 9 0 Current credit
281
limit.
39 DISCT_DAYS Numeric 3 0 RESERVED.
40 DUE_DAYS Numeric 3 0 Customer terms (if established).
41 DISCT_PCT Numeric 4 1 Discount Percentage.
42 PROMO_BAL Numeric 6 2 Current Promotional Credit.
43 COMMENT2 Character 60 N/A Second Comment Line.
44 SALES_ID Character 3 N/A Sales ID Code.
45 NOMAIL Logical 1 N/A No Mail requested indicator.
46 BELONGNUM Numeric 8 0 This name belongs to this customer
47 CTYPE2 Character 2 N/A Second customer type field.
48 CTYPE3 Character 4 N/A Third customer type field.
49 SALU Character 6 N/A Salutation of customer.
50 TITLE Character 40 N/A Title of customer.
51 DELPOINT Character 3 N/A Postal delivery point.
52 CARROUTE Character 4 N/A Postal carrier route.
53 NCOACHANGE Character 1 N/A FUTURE USE.
54 ENTRYDATE Datetime 8 N/A The date the customer was first entered.
55 SEARCHCOMP Character 15 N/A Abbreviated form of
282
company name.
56 EMAIL Character 50 N/A Person's e-mail address.
57 N_EXEMPT Logical 1 N/A Indicates nationally tax exempt.
58 TAX_ID Character 15 N/A Tax exemption number.
59 CASHONLY Logical 1 N/A RESERVED.
60 HONO Character 4 N/A Honorific of customer.
61 NOEMAIL Logical 1 N/A No email requested indicator.
62 PASSWORD Character 20 N/A For use with SiteLINK.
63 RFM Numeric 5 0 RFM value.
64 POINTS Numeric 8 0 Points accumulated.
65 NORENT Logical 1 N/A Do not rent name indicator.
66 ADDR_TYPE Character 1 N/A RESERVED.
67 WEB Character 40 N/A Web site address.
68 EXTENSION Character 5 N/A Phone extension.
69 EXTENSION2 Character 5 N/A Fax extension.
70 DATE_LIMIT Character 1 N/A RESERVED.
71 START_DATE Datetime 8 N/A RESERVED.
72 END_DATE Datetime 8 N/A RESERVED.
73 FROM_MONTH Numeric 2 0 RESERVED.
74 FROM_DAY Numeric 2 0 RESERVED.
75 TO_MONTH Numeric 2 0 RESERVED.
76 TO_DAY Numeric 2 0 RESERVED.
283
77 ADDRISSAME Logical 1 N/A RESERVED.
78 LASTUSER
Character
3
N/A User ID of last operator to view customer.
79 UPSCOMDELV Logical 1 N/A UPS Commercial Delivery Indicator.
80 PREF_SHIP Character 3 N/A Customer preferred shipping method.
81 PREF_PAY Character 2 N/A Customer preferred payment method.
82 ADDR3 Character 40 N/A UK Only
83 VALADDR Character 2 N/A UPS address validation.
84 VALDATE Datetime 8 N/A UPS address validation date.
85 ADDREXPIRE Datetime 8 N/A RESERVED.
86 ACVMEDATE Datetime 8 N/A RESERVED.
87 ACT_DATE Datetime 8 N/A Customer's Last Activity Date.
88 BESTTTC Character 8 N/A Best Time to Call
89 DSCTENDATE Datetime 8 N/A Customer Discount Percentage End Date
90 DSCTSTDATE Datetime 8 N/A Customer Discount Percentage Start Date
91 EMAILDEF Character 8 N/A Preferred Email Format
92 EMAILPREF Character 8 N/A Customer
284
Contact Type Preference
93 FRAUD Logical 1 N/A Fraudulent Customer Indicator
94 MODI_DATE Datetime 8 N/A Last Modified Date
95 MODI_USER Character 3 N/A User ID of Record Modifier
96 NOCALL Logical 1 N/A Do Not Call Request Indicator
97 NOFAX Logical 1 N/A Do Not Fax Request Indicator
98 NOPOINTS Logical 1 N/A Restrict Accumulation of Points
99 PREFWARE Character 6 N/A Preferred Warehouse Location for Order Fulfillment
100 SOUNDLNAME Character 4 N/A RESERVED.
101 TAX_ID2 Character 2 N/A Alternate Tax ID
102 C_EXEMPT Logical 1 N/A County Tax Exempt?
103 I_EXEMPT Logical 1 N/A City/Local Tax Exempt?
104 CUST_TERMS Logical 1 N/A Using Customer Terms?
285
File Structure - Stock Items
File Name: STOCK.DBF
File Contents: Contains information on each stock item setup in the system.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 NUMBER Character 20 N/A Stock item number. If the SIZE/COLOR field is set to T (True), The first 10 characters will be the stock number, the following 10 will be the "Size/Color."
2 DESC1 Character 60 N/A Description line 1.
3 DESC2 Character 60 N/A Description line 2.
286
4 UNITS Numeric 11 2 Number of units in stock.
5 LOW Numeric 11 2 Reorder level threshold.
6 UNITWEIGHT Numeric 10 3 Weight in pounds.
7 UNCOST Numeric 12 5 Average cost value.
8 PRICE1 Numeric 12 4 Retail selling price for product.
9 BOUNITS Numeric 11 2 Number of units back ordered.
10 ONORDER Numeric 11 2 Number of units on order.
11 COMMITED Numeric 11 2 Number of units sold but not shipped.
12 SOLD Numeric 11 2 RESERVED.
13 RECEIVED Logical 1 N/A RESERVED.
14 CONSTRUCT Logical 1 N/A Composite item flag.
15 BREAK_OUT Logical 1 N/A RESERVED.
16 EXTRA Character 2 N/A RESERVED.
17 DROP Logical 1 N/A Drop ship item identifier.
18 CARRIER Character 3 N/A RESERVED.
19 POQUANT Numeric 11 2 RESERVED.
20 REORDQUANT Numeric 11 2 Current re-order quantity.
21 REORDPRICE Numeric 12 4 Current re-order price.
287
22 ASSOC Character 30 N/A Product classification code.
23 DELDATE Date 8 N/A Expected date.
24 DELFLAG Logical 1 N/A RESERVED.
25 DELUNITS Numeric 11 2 RESERVED.
26 DELTOTAL Numeric 14 3 RESERVED.
27 BIN Character 16 N/A Bin number.
28 OVERSIZE Logical 1 N/A Oversize UPS 1 indicator.
29 NOTATION Character 60 N/A Cross sell description.
30 INT_EXT Logical 1 N/A RESERVED.
31 NONTAX Logical 1 N/A Taxable status.
32 SHIPCHARGE Numeric 7 2 Special shipping costs.
33 CURSUPPLY Numeric 3 N/A Last used supplier level code 1-4.
34 DISTRIB Character 6 N/A Current Distributer.
35 DISTSTOCK Character 30 N/A Distributer Stock #.
36 NONPRODUCT Logical 1 N/A Flag to indicate that this is a service
37 OWN_BOX Logical 1 N/A Product ships in its own container.
38 TAX_CLASS Character 1 N/A RESERVED.
39 UPCCODE Character 18 N/A UPC code or EAN code.
288
40 SERIAL Logical 1 N/A Product has serial numbers.
41 NEXTSER Character 15 N/A Next serial number to use.
42 DISCONT Logical 1 N/A RESERVED.
43 NEEDWEIGHT Logical 1 N/A Product needs weighing during processing
44 COMMGROSS Numeric 5 2 Gross $ Commission base.
45 COMMNET Numeric 5 2 Net $ Commission base.
46 COMMFLAT Numeric 7 2 Per unit Commission base.
47 SUBSPROD Logical 1 N/A Indicates product is a subscription
48 PUBLCTNCD Character 8 N/A Subscription publication code.
49 SUBSISUCT Numeric 4 N/A Subscription number of issues.
50 PRODXINVC Logical 1 N/A Subscription invoice exempt code.
51 ROYALTY Numeric 9 4 FUTURE USE.
52 DISCONTINU Logical 1 N/A RESERVED.
53 OTHER1 Character 2 N/A RESERVED.
54 OTHER2 Numeric 7 N/A RESERVED.
55 SERIALSKU Character 20 N/A Stock # to pull serial #'s from.
289
56 UNITSINBOX Numeric 9 2 Not used.
57 LPURCHDATE Date 8 N/A Last purchase date.
58 LPURCHQTY Numeric 13 2 Last purchase quantity.
59 SIZE_COLOR Logical 1 N/A Size color indicator.
60 FRACTIONS Logical 1 N/A Fractional quantity indicator.
61 INETSELL Logical 1 N/A For use with SiteLINK.
62 INETDESC Character 120 N/A For use with SiteLINK.
63 INETDEP Character 50 N/A For use with SiteLINK.
64 INETSUBDEP Character 50 N/A For use with SiteLINK.
65 INETCSMSG Character 70 N/A For use with SiteLINK.
66 INETCSPROD Character 20 N/A For use with SiteLINK.
67 INETIMAGE Character 50 N/A For use with SiteLINK.
68 CANTSELL Logical 1 N/A Product cannot be sold.
69 NTAXCLASS Character 1 N/A National Tax Class.
70 STAXCLASS Character 1 N/A State Tax Class.
71 N_NONTAX Logical 1 N/A National tax exempt flag.
72 SALES_DEPT Character 2 N/A GL Sales Department.
290
73 ROYSUP Character 6 N/A Supplier code for royalties.
74 ROYNET Numeric 5 2 Net $ Royalty base.
75 ROYGROSS Numeric 5 2 Gross $ Royalty base.
76 ROYFLAT Numeric 7 2 Per unit Royalty base.
77 INETCUSTOM Logical 1 N/A For use with SiteLINK.
78 INETCPRPMT Character 40 N/A For use with SiteLINK.
79 DROPMETHOD Character 1 N/A FUTURE USE
80 INETCPRMPT Character 40 N/A For use with SiteLINK.
81 INETCPRICE Numeric 12 4 For use with SiteLINK.
82 INETUSPROD Character 20 N/A For use with SiteLINK.
83 INETUSMSG Character 70 N/A For use with SiteLINK.
84 INETTHUMB Character 50 N/A For use with SiteLINK.
85 SENDNOTICE Character 6 N/A Notice to send with this product.
86 NOTICEWHEN Character 1 N/A When to send the notice
87 GIFTCERT Logical 1 N/A Used to determine if product is a gift certificate item.
88 POINTS_REV Numeric 8 N/A Points received when this item is purchased.
291
89 POINTS_NED Numeric 8 N/A Points needed to purchase this item.
90 KIT_MAKE Character 1 N/A RESERVED.
91 KIT_BREAK Character 1 N/A RESERVED.
92 ISBN Character 15 N/A ISBN number of product.
93 RTNS_DEPT Character 2 N/A G/L department to use for returns.
94 COGS_DEPT Character 2 N/A G/L department to use for cost of goods.
95 OVERSIZE2 Logical 1 N/A Oversize UPS 2 indicator.
96 SUBSTITUTE Character 20 N/A RESERVED.
97 WAREPREF Character 6 N/A Preferred warehouse for this item.
98 WARE_ALTOK Logical 1 N/A Used to determine if alternate warehouses can be used.
99 SINGLEBIN Logical 1 N/A RESERVED.
100 RCOMMIT Numeric 11 2 Number of units returned but not invoiced.
101 CANBUYITEM Logical 1 N/A RESERVED.
102 C_NONTAX Logical 1 N/A County tax exempt flag.
103 CTAXCLASS Character 1 N/A County tax class.
104 I_NONTAX Logical 1 N/A City tax exempt flag.
292
105 ITAXCLASS Character 1 N/A City tax class.
106 DONORDER Numeric 11 2 Number of drop shipped units on order.
107 DBOUNITS Numeric 11 2 Number of drop shipped units back ordered.
108 NEEDCUSTOM Logical 1 N/A Item requires customization indicator.
109 CUSTOMTEXT Character 40 N/A Custom information question.
110 PREFSHIP Character 3 N/A Shipping preference for item.
111 ADVANCED1 Character 30 N/A Advanced search field.
112 ADVANCED2 Character 30 N/A Advanced search field.
113 ADVANCED3 Character 30 N/A Advanced search field.
114 ADVANCED4 Character 30 N/A Advanced search field.
115 PICTURE Character 100 N/A Full path and name of the picture.
116 CLUB_PROD Logical 1 N/A Indicates a trigger product for club membership.
117 CLUB_CODE Character 6 N/A Club code associated with the trigger item.
118 OVERSIZE3 Logical 1 N/A Oversize UPS 3 Indicator.
293
119 AUCTSELL Logical 1 N/A Set to True if item is available to sell at auction.
120 AUCTUNIT Numeric 11 2 Number of units reserved for auctions.
121 STOCK_ID Integer
(Auto Increment)
N/A 4 RESERVED.
122 BHEIGHT Numeric 5 N/A Stock Item Height in inches.
123 BLENGTH Numeric 5 N/A Stock Item Length in inches.
124 BO_AHEAD Numeric 10 N/A RESERVED.
125 BWIDTH Numeric 5 N/A Stock Item Width in inches.
126 HIDE_ITEM Logical 1 N/A Indicates if this item should appear in lookup screens for orders and purchasing.
127 MAXDSCT Numeric 7 2 Maximum Discount Percentage Allowed.
128 MIN_MKUP_D Numeric 14 4 Minimum Markup Percentage Above the Current Unit Cost Basis.
129 MIN_MKUP_P Numeric 7 2 Minimum Markup Amount Above the Current Unit Cost Basis.
130 MIN_PRICE Numeric 14 4 Minimum Retail Price.
131 NODSCT Logical 1 N/A Indicates if this product is exempt from discounts.
132 NORETURN Logical 1 N/A Indicates if this product can be returned on an order.
133 PRINTSTKID Logical 1 N/A Indicates if this product will trigger a Stock ID Label to print when
294
received on a PO. If marked as TRUE, it will NOT print an ID Label.
134 RETITEM Character 20 N/A SKU number that will receive the inventory when this item is returned.
135 SHIPEXEMPT Logical 1 N/A Indicates if this product is exempt from shipping charges.
136 SL_IMAGE1 Character 100 N/A For Use with SiteLINK.
137 SL_IMAGE2 Character 100 N/A For Use with SiteLINK.
138 SL_IMAGE3 Character 100 N/A For Use with SiteLINK.
139 SL_IMAGE4 Character 100 N/A For Use with SiteLINK.
140 SL_IMAGE5 Character 100 N/A For Use with SiteLINK.
141 SL_IMAGE6 Character 100 N/A For Use with SiteLINK.
142 SL_IMAGE7 Character 100 N/A For Use with SiteLINK.
143 SL_IMAGE8 Character 100 N/A For Use with SiteLINK.
144 THRESHTYPE Numeric 5 N/A Price Threshold Type,
1= Minimum Retail Price.
2= Minimum Markup Percentage.
3=Minimum Markup Amount.
145 NUM_BOXES Numeric 3 N/A Item Packs in X Boxes
146 PMMPROD Logical N/A Product is Assembled Using the Product Manufacturing Module
147 PMMTEXT Character 100 N/A Message to Print on the Customer’s Packing/Invoice
295
148 ATTRIBS Logical N/A Enable Product Attributes
149 PMM_BREAK Character 1 N/A Product Disassembly Settings
T=Product stays assembled once it is manufactured
A=Product automatically reverts into its raw materials
150 PRODAVAIL Character 40 For Use with SiteLINK.
151 META_TITLE Character 60 For Use with SiteLINK.
152 NO_ORDER Logical Don’t show when Purchasing Products
153 UOM Character 6 Unit of Measure
154 PMM_MAKE Character 1 Product Manufacturing
Empty String=Product is manufactured after ordered
P=Pre-manufacturing is required before product can be ordered
155 PMUNITS Numeric 12 2 Units in Pre-Manufacturing (calculated)
156 CONDITION Char 15 Product Condition
157 MANUFACTUR Character 50 Product Manufacturer
158 GIFTCARD Logical Is Gift Card Item?
159 CARDTYPE Character 1 Gift Card Type
G=Gift Card
296
E=eGift Card
160 HAZARDOUS Logical Is Product Hazardous?
161 HANDLING Character 2 Product Handling Preference
SH=Shipper Release
HO=Hold At Location
SI=Signature Required
AD=Adult Signature
162 PRODURL Character 100 Product Website
163 DRYICE Logical Does Product Require Dry Ice?
164 DRYICEWGHT Numeric 10 3 Weight of Dry Ice
169 FROOGLE Memo For use with SiteLINK.
170 STOCKMEM_ID Integer RESERVED.
297
Table File Structure – Credit Card Merchant Accounts
File Name: CC.DBF
File Contents: Contains information on each credit card merchant account setup in the system.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 CC_CODE Character 2 N/A Card Code
2 CC_NAME Character 15 N/A Card Name
3 CC_NUMBER Character 20 N/A Account Number
4 CC_ACCC Character 2 2 Account Code
5 CC_LIMIT Numeric 9 2 Floor Limit ($)
298
6 CC_PHONE Character 20 N/A Authorization Phone Number
7 CC_L1 Character 25 N/A Merchant Name Line 1
8 CC_L2 Character 25 N/A Merchant Name Line 2
9 CC_L3 Character 25 N/A Merchant Name Line 3
10 CC_L4 Character 25 N/A Merchant Name Line 4
11 CC_VOUCH Logical 1 N/A Print Voucher for this Method.
12 CCEXTRA Character 1 N/A Type of Credit Card
13 CC_ICVSET Character 4 N/A IC Verify Merchant ID Code (Optional)
14 CC_POPONLY Logical 1 N/A POP Order only.
15 INETALLOW Logical 1 N/A Card Type is Available on Web
16 CC_NOAVS Logical 1 N/A Do not Send Customer Address Information
17 CC_USAGE Character 1 N/A RESERVED.
18 MOTO_ACCT Character 40 N/A Mail/Phone Orders Account
19 WEB_ACCT Character 40 N/A Internet Orders Account
20 RETL_ACCT Character 40 N/A Retail Orders Account
21 CC_DISFEE Numeric 8 3 Merchant account discount rate and fee information: per transaction fee
299
22 CC_DISRATE Numeric 10 4 Merchant account discount rate and fee information: Discount Percentage %
23 WAREHOUSE Character 6 N/A For specific warehouse
24 CC_ID Integer 4 N/A RESERVED. Primary key
300
Table File Structure – Shipping Methods
File Name: Carrier.DBF
File Contents: Contains information on each shipping method setup in the system.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION
FIELD NAME TYPE WIDTH
DEC DESCRIPTION
1 CA_CODE Character 3 N/A Shipping Method Code
2 CA_TITLE Character 50 N/A Shipping Method Description
3 CA_REPORT Logical 1 N/A Print Shipping Manifest/Report
4 CA_AUTORUN Logical 1 N/A RESERVED.
5 CA_Z_TABLE Character 3 N/A Zone Table
301
6 CA_C_TABLE Character 3 N/A Cost Table
7 CA_M_TABLE Character 1 N/A RESERVED.
8 CA_NO_MDFY Logical 1 N/A RESERVED.
9 CA_PCT_ACT Numeric 6 2 Percent of actual charges
10 CA_PER_PK Numeric 5 2 Per Manifest Charge:Per Shipment/Invoice
11 CW_PER_PK Character 1 N/A Per Manifest Charge:Per Shipment/Invoice: When to Charge F=First Shipment S=Subsequent Shipments A=All Shipments
12 CA_COD_CH Numeric 5 2 C.O.D. Premium
13 CW_COD_CH Character 1 N/A C.O.D. Premium: When to charge F=First Shipment S=Subsequent Shipments A=All Shipments
14 CA_MIN_CH Numeric 5 2 Per Manifest Charge:Minimum Charge
15 CW_MIN_CH Character 1 N/A Per Manifest Charge:Minimum Charge: When to Charge F=First Shipment S=Subsequent Shipments A=All Shipments
16 CA_PER_IT Numeric 5 2 Customer Shipping Charges: Per Item Charge
17 CW_PER_IT Character 1 N/A Customer Shipping Charges: Per Item Charge: When to Charge F=First Shipment S=Subsequent Shipments A=All Shipments
18 CA_PER_LB Numeric 6 3 Customer Shipping Charges: Per Pound Charge
302
19 CW_PER_LB Character 1 N/A Per Pound Charge: When to Charge F=First Shipment S=Subsequent Shipments A=All Shipments
20 CA_ACTSHIP Logical 1 N/A Actual Charges
21 CW_ACTSHIP Character 1 N/A Actual Charges: When to Charge
22 CA_ID Character 15 N/A SHIPPING ID/ACCOUNT NUMBER
23 CA_UPS Logical 1 N/A Package Carrier is UPS.
24 OTHER Character 1 N/A RESERVED.
25 OTHER2 Character 2 N/A RESERVED.
26 CA_ALT Character 3 N/A COMPARATIVE SHIPPING METHODS: Alternate Shipping method 1
27 CA_ALT2 Character 3 N/A COMPARATIVE SHIPPING METHODS: Alternate Shipping method 2
28 CA_RL1 Numeric 9 2 Msde Total Range 1 Charges: Order Total - From $
29 CA_RH1 Numeric 9 2 Msde Total Range 1 Charges: Order Total - To $
30 CA_RR1 Numeric 9 2 Msde Total Range 1 Charges: Shipping Charges – Exaxct Charge
31 CA_RP1 Numeric 7 2 Msde Total Range 1 Charges: Shipping Charges – % of Total
32 CA_RL2 Numeric 9 2 Msde Total Range 2 Charges: Order Total - From $
33 CA_RH2 Numeric 9 2 Msde Total Range 2 Charges: Order Total - To $
303
34 CA_RR2 Numeric 9 2 Msde Total Range 2 Charges: Shipping Charges – Exaxct Charge
35 CA_RP2 Numeric 7 2 Msde Total Range 2 Charges: Shipping Charges – % of Total
36 CA_RL3 Numeric 9 2 Msde Total Range 3 Charges: Order Total - From $
37 CA_RH3 Numeric 9 2 Msde Total Range 3 Charges: Order Total - To $
38 CA_RR3 Numeric 9 2 Msde Total Range 3 Charges: Shipping Charges – Exaxct Charge
39 CA_RP3 Numeric 7 2 Msde Total Range 3 Charges: Shipping Charges – % of Total
40 CA_RL4 Numeric 9 2 Msde Total Range 4 Charges: Order Total - From $
41 CA_RH4 Numeric 9 2 Msde Total Range 4 Charges: Order Total - To $
42 CA_RR4 Numeric 9 2 Msde Total Range 4 Charges: Shipping Charges – Exaxct Charge
43 CA_RP4 Numeric 7 2 Msde Total Range 4 Charges: Shipping Charges – % of Total
44 CA_RL5 Numeric 9 2 Msde Total Range 5 Charges: Order Total - From $
45 CA_RH5 Numeric 9 2 Msde Total Range 5 Charges: Order Total - To $
46 CA_RR5 Numeric 9 2 Msde Total Range 5 Charges: Shipping Charges – Exaxct Charge
47 CA_RP5 Numeric 7 2 Msde Total Range 5 Charges: Shipping Charges – % of Total
48 CA_RL6 Numeric 9 2 Msde Total Range 6 Charges: Order Total - From $
49 CA_RH6 Numeric 9 2 Msde Total Range 6 Charges: Order Total - To $
304
50 CA_RR6 Numeric 9 2 Msde Total Range 6 Charges: Shipping Charges – Exaxct Charge
51 CA_RP6 Numeric 7 2 Msde Total Range 6 Charges: Shipping Charges – % of Total
52 CA_RL7 Numeric 9 2 Msde Total Range 7 Charges: Order Total - From $
53 CA_RH7 Numeric 9 2 Msde Total Range 7 Charges: Order Total - To $
54 CA_RR7 Numeric 9 2 Msde Total Range 7 Charges: Shipping Charges – Exaxct Charge
55 CA_RP7 Numeric 7 2 Msde Total Range 7 Charges: Shipping Charges – % of Total
56 CA_RL8 Numeric 9 2 Msde Total Range 8 Charges: Order Total - From $
57 CA_RH8 Numeric 9 2 Msde Total Range 8 Charges: Order Total - To $
58 CA_RR8 Numeric 9 2 Msde Total Range 8 Charges: Shipping Charges – Exaxct Charge
59 CA_RP8 Numeric 7 2 Msde Total Range 8 Charges: Shipping Charges – % of Total
60 CA_RL9 Numeric 9 2 Msde Total Range 9 Charges: Order Total - From $
61 CA_RH9 Numeric 9 2 Msde Total Range 9 Charges: Order Total - To $
62 CA_RR9 Numeric 9 2 Msde Total Range 9 Charges: Shipping Charges – Exaxct Charge
63 CA_RP9 Numeric 7 2 Msde Total Range 9 Charges: Shipping Charges – % of Total
64 CW_RANGES Character 1 N/A RESERVED.
65 CA_TYPE Character 3 N/A Package Carrier. Empty-Other Carrier UPS- United Parcel Servic USP- U.S. Postal Service
305
RPS-Road Package FEX-Federal Express AIB-Airbournce Express DHL-DHL Services UKC-UK Shipping Courier UKE-Royal Mail Despatch Express UKP-Parcel Force
66 CW_PRODCST Character 1 N/A RESERVED.
67 CA_OTHER Logical 1 N/A RESERVED.
68 CA_OTHER1 Character 2 N/A RESERVED.
69 CA_PERMIT Character 5 N/A USPS Indicia (Optional): PERMIT #
70 CA_CITY Character 12 N/A USPS Indicia (Optional): CITY
71 CA_STATE Character 2 N/A USPS Indicia (Optional): STATE
72 CA _LABFRM Character 1 N/A LABEL/FORM TYPE: BOX
73 CA_CODFRM Character 1 N/A LABEL/FORM TYPE: COD
74 CA_LABIMP Logical 1 N/A RESERVED.
75 CA_CODIMP Logical 1 N/A RESERVED.
76 INETALLOW Logical 1 N/A Shipping Method is Available on Web
77 DELIVTIME Character 5 Delivery Time
78 USPBARCODE Logical 1 N/A Use discounted barcode label
306
79 MERHBYSHTO Logical 1 N/A RESERVED.
80 CA_RL10 Numeric 9 2 Msde Total Range 10 Charges: Order Total - From $
81 CA_RH10 Numeric 9 2 Msde Total Range 10 Charges: Order Total - To $
82 CA_RR10 Numeric 9 2 Msde Total Range 10 Charges: Shipping Charges – Exaxct Charge
83 CA_RP10 Numeric 7 2 Msde Total Range 10 Charges: Shipping Charges – % of Total
84 CA_RL11 Numeric 9 2 Msde Total Range 11 Charges: Order Total - From $
85 CA_RH11 Numeric 9 2 Msde Total Range 11 Charges: Order Total - To $
86 CA_RR11 Numeric 9 2 Msde Total Range 11 Charges: Shipping Charges – Exaxct Charge
87 CA_RP11 Numeric 7 2 Msde Total Range 11 Charges: Shipping Charges – % of Total
88 USI_EXEMPT Logical 1 N/A Do Not Include in Universal Shipping Interface
89 CA_PER_BOX Numeric 5 2 Customer Shipping Charges: Per Box Charge
90 CW_PER_BOX Character 1 N/A Per Box Charge: When to Charge F=First Shipment S=Subsequent Shipments A=All Shipments
91 WEIGHTRANG RESERVED.
92 VALUEBASED Character 1 N/A CARRIER INSURANCE CHARGE: DECLARED VALUE BASED ON: R = Retail C=Cost EMPTY STRING=None
93 CARRIER_ID Numeric 18 0 RESERVED.
307
94 USI_TABLE Character 10 N/A Univeral Shipping Interface table
95 GODESC Character 20 N/A Google Checkout: Description
96 GSHIPAMT Numeric 10 2 Google Checkout: Default Charge
97 INACTIVE Logical 1 N/A Inactive shipping Method
98 QTYSHTO Character 1 N/A Calculate Charges based on line item quantity (First Shipment Only).
99 CARBON Character 40 N/A Carbon Neutral
308
Table File Structure – National Sales Tax Table
File Name: COUNTRY.DBF
File Contents: Contains information about country sales tax.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 COUNTRY Character 3 N/A Country Code
2 NAME Character 26 N/A Country Name
3 NTAXR Character 20 N/A National Sales Tax Rate
4 PHONEMASK Character 2 2 Country Phone Mask
5 TAX_CLASSA Logical 1 N/A Is National Tax Class A taxable?
309
6 TAX_CLASSB Logical 1 N/A Is National Tax Class B taxable?
7 TAX_CLASSC Logical 1 N/A Is National Tax Class C taxable?
8 TAX_CLASSD Logical 1 N/A Is National Tax Class D taxable?
9 TAX_CLASSE Logical 1 N/A Is National Tax Class taxable?
10 TAXSHIP Logical 1 N/A Tax Shipping for National Tax Rates
11 ISO2 Character 2 N/A ISO 3166-1 alpha-2 country code
12 ISO3 Character 3 N/A ISO 3166-1 alpha-3 country code
13 ISONUM Character 3 N/A ISO 3166-1 numeric country code
14 RATECLASSA Numeric 7 4 National Class A tax rate
15 RATECLASSB Numeric 7 4 National Class B tax rate
16 RATECLASSC Numeric 7 4 National Class C tax rate
17 RATECLASSD Numeric 7 4 National Class D tax rate
18 RATECLASSE Numeric 7 4 National Class E tax rate
19 WAREHOUSE Character 6 N/A RESERVED.
20 N_LCAPA Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class A
21 N_LCAPB Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class B
22 N_LCAPC Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class C
310
23 N_LCAPD Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class D
24 N_LCAPE Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class E
25 N_LTAXITA Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class A
26 N_LTAXITB Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class B
27 N_LTAXITC Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class C
28 N_LTAXITD Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class D
29 N_LTAXITE Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class E
30 N_NCAPA Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class A
31 N_NCAPB Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class B
32 N_NCAPC Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class C
33 N_NCAPD Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class D
34 N_NCAPE Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class E
35 N_NTAXITA Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class A
311
36 N_NTAXITB Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class B
37 N_NTAXITC Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class C
38 N_NTAXITD Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class D
39 N_NTAXITE Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class E
40 NONTAXBOX Logical 1 N/A Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag for National Tax Rates
41 NTAXTHRESA Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class A
42 NTAXTHRESB Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class B
43 NTAXTHRESC Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class C
44 NTAXTHRESD Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class D
312
45 NTAXTHRESE Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class E
46 TAXHAND Logical 1 N/A Tax Handling Fees Only for National Tax Rates
47 COUNTRY_ID Numeric 18 0 RESERVED. Internal Primary Key
313
Table File Structure – State Sales Tax Table
File Name: STATE.DBF
File Contents: Contains information about state sales tax.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 COUNTRY Character 3 N/A Country Code
2 STATE Character 3 N/A State Code
3 NAME Character 25 N/A State Name
4 LOW Character 3 N/A RESERVED.
5 HIGH Character 3 N/A RESERVED.
314
6 TAXRATE Numeric 7 4 Tax Rate for State
7 FIN_RATE Numeric 7 4 Finance Charges Rate for State
8 TAX_CLASSA Logical 1 N/A Is State Sales Tax Class A taxable?
9 TAX_CLASSB Logical 1 N/A Is State Sales Tax Class B taxable?
10 TAX_CLASSC Logical 1 N/A Is State Sales Tax Class C taxable?
11 TAX_CLASSD Logical 1 N/A Is State Sales Tax Class D taxable?
12 TAX_CLASSE Logical 1 N/A Is State Sales Tax Class E taxable?
13 TAXSHIP Logical 1 N/A Tax Shipping for State Sales Tax Rate
14 PRESENCE Logical 1 N/A RESERVED.
15 RATECLASSA Numeric 7 4 State Class A sales tax rate
16 RATECLASSB Numeric 7 4 State Class B sales tax rate
17 RATECLASSC Numeric 7 4 State Class C sales tax rate
18 RATECLASSD Numeric 7 4 State Class D sales tax rate
19 RATECLASSE Numeric 7 4 State Class E sales tax rate
20 WAREHOUSE Character 6 N/A RESERVED.
21 S_LCAPA Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class A
22 S_LCAPB Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class B
315
23 S_LCAPC Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class C
24 S_LCAPD Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class D
25 S_LCAPE Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class E
26 S_LTAXITA Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class A
27 S_LTAXITB Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class B
28 S_LTAXITC Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class C
29 S_LTAXITD Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class D
30 S_LTAXITE Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class E
31 S_NCAPA Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class A
32 S_NCAPB Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class B
33 S_NCAPC Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class C
34 S_NCAPD Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class D
35 S_NCAPE Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class E
316
36 S_NTAXITA Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class A
37 S_NTAXITB Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class B
38 S_NTAXITC Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class C
39 S_NTAXITD Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class D
40 S_NTAXITE Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class E
41 NONTAXBOX Logical 1 N/A Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag for State Tax Rates
42 STAXTHRESA Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class A
43 STAXTHRESB Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class B
44 STAXTHRESC Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class C
45 STAXTHRESD Logical 1 N/A Do Not Tax Portion Below the Only Tax
317
Items That Exceeds Amount for Tax Class D
46 STAXTHRESE Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class E
47 TAXHAND Logical 1 N/A Tax Handling Fees Only for National Tax Rates
48 STATE_ID Numeric 18 0 RESERVED. Internal Primary Key
318
Table File Structure – County Sales Tax Table
File Name: COUNTY.DBF
File Contents: Contains information about county sales tax.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 COUNTRY Character 3 N/A Country Code
2 STATE Character 3 N/A State Code
3 COUNTY Character 3 N/A County Code
4 FIPS Character 5 N/A RESERVED.
5 NAME Character 25 N/A County Name
319
6 T_Z Character 2 N/A RESERVED.
7 MSA Character 4 N/A RESERVED.
8 CTAXR Numeric 7 4 County Sales Tax Rate
9 PRESENCE Logical 1 N/A RESERVED.
10 CODE1
11 WAREHOUSE
12 TAXSHIP Logical 1 N/A Tax Shipping for County Sales Tax Rate
13 TAX_CLASSA Logical 1 N/A Is County Sales Tax Class A taxable?
14 TAX_CLASSB Logical 1 N/A Is County Sales Tax Class B taxable?
15 TAX_CLASSC Logical 1 N/A Is County Sales Tax Class C taxable?
16 TAX_CLASSD Logical 1 N/A Is County Sales Tax Class D taxable?
17 TAX_CLASSE Logical 1 N/A Is County Sales Tax Class E taxable?
18 RATECLASSA Numeric 7 4 County Class A sales tax rate
19 RATECLASSB Numeric 7 4 County Class B sales tax rate
20 RATECLASSC Numeric 7 4 County Class C sales tax rate
21 RATECLASSD Numeric 7 4 County Class D sales tax rate
22 RATECLASSE Numeric 7 4 County Class E sales tax rate
320
23 C_LCAPA Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class A
24 C_LCAPB Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class B
25 C_LCAPC Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class C
26 C_LCAPD Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class D
27 C_LCAPE Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class E
28 C_LTAXITA Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class A
29 C_LTAXITB Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class B
30 C_LTAXITC Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class C
31 C_LTAXITD Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class D
32 C_LTAXITE Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class E
33 C_NCAPA Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class A
34 C_NCAPB Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class B
35 C_NCAPC Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class C
321
36 C_NCAPD Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class D
37 C_NCAPE Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class E
38 C_NTAXITA Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class A
39 C_NTAXITB Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class B
40 C_NTAXITC Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class C
41 C_NTAXITD Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class D
42 C_NTAXITE Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class E
43 NONTAXBOX Logical 1 N/A Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag for County Tax Rates
44 CTAXTHRESA Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class A
45 CTAXTHRESB Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class B
46 CTAXTHRESC Logical 1 N/A Do Not Tax Portion Below the Only Tax
322
Items That Exceeds Amount for Tax Class C
47 CTAXTHRESD Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class D
48 CTAXTHRESE Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class E
49 TAXHAND Logical 1 N/A Tax Handling Fees Only for National Tax Rates
50 COUNTY_ID Numeric 18 0 RESERVED. Internal Primary Key
323
Table File Structure – Zip Sales Tax Table
File Name: ZIP.DBF
File Contents: Contains information about the zipcode sales tax rates.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 COUNTRY Character 3 N/A Country Code
2 ZIPCODE Character 7 N/A Zip Code
3 STATE Character 3 N/A State Code
4 CITY Character 30 N/A RESERVED.
5 TYPE Character 1 N/A RESERVED.
324
6 COUNTY Character 3 N/A County Code
7 RTDTAX Logical 1 N/A RESERVED.
8 ITAXR Numeric 7 4 Zip Code Sales Tax Rate
9 PRESENCE Logical 1 N/A RESERVED.
10 CODE1 Character 1 N/A RESERVED.
11 LOGIC1 Logical 1 N/A RESERVED.
12 WAREHOUSE Character 6 N/A RESERVED.
13 TAXSHIP Logical 1 N/A Tax Shipping for Zip Code Sales Tax Rate
14 TAX_CLASSA Logical 1 N/A Is Zip Code Sales Tax Class A taxable?
15 TAX_CLASSB Logical 1 N/A Is Zip Code Sales Tax Class B taxable?
16 TAX_CLASSC Logical 1 N/A Is Zip Code Sales Tax Class C taxable?
17 TAX_CLASSD Logical 1 N/A Is Zip Code Sales Tax Class D taxable?
18 TAX_CLASSE Logical 1 N/A Is Zip Code Sales Tax Class E taxable?
19 RATECLASSA Numeric 7 4 Zip Code Class A sales tax rate
20 RATECLASSB Numeric 7 4 Zip Code Class B sales tax rate
21 RATECLASSC Numeric 7 4 Zip Code Class C sales tax rate
325
22 RATECLASSD Numeric 7 4 Zip Code Class D sales tax rate
23 RATECLASSE Numeric 7 4 Zip Code Class E sales tax rate
24 I_LCAPA Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class A
25 I_LCAPB Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class B
26 I_LCAPC Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class C
27 I_LCAPD Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class D
28 I_LCAPE Logical 1 N/A Stop Taxing After Order Total Exceeds Flag for Tax Class E
29 I_LTAXITA Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class A
30 I_LTAXITB Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class B
31 I_LTAXITC Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class C
32 I_LTAXITD Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class D
33 I_LTAXITE Logical 1 N/A Only Tax Items That Exceeds Flag for Tax Class E
34 I_NCAPA Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class A
35 I_NCAPB Numeric 10 2 Stop Taxing After Order Total Exceeds Amount
326
6or Tax Class B
36 I_NCAPC Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class C
37 I_NCAPD Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class D
38 I_NCAPE Numeric 10 2 Stop Taxing After Order Total Exceeds Amount for Tax Class E
39 I_NTAXITA Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class A
40 I_NTAXITB Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class B
41 I_NTAXITC Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class C
42 I_NTAXITD Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class D
43 I_NTAXITE Numeric 10 2 Only Tax Items That Exceeds Amount for Tax Class E
44 NONTAXBOX Logical 1 N/A Do Not Tax Shipping On Boxes With All Non-Taxable Items Flag for County Tax Rates
45 ITAXTHRESA Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class A
46 ITAXTHRESB Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class B
47 ITAXTHRESC Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds
327
Amount for Tax Class C
48 ITAXTHRESD Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class D
49 ITAXTHRESE Logical 1 N/A Do Not Tax Portion Below the Only Tax Items That Exceeds Amount for Tax Class E
50 TAXHAND Logical 1 N/A Tax Handling Fees Only for Zip Code Sales Tax Rates
51 ZIP_ID Numeric 18 0 RESERVED. Internal Primary Key
328
Table File Structure – MIVA SKU Table
File Name: MIVASKU.DBF
File Contents: Contains information about the MIVA sku data.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 [SKU] Character 30 N/A Miva Sku
2 [PRODTITLE] Character 100 N/A Product Name
3 [PRODDESC] Text Full Description
4 [MIVAACTIVE] Logical 1 N/A Is Product Active in Miva for Sales?
5 [MAINIMAGE] Character 100 N/A Full Size Image
329
6 [THUMBNAIL] Character 100 N/A ThumbNail Image
7 [HAS_ATTR] Logical 1 N/A Has Attribute?
8 [TAXABLE] Logical 1 N/A Is Product Taxable?
9 [MIVAPRICE] Numeric 20 2 Price
10 [MIVACOST] Numeric 20 2 Cost.
11 [ATTR1CODE] Character 20 N/A Product Attribute Code 1
12 [ATTR1TITLE] Character 50 N/A Product Attribute Code 1 Prompt (Parent)
13 [ATTR1TYPE] Character 20 N/A Attribute Type Code 1
14 [ATTR2CODE] Character 20 N/A Product Attribute Code 2
15 [ATTR2TITLE] Character 50 N/A Product Attribute Code 2 Prompt (Parent)
16 [ATTR2TYPE] Character 20 N/A Attribute Type Code 2
17 [ATTR3CODE] Character 20 N/A Product Attribute Code 3
18 [ATTR3TITLE] Character 50 N/A Product Attribute Code 3 Prompt (Parent)
19 [ATTR3TYPE] Character 20 N/A Attribute Type Code 3
20 [MIVASKU_ID] Numeric 18 0 RESERVED. Internal Primary Key
21 [CATEGORY] Text Product Category Code
330
Table File Structure – MIVA Product Table
File Name: MIVAPROD.DBF
File Contents: Contains information about the MIVA product data.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 [NUMBER] Character 20 N/A MOM Stock Item Number
2 [SKU] Character 30 N/A Miva SKU
3 [UNITS] Numeric 10 0 Units
4 [WEIGHT] Numeric 13 2 Product Weight
5 [ATTR1VALUE] Character 30 N/A Attribute Code 1 Value
331
6 [ATTR2VALUE] Character 30 N/A Attribute Code 2 Value
7 [ATTR3VALUE] Character 30 N/A Attribute Code 3 Value
8 [ATTR1PRICE] Numeric 20 2 Attribute Code 1 Price
9 [ATTR2PRICE] Numeric 20 2 Attribute Code 2 Price
10 [ATTR3PRICE] Numeric 20 2 Attribute Code 3 Price
11 [MIVAPROD_ID] Character 20 N/A RESERVED. Internal Primary Key
12 [ATTR1IMAGE] Character 50 N/A Attribute Code 1 Image
13 [ATTR2IMAGE] Character 20 N/A Attribute Code 2 Image
14 [ATTR3IMAGE] Character 20 N/A Attribute Code 3 Image
15 [SYNC_LOW] Character 50 N/A When Quanty is equal or lower than X
16 [SYNC_QTY] Character 20 N/A Take X units from available units for sales
17 [SYNC_PCT] Character 20 N/A Take X % of available units for sale
18 [ATTR1TITLE] Character 50 N/A Product Attribute Code 1 Prompt (Child)
19 [ATTR2TITLE] Character 20 N/A Product Attribute Code 2 Prompt (Child)
20 [ATTR3TITLE] Numeric 18 0 Product Attribute Code 3 Prompt (Child)
332
Table File Structure – MOM Product Attribute Code Table
File Name: ST_OPTCODE.DBF
File Contents: Contains information about MOM product attribute codes.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 [OPTCODE_ID] Character 20 N/A RESERVED. Internal Primary Key
2 [PARENTSKU] Character 30 N/A Miva SKU
3 [OPTCODE] Numeric 10 0 Product Attribute Code
4 [OPTTITLE] Numeric 13 2 Product Attribute Name
5 [NSEQUENCE] Character 30 N/A Sequence
333
6 [OPTTYPE] Character 30 N/A Product Attribute Selection Type
D=Drop Down Selection R=Radio ButtonSelection T=TextEntry
7 [VALLEN] Character 30 N/A Field Length when optType=’T’
8 [VALTYPE] Numeric 20 2 Product Attribute validation when optType = ‘T’
C=PlainText N=Numeric Value D=Date Value
9 [SKULINK] Numeric 20 2 Is Attribute’s value part of the SKU link
10 [VALDEC] Numeric 20 2 Product Attribute Decimals when optType = ‘T’
334
Table File Structure – MOM Product Attribute Code Value Table
File Name: ST_OPTVAL.DBF
File Contents: Contains information about MOM product attribute codes.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 [OPTVAL_ID] Numeric 18 0 RESERVED. Internal Primary Key
2 [OPTVALKEY] Numeric 18 0 Product Attribute Code Key
3 [OPTCODE] Character 30 N/A Product Attribute Code
4 [OPTVALUE] Numeric 10 0 Product Attribute Code Value
5 [OPTPRICE] Numeric 13 2 Product Attribute Code Value Price
335
[NSEQUENCE] Character 30 N/A Product Attribute Code Value Sequence
[PARENTSKU] Character 10 N/A First 10 characters of MOM stock Item Number
336
Table File Structure – MOM Product Attribute Code Value Table
File Name: ST_OPTSKU.DBF
File Contents: Contains information about MOM product attribute codes.
Table Legend
The column headings in the table include the following.
Position - The numeric position of the field in the table. Field Name - The XBASE field name used in programming the information
transferred. It serves to classify data kept in this field. Type - Can be one of 5 types:
Character - Text type data Numeric - numbers Integer - a whole number Datetime - a date Logical - True or False
Width - The maximum number of spaces that the field element can occupy. Dec. - For numeric fields only. The number of decimal places reserved for the
numeric value. This field is not applicable in Comma Delimited format. Description of Field - A definition of the field's contents. RESERVED signifies
for M.O.M. use only. FUTURE USE signifies that the field may be used in a future release. UK Only signifies that the field is used for the UK Edition of M.O.M.
POSITION FIELD NAME TYPE WIDTH DEC DESCRIPTION
1 [OPTSKU_ID] Numeric 18 0 RESERVED. Internal Primary Key
2 [OPTIONKEY] Numeric 18 0 Compress Attribute Key Settings
3 [NUMBER] Character 30 N/A MOM Stock Item Number
337
Reference Encryption Credit card numbers and eCheck routing & account numbers can be passed to MOM through the API as plain text, or as an encrypted value as long as you set the Enc_Key and Enc_Type properties of the API. The Enc_Key property needs to be set to the encryption key the API will use to decrypt the data. The length of that key depends on the type of encryption being used. Possible values for enc_type are 1 through 5, which correspond to the following:
1 – AES 128 encryption. Enc_Key property needs to be a 16 character key.
2 – AES 192 encryption. Enc_Key property needs to be a 24 character key.
3 – AES 256 encryption. Enc_Key property needs to be a 32 character key.
4 – Blowfish encryption. Enc_Key property needs to be a 56 character key.
5 – TEA (Tiny Encryption algorithm) Enc_Key property needs to be a 16 character key.