How to describe eligible customers
In the Offering schema, we proposed a field to describe which customers that are eligible for an offering. We want to represent, for instance, that some lift tickets cost less for children under 10 years old, or that students have a discount to buy concert tickets.
The current structure of this field is show below:
"eligibleCustomerType": {
"allOf": [
{
"$ref": "https://www.alpinebits.org/schemas/general/BasicProperties"
}
],
"properties": {
"minAge": {
"type": "number"
},
"maxAge": {
"type": "number"
},
"isStudent": {
"type": "boolean"
}
}
}
A point was raised in our meeting on 16/05/2019 that these three properties might not be enough. Companies may use additional customers characteristics to define special offerings, such as being resident of a particular region or having bought a mobility card.
With that in mind, the question that followed was: does it make sense to have very specific properties to describe eligible customers if we are still going to need to use "opaque" textual descriptions to do so?
So instead of having objects like this:
{
"eligibleCustomerType": {
"name": {
"en": "Students of the Free University of Bozen-Bolzano under 27 years old"
},
"maxAge": 27,
"isStudent": true
}
}
we would simply have this:
{
"eligibleCustomerType": {
"en": "Students of the Free University of Bozen-Bolzano under 27 years old"
}
}