Importing a Web Sale
JSON sample
Import files need to be named in the format [UniqueNumber]WebSale.json. There are no restrictions on the numbering sequence used, e.g. 1-WebSale.json, 050919-1200WebSale.json, A-WebSale.json, 1234WebSale.json would all be acceptable.
Each WebSale.json must be uniquely named.
One sale per file with all items sold on that transaction.
Here is a sample file:
It contains a sale for two items.
Data and Objects
WebSale.json consists of the following data and objects.
* Asterisks indicate required data and objects.
*CustomerWebId |
Your ID number or key for this customer. This is initially assigned on customer import via the CustomerTransfer object using WebTransferWebID and must match here. |
*WebSaleId |
Your ID number or key for this sale. |
SaleEmail |
The customer's email address. If this does not match an email on file in The Edge, it will be added. Not strictly required, but recommended. |
SalePhone |
The customer's phone number. If this does not match a phone number on file in The Edge, it will be added. Not strictly required, but recommended. |
*TotalWithTax |
The total of the sale including shipping and tax. |
ShippingAmt |
The price of shipping before tax. |
*BillingAddress
Object contains billing address data. It is required. Only one address can be included.
*Street 1 |
The street number and street name of the address. |
Street 2 |
Additional street address data, e.g. suite., for this address. |
*City |
The city in the address. |
*State |
The state in the address. |
*Zip |
The ZIP or postal code in the address. |
Country |
The country in the address. |
ShippingAddress Object
Object contains shipping address data. It is not required. Only one address can be included. If not including, exclude object completely.
Street 1 |
The street number and street name of the address. |
Street 2 |
Additional street address data, e.g. suite., for this address. |
City |
The city in the address. |
State |
The state in the address. |
Zip |
The ZIP or postal code in the address. |
Country |
The country in the address. |
*SoldItems Object
Object contains items on this sale. Multiple items can be included. It is required.
*ItemSku |
The Edge item number; this is the ItemKey included in the ItemList.json export. |
*SalePrice |
The price the item was sold for before tax. |
*Payments Object
Object contains payments for this sale. Multiple methods can be included. It is required.
*PaymentType |
Must always be "CC"; use PaymentSubType to distinguish different methods, including non-CC options such as Paypal. |
*PaymentAmount |
The amount paid via this method. |
*PaymentSubType |
Name of the payment method, e.g. VISA, Mastercard, Paypal, GooglePay. These need to exactly match the credit card choices available in The Edge. To add credit cards in The Edge, click Administrative > Credit Cards > Set Up Card Types. |
*Last4 |
The last 4 digits of the credit card. Can also store Confirmation, Authorization, or other numbers returned by non-CC payment methods. UNENCRYPTED, NEVER STORE THE ENTIRE CREDIT CARD NUMBER. |
Expires |
Expiration date of the credit card in format MonthYear, e.g. 1220. |
*FirstName |
First name of the customer. |
*LastName |
Last name of the customer. |