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

Primary Offer #116

Open
nickevansuk opened this issue Jul 18, 2018 · 5 comments
Open

Primary Offer #116

nickevansuk opened this issue Jul 18, 2018 · 5 comments
Labels
discussion General discussion question, not yet a formal proposal

Comments

@nickevansuk
Copy link
Contributor

nickevansuk commented Jul 18, 2018

Proposer

EMD

Use Case

Where multiple Offers are available for an Event, which price should be used to advertise the activity in a summary view (e.g. when only one price can be displayed)

Why is this not covered by existing properties?

Offers do not make it clear which offer is the primary offer, so the primary price to use for display is non-trivial to select.

Please provide a link to example data

"offers": [
  {
    "type": "Offer",
    "identifier": "OX-AD",
    "name": "Oxygen - Adult",
    "description": "Fitness Ride",
    "price": 5.2,
    "priceCurrency": "GBP",
    "genderRestriction": "http://openactive.io/ns#None"
  },
  {
    "type": "Offer",
    "identifier": "OX-JNR",
    "name": "Oxygen - Junior",
    "description": "Fitness Ride",
    "price": 4.2,
    "priceCurrency": "GBP",
    "ageRange": {
      "type": "QuantitativeValue",
      "minValue": 50
    },
    "genderRestriction": "http://openactive.io/ns#None"
  }
]

Investigation

Although there is an AggregateOffer type available, it does not provide additional information about a "primary" offer, unless it included in a repurposed price property, as below.

"offers": {
  "type": "AggregateOffer",
  "highPrice": 5.2,
  "price": 5.2, /* display price is here, based on the target age group of the activity */
  "lowPrice": 4.2,
  "priceCurrency": "GBP",
  "offerCount": 2,
  "offers": [
    {
      "type": "Offer",
      "identifier": "OX-AD",
      "name": "Oxygen - Adult",
      "description": "Fitness Ride",
      "price": 5.2,
      "priceCurrency": "GBP"
    },
    {
      "type": "Offer",
      "identifier": "OX-JNR",
      "name": "Oxygen - Junior",
      "description": "Fitness Ride",
      "price": 4.2,
      "priceCurrency": "GBP",
      "ageRange": {
        "type": "QuantitativeValue",
        "minValue": 50
      }
    }
  ]
}

Further investigation is required

@nickevansuk nickevansuk added the discussion General discussion question, not yet a formal proposal label Jul 18, 2018
@nickevansuk nickevansuk added this to Backlog in Specification revisions via automation Jul 18, 2018
@nickevansuk
Copy link
Contributor Author

nickevansuk commented Jul 20, 2018

Given that an adult price and junior price will need to be present for consistent searching, filtering, and display across data feeds, the AggregateOffer could actually be used to represent this, especially if a large number of offers are available.

Suggest using ext:publicAdultPrice and ext:publicJuniorPrice consistent with publicAccess.

Also ext:membershipRequired if all .offer.eligibleCustomerType = "http://openactive.io/ns#Member" (see #80)

"offers": {
  "type": "AggregateOffer",
  "ext:publicAdultPrice": 5.2,
  "ext:publicJuniorPrice": 4.2,
  "ext:membershipRequired": true,
  "priceCurrency": "GBP",
  "offers": [
    {
      "type": "Offer",
      "identifier": "OX-AD",
      "name": "Oxygen - Adult",
      "description": "Fitness Ride",
      "price": 5.2,
      "priceCurrency": "GBP"
    },
    {
      "type": "Offer",
      "identifier": "OX-JNR",
      "name": "Oxygen - Junior",
      "description": "Fitness Ride",
      "price": 4.2,
      "priceCurrency": "GBP",
      "ageRange": {
        "type": "QuantitativeValue",
        "minValue": 50
      }
    }
  ]
}

@petewalker
Copy link

This seems a little confusing? You’ve used ext:publicJuniorPrice to refer to a price available to over 50s in the example. Is it not better to use something like ext:publicConcessionPrice or similar?

Although, some activities could have multiple types of concession - but in that circumstance I guess you could just omit that property, or provide an array?

e.g. Students may get 10% off, over-50s get 20%

@nickevansuk
Copy link
Contributor Author

Great spot, sorry my example was inconsistent, have edited. Should have been "Junior" instead of "Senior". As you say, concessions are complex, so probably worth ignoring for the first iteration.

The idea here is to provide the most common demographics (adults and kids), with simplified and relevant pricing, in a consistent location, for activity finders focussed on those audiences. Perhaps "senior" pricing could come later e.g. for Age UK.

What do you think?

@civsiv
Copy link

civsiv commented May 24, 2019

It would also be good if the primary adult and junior offers could have consistent identifiers. Currently we have this enumeration in code:

const PROVIDER_ADULT_PRICE_ID_MAP = {
  [PROVIDERS.ACTIVELIFE]: 'NMADT',
  [PROVIDERS.ACTIVENEWHAM]: 'Adult non-member',
  [PROVIDERS.BRITISHCYCLING]: 'Offer', // British Cycling weirdness because they only have one offer
  [PROVIDERS.CLASSFINDER]: 'Single session',
  [PROVIDERS.CLASSFINDERPRIVATE]: 'Single session',
  [PROVIDERS.ENGLANDATHLETICS]: 'SINGLE',
  [PROVIDERS.ENGLANDNETBALL]: 'Full price cost',
  [PROVIDERS.EVERYONEACTIVE]: 'OX-AD',
  [PROVIDERS.FUSION]: 'STAND',
  [PROVIDERS.GOODGYM]: 'Offer', // Goodgym weirdness because they only have one offer
  [PROVIDERS.LEISUREWORLD]: 'CASADULT',
  [PROVIDERS.LTA]: 'SINGLE',
  [PROVIDERS.MILLERTECH]: 'Single session',
  [PROVIDERS.MILLERTECHPRIVATE]: 'Single session',
  [PROVIDERS.NCC]: 'STAND',
  [PROVIDERS.OPENSESSIONS]: 'Adult',
  [PROVIDERS.OURPARKS]: 'Offer', // we assign only one offer to Our Parks sessions
  [PROVIDERS.SALFORDLEISURE]: 'Adult non-member',
  [PROVIDERS.SIXTEENTEN]: 'STAND',
  [PROVIDERS.VISIONRCL]: 'NONADULT',
};

const PROVIDER_JUNIOR_PRICE_ID_MAP = {
  [PROVIDERS.ACTIVELIFE]: 'NMJNR',
  [PROVIDERS.BRITISHCYCLING]: 'Offer', // British Cycling weirdness because they only have one offer
  [PROVIDERS.CLASSFINDER]: 'Single session',
  [PROVIDERS.CLASSFINDERPRIVATE]: 'Single session',
  [PROVIDERS.ENGLANDNETBALL]: 'Full price cost',
  [PROVIDERS.EVERYONEACTIVE]: 'OX-JNR',
  [PROVIDERS.FUSION]: 'NONJNR',
  [PROVIDERS.LEISUREWORLD]: 'CASJUNIOR',
  [PROVIDERS.MILLERTECH]: 'Single session',
  [PROVIDERS.MILLERTECHPRIVATE]: 'Single session',
  [PROVIDERS.OPENSESSIONS]: 'Child',
  [PROVIDERS.OURPARKS]: 'Offer', // we assign only one offer to Our Parks sessions
  [PROVIDERS.VISIONRCL]: 'NONJUNIOR',
};

@civsiv
Copy link

civsiv commented Oct 31, 2019

Hi all, is there any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General discussion question, not yet a formal proposal
Projects
Development

No branches or pull requests

3 participants