Background

Some retailers that operate different stock-lists across many locations have large amounts of inventory data and it is not always possible or efficient to either request their stock through APIs or scrape web interfaces.

In such cases, integrating stock though Datafeeds is a more efficient and fast way to get a Retailer's inventory syncronised with Whisk

Terminology

Retailer

High-level business entity. Subject for integration. (e.g. HarrisTeeter)

Store

Identifyible object which end user communicates with to order products. Should have geo information associated with it.

Availability zone

Identifies zone with it's unique product parameters:

  • availability
  • price
  • promotions

Multiple stores could share the same availability zone.

Format

Whisk expects newline delimeted JSON format. Benefits of this:

  • support for nested structures and arrays
  • allows for effective stream processing

Datafeed essentials

stores.json

This file should contain information about retailer stores and their locations

  • id
  • region (e.g. CA)
  • city (e.g San Francisco)
  • postalCodes
  • availabilityZoneId
  • lat (optional)
  • lon (optional)

Example:

{"id": "0123", "region": "CA", "city": "San Francisco", "postalCodes": ["1", "2", "3"], "availabilityZoneId": "011", "lat": 37.766667, "lon": -122.433333}

availability-zones.json

Should contain following fields

  • id
  • productsidoutOfStock (optional)priceregularpromo (optional)unit (optional)priceUnitOfMeasure (optional)

Example:

{"id": "011", "products": [{"id": "11111", "outOfStock": true, "price": {"regular": 1.22, "promo": 1.10, "unit": 0.5, "priceUnitOfMeasure": "kg"}}]}

products.json

  • id
  • name
  • codes (optional)upcsbarcodes
  • brand (optional)
  • categories
  • images
  • url (optional)
  • amountraw

{"id": "11111", "name": "McCormick Chili Seasoning Mix, 1.25 OZ", "images": ["imageUrlHere"], "brand": "McCormick", "categories": ["Pantry"], "codes": {"upcs": ["0005210009150"]}, "amount": {"raw": "1.25 OZ"}}

Did this answer your question?