Cookbook/Schema.org

=GoodRelations as Part of Schema.org =

Breaking News - November 8, 2012:GoodRelations is the new, official e-commerce core for schema.org 

For over a year now, we have been working with the schema.org sponsors, namely Google, Yahoo, Bing, and Yandex, on the integration of GoodRelations into the schema.org core. This will mean that you can use the full expressivity of GoodRelations directly from the schema.org namespace in Microdata syntax. Today, that addition has been officially published on the schema.org servers. This brings the full thrust of having the four biggest search engines behind it to the adoption of GoodRelations for exposing rich e-commerce data directly from shop pages and datasheets.

For more information on why this is important, see the article GoodRelations for Semantic SEO.

On this page, we will provide examples of this usage.

Note: Schema.org will be one additional syntactical form of using GoodRelations for your site. GoodRelations will remain an independent vocabulary, and usable in RDFa and other RDF syntaxes. The original namespace of GoodRelations will remain the primary location. In particular, consumers of GoodRelations data will be able to execute SPARQL queries using the original GoodRelations namespace and identifiers, because the next service release of GoodRelations will include all necessary mappings.

Motivation
We were looking for a way of making the rich GoodRelations conceptual model be usable as a direct extension of schema.org so that Webmasters would not have to choose between schema.org and GoodRelations but could instead use both the basic schema.org patterns and the advanced GoodRelations patterns from the same namespace.

Overview
The basic approach for the integration is as follows:


 * All GoodRelations classes and properties that do not yet exist in schema.org have been added to schema.org. For example, the GoodRelations class http://purl.org/goodrelations/v1#BusinessFunction becomes also a schema.org class with the identifier http://schema.org/BusinessFunction.
 * GoodRelations will include mapping axioms so that an RDF environment with minimal reasoning support (rdfs:subclassOf, rdfs:subPropertyOf, owl:equivalentClass, owl:equivalentProperty, owl:sameAs) can operate on the data purely from the GoodRelations namespace.
 * Enumerations, i.e. individuals/instances of GoodRelations will be used from the original GoodRelations namespace using the schema.org extension mechanism for external enumerations. This reduces the amount of entries that have to be added to schema.org. A list of the respective GoodRelations elements is here.
 * For a few classes and properties, the local part of the name may differ in the schema.org namespace. This was necessary in order to keep a consistent naming convention in schema.org. The names in GoodRelations remain unchanged to avoid breaking older data and older clients. A list of naming differences will be provided on this page.
 * For legal reasons, schema.org cannot contain elements for modeling licensing conditions, because site-owners may try to use them to express complex licensing terms for the use of their content by search engines, which cannot be properly handled by Web-scale crawlers. Thus, the class gr:License from GoodRelations is not available from the schema.org namespace. If you want to use gr:License, use GoodRelations in its original namespace or use the additionalType property in combination with the full URI http://purl.org/goodrelations/v1#Licenseand the main itemtype http://schema.org/BusinessFunction.
 * The upcoming GoodRelations class gr:PropertyValue and the dependent properties gr:feature, gr:propertyName, gr:propertyValue, and gr:unitText will likely not be included in the first release of the integration.
 * The gr:category is not included in the first integration step.

Offer with Delivery Charges and Business Function
The following example shows how an entity of type http://schema.org/Offer can be augmented using the granular pricing elements of GoodRelations for indicating shipping charges. It also shows the usage of business functions that define the bundle of rights you will obtain on the product.

Observe the following details:

1. Some property names differ slightly between the GoodRelations namespace and the schema.org namespace: 2. The enumerations, i.e. the instances of the classes like gr:BusinessFunction and gr:DeliveryMethod are used directly from the GoodRelations namespace. Since schema.org does typically not define lists of enumerations, that seems like the favorite way of adding support for those. So instead of http://schema.org/Sell, as one may assume:

we use http://purl.org/goodrelations/v1#Sell for such enumerations.

Rent Videos for 30 days
We use http://schema.org/Movie with the business function LeaseOut and the validity of the lease will be encoded using the eligibleDuration property:

Classes

 * schema:Offer = gr:Offering
 * schema:IndividualProduct = gr:Individual
 * schema:ParcelService = gr:DeliveryModeParcelService
 * schema:Place = gr:Location
 * schema:ProductModel = gr:ProductOrServiceModel
 * schema:CreditCard = gr:PaymentMethodCreditCard
 * schema:Product = gr:ProductOrService
 * schema:SomeProducts = gr:SomeItems

Object Properties

 * schema:priceSpecification = gr:hasPriceSpecification
 * schema:businessFunction = gr:hasBusinessFunction
 * schema:eligibleCustomerType = gr:eligibleCustomerTypes
 * schema:manufacturer = gr:hasManufacturer
 * schema:warrantyScope = gr:hasWarrantyScope
 * schema:inventoryLevel = gr:hasInventoryLevel
 * schema:dayOfWeek = gr:hasOpeningHoursDayOfWeek
 * schema:brand = gr:hasBrand
 * schema:itemOffered = gr:includes
 * schema:makesOffer = gr:offers
 * schema:availableDeliveryMethod = gr:availableDeliveryMethods
 * schema:openingHoursSpecification = gr:hasOpeningHoursSpecification
 * schema:eligibleQuantity = gr:hasEligibleQuantity
 * schema:warranty = gr:hasWarrantyPromise
 * schema:image = http://xmlns.com/foaf/0.1/depiction
 * schema:acceptedPaymentMethod = gr:acceptedPaymentMethods

A special case is This used to be gr:durationOfWarrantyInMonths in GoodRelations but will be updated to match the new name and range from schema.org shortly.
 * schema:durationOfWarranty

Datatype Properties

 * schema:minPrice = gr:hasMinCurrencyValue
 * schema:unitCode = gr:hasUnitOfMeasurement
 * schema:isicV4 = gr:hasISICv4
 * schema:gtin8 = gr:hasGTIN-8
 * schema:maxPrice = gr:hasMaxCurrencyValue
 * schema:gtin14 = gr:hasGTIN-14
 * schema:maxValue = gr:hasMaxValue
 * schema:mpn = gr:hasMPN
 * schema:value = gr:hasValue
 * schema:model = gr:hasMakeAndModel
 * schema:gtin13 = gr:hasEAN_UCC-13
 * schema:globalLocationNumber = gr:hasGlobalLocationNumber
 * schema:naics = gr:hasNAICS
 * schema:priceCurrency = gr:hasCurrency
 * schema:sku = gr:hasStockKeepingUnit
 * schema:duns = gr:hasDUNS
 * schema:minValue = gr:hasMinValue
 * schema:eligibleRegion = gr:eligibleRegions

Other Differences

 * The offers property has a different meaning in schema.org, since it links from the product to respective offers, while in GoodRelations, it links from a gr:BusinessEntity to its offers.

Additional Materials
Links:
 * Mercurial repository with the final change set
 * Public Draft Note:  This is not 100% in sync with the final status of the addition, since we cannot apply all editorial changes from the production systems back to the Google Doc.
 * Entry on the W3C Wiki