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:

1-WebSale.json

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

String, max 255 characters, cannot be null

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

String, max 255 characters, cannot be null

Your ID number or key for this sale.

SaleEmail

String, max 255 characters, can be null

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

String, max 255 characters, can be null

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

Decimal, max 18 digits, cannot be null

The total of the sale including shipping and tax.

ShippingAmt

Decimal, max 18 digits, can be null

The price of shipping before tax.

 

*BillingAddress

Object contains billing address data. It is required. Only one address can be included.

*Street 1

String, max 255 characters, cannot be null

The street number and street name of the address.

Street 2

String, max 255 characters, can be null

Additional street address data, e.g. suite., for this address.

*City

String, max 255 characters, cannot be null

The city in the address.

*State

String, 255 characters, cannot be null

The state in the address.

*Zip

String, max 255 characters, cannot be null

The ZIP or postal code in the address.

Country

String, max 255 characters, can be null

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

String, max 255 characters, cannot be null

The street number and street name of the address.

Street 2

String, max 255 characters, can be null

Additional street address data, e.g. suite., for this address.

City

String, max 255 characters, cannot be null

The city in the address.

State

String, 255 characters, cannot be null

The state in the address.

Zip

String, max 255 characters, cannot be null

The ZIP or postal code in the address.

Country

String, max 255 characters, can be null

The country in the address.

 

*SoldItems Object

Object contains items on this sale. Multiple items can be included. It is required.

*ItemSku

String, max 255 characters, cannot be null

The Edge item number; this is the ItemKey included in the ItemList.json export.

*SalePrice

Decimal, max 18 digits, cannot be null

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

String, max 2 characters, cannot be null

Must always be "CC"; use PaymentSubType to distinguish different methods, including non-CC options such as Paypal.

*PaymentAmount

Decimal, max 18 digits, cannot be null

The amount paid via this method.

*PaymentSubType

String, max 255 characters, cannot be null

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

String, max 50 characters, cannot be null

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

String, max 4 characters, can be null

Expiration date of the credit card in format MonthYear, e.g. 1220.

*FirstName

String, max 255 characters, cannot be null

First name of the customer.

*LastName

String, max 255 characters, cannot be null

Last name of the customer.