Skip to content

PricingByArea

Dan Brickley edited this page Oct 31, 2014 · 11 revisions

##Schema.org Best Practice Notes

Attempting to document Area and other measures.

Q: How best to express price per unit of surface?

For example http://www.homedepot.com/p/TrafficMASTER-Ceramica-12-in-x-24-in-Roman-Travertine-Beige-Resilient-Vinyl-Tile-Flooring-30-sq-ft-case-42837/202932034

In this example, USD 1.79 is the price per square foot, and you can only buy packs for 30 square feet, priced USD53.70 per pack.

##Answer drafting

UN/CEFACT defines common codes for units of measure, such as 'FTK' (Square Foot), 'MTK' (Square Metre), and the special code 'C62' indicating a single piece.

Notes-in-progress.

See also http://wiki.goodrelations-vocabulary.org/Cookbook/Pricing

(originally answered by Martin Hepp)

There are basically the following ways of modeling prices per amount of something:

  1. You Offer a certain amount (e.g. 100 square metres of tiles) and attach a price specification, which either has no unit of measurement or C62 indicating a single 'piece'. Then the price applies to the quantity mentioned in the offer. This requires that you use a TypeAndQuantityNode attached to the Offer.
  2. As before, but with the unitCode for the UnitPriceSpecification set to the UNCEFACT code for squared metres ('MTK') or squared feet ('FTK'). This would mean that you offer 100 sqm of tiles, and the price is per sqm.
  3. A bit more difficult is the case when price is given in multiples or fractions of a UNCEFACT unit, e.g. 1 EUR per 0.5 liter, or 5 USD per 2 sqm.

This is (probably) best handled by the pattern from #1 with the quantity that is being billed (e.g. 2 sqm of tiles). Offers can be accepted multiple times, so essentially you say that you offer 2 sqm of tiles for e.g. 5 USD, but you are willing to sell this quantity multiple times.

Notes

eligibleQuantity and billing increment are IMO not the perfect fit for this case, because eligible quantity is for setting limits (e.g. we sell at these conditions only between a minimum of 100 sqm and a maximum of 1000 sqm). Billing increment says that you always round up the payable quantity to the next multiple of the billing increment quantity (e.g. whether you buy 4.8 or 5 sqm, you will always pay for 5 sqm if the billing increment is set to 1 sqm). Note that even if the price was give per 2 sqm, it could still be that the exact quantity is billed, so at a price of 1 USD per 2 sqm, 15 sqm would cost 7.5 USD. With a billing increment of 2 sqm, it would cost the same as 16 sqm.

Background

Two options were originally suggested:

(using itemscope="" so we can double-check syntax as XML here; this isn't needed for HTML pages)

''NOTE: These examples are only suggestions - still need to add recommended syntax.''

A)

<div class="pricingReg" itemprop="offers" itemscope="" 
  itemtype="http://schema.org/Offer">
  <link itemprop="availability" href="http://schema.org/InStock"/>
  <div itemprop="priceSpecification" itemscope="" 
    itemtype="http://schema.org/PriceSpecification">$1.79 / sq. ft.
    <meta itemprop="priceCurrency" content="USD"/>
    $<span itemprop="price">53.70</span> / case
    <div itemprop="eligibleQuantity" itemscope="" 
      itemtype="http://schema.org/QuantitativeValue">
      (covers <span itemprop="value">30.0</span> sq. ft.
      <meta itemprop="unitCode" content="FTK"/>)
      <div itemprop="valueReference" itemscope="" 
        itemtype="http://schema.org/PriceSpecification">
        <meta itemprop="price" content="1.79"/>
        <meta itemprop="priceCurrency" content="USD"/>
        <div itemprop="eligibleQuantity" itemscope="" 
          itemtype="http://schema.org/QuantitativeValue">
          <meta itemprop="value" content="1"/>
          <meta itemprop="unitCode" content="FTK"/>)
        </div>
      </div>
    </div>
  </div>
</div>

B)

<div class="pricingReg" itemprop="offers" itemscope="" 
   itemtype="http://schema.org/Offer">
  <link itemprop="availability" href="http://schema.org/InStock" />
  <div itemprop="priceSpecification" itemscope=""
    itemtype="http://schema.org/PriceSpecification">
    $<span itemprop="price">1.79</span>
    <meta itemprop="priceCurrency" content="USD" /> / sq. ft.
    <div itemprop="eligibleQuantity" itemscope=""
      itemtype="http://schema.org/QuantitativeValue">
      ( (covers  30 sq. ft.)
      <meta itemprop="value" content="1"/>
      <meta itemprop="unitCode" content="FTK"/>
    </div>
    <div itemprop="eligibleTransactionVolume" itemscope=""
      itemtype="http://schema.org/PriceSpecification"> 
      $<span itemprop="price">53.70</span>
      <meta itemprop="priceCurrency" content="USD" /> / case
    </div>
  </div>
</div>

Discussion Elsewhere

Technical details, debates etc.