Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions to Actions #125

Closed
elf-pavlik opened this issue Sep 18, 2014 · 3 comments
Closed

Additions to Actions #125

elf-pavlik opened this issue Sep 18, 2014 · 3 comments

Comments

@elf-pavlik
Copy link
Contributor

i needed it as an example for my suggestion in http://lists.w3.org/Archives/Public/public-vocabs/2014Sep/0182.html

Additions to Actions

AuthoooAr: Vicki Tardif Holland (vtardif@google.com)
Last Edited: 20140909

Background

As schema.org Actions are adopted by the community for everything from reserving a flight to listening to music, we are finding a need to describe new Actions and conditions on when and where a provider is available for a user to complete an Action. The following new types and properties are proposed to help with describing these conditions.

Thing > Action > OperateAction

The new OperateAction allows users to operate a device or application. It's subtypes
are ActivateAction, DeactivateAction, SuspendAction, and ResumeAction. OperateAction has no unique properties.

Thing > Action > OperateAction > ActivateAction

An action which allows a user to start a device or application (e.g. starting a timer or turning on a flashlight).

Thing > Action > OperateAction > DeactivateAction

Stop a device or application (e.g. stop a timer or turn off a flashlight).

Thing > Action > OperateAction > SuspendAction

Momentarily pause a device or application (e.g. pause music or pause a timer).

Thing > Action > OperateAction > ResumeAction

Resume an action which was formerly paused (e.g. resume playing music or resume the timer).

ConsumeAction

The ConsumeAction type already exists in schema.org. To date, we have primarily discussed conditions on the entity performing the action, but we want to have conditions on the object of the action as well. The proposed new properties are:

Property Expected Type Description
contingentOnOffer Offer An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it.

Offer

The following property will be added to the existing Offer type.

Property Expected Type Description
notAvailableAtOrFrom Place The action is not available for agents/objects in the specified region.

Examples

Available in the US-only

{
  "@context": "http://schema.org",
  "@type": "WatchAction",
  "target": "http://www.hulu.com/thedailyshowwithjonstewart",
  "contingentOnOffer": {
    "@type": "Offer",
    "availableAtOrFrom": {
      "@type": "Country",
      "name": "USA"
    }
  }
}

Not Available in China

{
  "@context": "http://schema.org",
  "@type": "WatchAction",
  "target": "http://www.hulu.com/thedailyshowwithjonstewart",
  "contingentOnOffer": {
    "@type": "Offer",
    "notAvailableAtOrFrom": {
      "@type": "Country",
      "name": "CHN"
    }
  }
}

Available in US and Later in Canada

{
  "@context": "http://schema.org",
  "@type": "WatchAction",
  "target": "http://www.hulu.com/thedailyshowwithjonstewart",
  "contingentOnOffer": [
  {
    "@type": "Offer",
    "availabilityStarts": "20140701",
    "availableAtOrFrom": {
      "@type": "Country",
      "name": "USA"
    }
  },
  {
    "@type": "Offer",
    "availabilityStarts": "20140801",
    "availableAtOrFrom": {
      "@type": "Country",
      "name": "CAN"
    }
  }
]}
@elf-pavlik
Copy link
Contributor Author

notAvailableAtOrFrom looks quite disturbing to me!

looking at:
Offer --{availability}--> ItemAvailablity

Thing > Intangible > Enumeration > ItemAvailability
A list of possible product availability options.

  • Discontinued
  • InStock
  • InStoreOnly
  • LimitedAvailability
  • OnlineOnly
  • OutOfStock
  • PreOrder
  • SoldOut

Offer and Demand also have properties:

  • availabilityEnds
  • availabilityStarts
  • availableAtOrFrom
  • availableDeliveryMethod

@mfhepp, can given Offer or Demand have item available from multiple locations in multiple times? Maybe we could look for something in direction

(Offer || Demand) --{availability}--> [Availability]
i use [ ] to suggest an array

Availability could have:

  • availabilityStatus}--> AvailabilityStatus // renamed from ItemAvailability
  • endTime
  • startTime
  • location
  • deliveryMethod

Then we could add to AvailabilityStatus enumeration: NotAvailable 😄

{
  "@context": "http://schema.org",
  "@type": "WatchAction",
  "target": "http://www.hulu.com/thedailyshowwithjonstewart",
  "contingentOnOffer": {
    "@type": "Offer",
    "availability": [
    {
      "@type": "Availability",
      "availabiltyStatus": "NotAvailable",
      "location": {
        "@type": "Country",
        "name": "CHN"
      }
    }]
  }
}

@jvandriel
Copy link

And how about "availabilty": "http://schema.org/False"?

@elf-pavlik
Copy link
Contributor Author

people seem to currently prefer public-vocabs mailing list over gh issues, still useful to have it as reference of GFM capacity and hope to move away from PDF 📝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants