Screen: ShopSite > Preferences > Inventory Tracking > Custom Inventory Tracking Add-on

Custom Inventory Tracking Add-on Specification

ShopSite's Custom Inventory Tracking Add-on allows you to manage store inventory using a third-party application. When a customer adds a product to the cart, the add-on is called to determine if there is enough of the product in stock. The check is made again at each step through the checkout process. When the order is finalized, the add-on is notified of the completed purchase.

Invoking the add-on

Once you have configured ShopSite to use your add-on, the add-on will be called using an HTTP POST, with the parameters passed in URL encoded name-value pairs:

http://mystore.domain/cgi-path/my_inventory_add-on.cgi?value1=myvalue&value2=yourvalue

When the add-on is called, the following information is sent:

General Order Information

The following order information is passed once per call:

Field Name Description Values
inv_status What type of inventory check ShopSite is making:
  • available - check to see if the product is available to order.
  • purchased - notification that the product has been ordered.
  • level - request for the quantity of the product currently available.
  • test - test the add-on for a reply without making an inventory call.
available
purchased
level
test
storeid The Store ID. any valid Store ID (alphanumeric)
storeurl The store URL. This is a unique string that can be used to identify the store. any valid URL
Serialnum The store Serial Number any valid ShopSite Serial Number (numeric)
ordernum The order number, if inv_status=purchased. otherwise, blank. any valid order number (numeric)
locale The merchant locale. any valid HTTP language code (e.g. en-US)
parmN Any of the eight configurable additional parameters (where N is the parameter number). any string (alphanumeric)
item_total The total number of unique products in the request. Items with the same name but different order options are treated as different items. any positive integer (numeric)

Line Item Information

The following order information is passed once for each unique item in the request (where X is the line-item number for each unique product):

Field Name Description Values
pXname The product name. Each ShopSite product should have a unique name. any string (alphanumeric)
pXsku The product SKU in ShopSite. any string (alphanumeric)
pXoption_total The number of ordering options for this product. The possible values are:
  • -1 - There are order option menus for the product, but at least one has not been selected.
  • 0 - There are no order option menus for the product.
  • N - A positive integer representing the number of order option menus for the product.
-1
0
any positive integer (numeric)
pXoptionN The selected value for the product ordering option menu. Repeats for each of the order option menus indicated in pXoption_total for the product (where N is an incrementing integer representing the ordering option menu number). Unselected values for order option menus are not passed. any string (alphanumeric)
pXquantity The total quantity of the product ordered. any positive integer (numeric)
pXtype The product type. May be:
  • T - Tangible products (subject to inventory control).
  • D - Download products (not subject to inventory control).
T
D
pXfieldN Any of the 50 configurable extra product fields (where N is the extra product field number). any string (alphanumeric)

Add-on Responses

The following values may be sent in a response from the add-on to ShopSite. The add-on should send the response to standard out in the form of URL encoded name-value pairs separated by a newline (linefeed) character.

General Order Information

The following order information is passed once per response:

Field Name Description Values
product_count The total number of inventory products. This must match the item_total in the call. any positive integer (numeric)

Line Item Information

If inv_status is Available or Level, the following order information should passed once for each unique item in the request in the same order the items were listed in the request (where X is the line-item number corresponding to the same line-item number for each unique product in the request):

Field Name Description Values
pXquantity The number of products available:
  • 0 - indicates the product is out of stock. Customers will not be allowed to continue an order with a zero-quantity product in the cart, and will see a message explaining this.
  • any positive integer - indicates the current inventory available for the product. This will be interpreted to indicate the customer may continue with the checkout process.
  • less than N - indicates that pXquantity is greater than the available number of products (where N is the available number of products). Customers will be notified and required to decrease the product quantity to a number no greater than the quantity available.
Any non-negative integer or
less than N
pXnewsku Optional. A new SKU to assign to the product. This may be used if you have multiple SKUs for products with different order options (e.g. small, medium, and large shirts). The new SKU will be displayed in the cart and order, but will not alter the ShopSite product SKU or the SKU passed in later calls to the add-on from ShopSite. any string (alphanumeric)

ShopSite Help and Resource Center
Last updated: January 28, 2014
Give Feedback


ShopSite Shopping Cart Software