Product / Order / Inventory feeds & JS for Justuno Plus AI Commerce product suggestions

Add unique JS for your Commerce AI product suggestions. Commerce AI is a feature specific to Justuno Plus plans.

Last updated 2/8/2021

Intro

This article is for use with any shopping cart platform other than Shopify, Bigcommerce, Woocommerce, or Magento. Those mentioned platforms have respective apps available to that automatically add all the necessary feeds for you.

  • If you do not have one of mentioned pre-integrated platforms, Justuno can utilize CSV feeds for products, orders, and inventory adjustments.  CSV feeds will need to be uploaded automatically through your FTP. You can also provide a URL where we can query with specific query parameters to fetch the latest data.
  • Product tags for Commerce AI can be set from within the product data in your respective platform. 

CSV Feed Specifications

Product Feed

If you have a product that is setup as as variants or otherwise known as parent / child relationship.  Then you will have one row for each variant.  For instance, a shirt with 3 colors each available in 3 sizes, then there would be 9 columns in the CSV file for it.  All of the parent level attributes would be replicated in each of the 9 columns.


  • There must always be at least one populated object in the Variants array. If this is a simple product with no variant options, you should duplicate the necessary parent level info into the variant.
  • OptionType1 should contain the heading for the variant Option1. For example: OptionType1 = Size and Option1 for each variant in that product should contain it's size value.
  • Image Urls should contain full url references to images that are sized at or around 200-300px wide.
# the following are product parent level attributes

ProductID string
MSRP number
Price number
SalePrice number
Title string
Vendor string
ImageURL1 string
ImageURL2 string
ImageURL3 string
AddToCartURL string
productURL string
OptionType1 string # Example: Color
OptionType2 string # Example: Size
OptionType3 string
Categories string # pipe delimited for multiple categories
Tags string # pipe delimited for multiple tags
CreatedAt datetime # any date or datetime format will work
UpdatedAt datetime # any date or datetime format will work
ReviewsCount number
ReviewsRatingSum number

# the following are variant level product attributes

variantID string
variantTitle string
variantSKU string
variantMSRP number
variantOption1 string # Example: Red
variantOption2 string # Example: XL
variantOption3 string
variantSalePrice number
variantPrice number
variantImageURL1 strin
variantImageURL2 string
variantImageURL3 string
variantAvailableQuantity number # set to -9999 to disable the item

Order Feed

Similar to the product variants setup.  If your order has 3 items in it.  Then your CSV would have 3 rows for the order.  Each row would have the unique item's information and the replicated order attributes.

# the following are order attributes

OrderID string
CustomerID string
Email string
CreatedAt datetime
UpdatedAt datetime
TotalPrice number
SubtotalPrice number
ShippingPrice number
TotalTax number
TotalDiscounts number
Currency string # USD for US Dollar
CountryCode string

# the following are order item attributes

ItemProductID string
ItemVariantID string
ItemPrice number
ItemDiscount number
ItemQuantity number

Inventory Feed

The inventory feed is optional but is recommended to keep your inventory available quantities up to date.  It's expecting a full inventory file each time, meaning if an item doesn't exist in it, that item will be marked disabled.  You can also mark items disabled by setting the AvailableQuantity to -9999.

# the following are inventory item attributes

ID string
inventoryQuantity number # set to -9999 to disable the item

Additional Javascript snippets necessary

<script>
window.juapp=window.juapp||function(){(window.juapp.q=window.juapp.q||[]).push(arguments)}

juapp('local','pageType','{homepage/category/product/cart/checkout/thankyou/....}');
juapp('local','prodId','{product ID of product being viewed}');
juapp('local','custId','{logged in customer ID}');
</script>

You should try to include the three juapp function calls whenever possible per page load on your site if you have values to assign them as.