"@type": "ProductSpecification",
"name": "xxxx",
"productSpecCharacteristic": [
{
"name": "Serial Number",
"valueType": "string",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1,
"productSpecCharacteristicValue": [],
},
{
"name": "Low Latency",
"valueType": "boolean",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 0,
"productSpecCharacteristicValue": [],
},
{
"name": "Colour",
"valueType": "string",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1,
"productSpecCharacteristicValue": [
{
"value": "blue"
},
{
"value": "white"
}
]
}
]
}
Original Message:
Sent: Aug 23, 2024 06:43
From: Vance Shipley
Subject: ProductCharacteristic without Characteristicvalue
Are you thinking characteristicValueSpecification is a mandatory attribute?
------------------------------
Vance Shipley
SigScale
Original Message:
Sent: Aug 23, 2024 06:16
From: Matthieu Hattab
Subject: ProductCharacteristic without Characteristicvalue
it seems my question was not clear. Sorry for that.
I don't want TMF620 (or any backend APIs) to have an opinion on how the product characteristics are displayed (html tag, radio button etc). That is not its job.
The challenge is how TMF620 represents the 3 types of product characteristics in the payload:
- a char with an enum list of values (that's easy, all examples of char in TMF620 user guide have a predefined list of char values) => example: colour
- a char without value (no example in TMF620 user guide) => example: Low Latency
- a char with a free text field value (no example in TMF620 user guide) => example: Serial Number
@Bostjan Keber, do you have payload examples from 620 or (maybe 760) with characteristics similar to my low latency and serial number?
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
Original Message:
Sent: Aug 23, 2024 05:03
From: Vance Shipley
Subject: ProductCharacteristic without Characteristicvalue
@Matthieu Hattab wrote:
> With the above payload, it's not that easy for the product configurator to know what to show to the client UI.
All of the information used to validate the value may be used to prompt the user, it's a data model.
The regular expression can define precisely what to prompt the user for. In fact, you can use it directly in a pattern attribute of an HTML <input> tag.
I did make an error though, the valueType should be string if regex is used.
For the boolean you could use either checkbox or radio button <input> type.
For the characteristicValueSpecification enumerations use a radio button <input> type.
You could also put the description in a tooltip!
The expressivity and function lines up quite well.
------------------------------
Vance Shipley
SigScale
Original Message:
Sent: Aug 23, 2024 03:43
From: Matthieu Hattab
Subject: ProductCharacteristic without Characteristicvalue
Hello Vance,
Thanks for your reply.
Unfortunately, the question is not how to validate the length of the serial number. it's about the characteristicValueSpecification
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
Original Message:
Sent: Aug 23, 2024 01:08
From: Vance Shipley
Subject: ProductCharacteristic without Characteristicvalue
The serial number is ten digits (0-9):
{
"name": "Serial Number",
"valueType": "integer",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1
"regex": "^[0-9]{10}$"
},
------------------------------
Vance Shipley
SigScale
Original Message:
Sent: Aug 22, 2024 10:52
From: Matthieu Hattab
Subject: ProductCharacteristic without Characteristicvalue
Hi,
Our Prodspec has 3 productSpecCharacteristic: "serial number", "Low Latency" and "colour"
- "serial number" requires a
charvaluethat customer must type on their GUI - "low Latency" has no value. the is
productSpecCharacteristic selected or not - "colour" requires a
charvaluethat customer must pick (from a list) on their GUI.
how do I represent these productSpecCharacteristicthe TMF620 API payload? The 3rd one is easy.
Is this correct:
{
{
"@type": "ProductSpecification",
"name": "xxxx",
"productSpecCharacteristic": [
{
"name": "Serial Number",
"valueType": "number",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1
},
{
"name": "Low Latency",
"valueType": "boolean",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 0
},
{
"name": "Colour",
"valueType": "string",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1,
"characteristicValueSpecification": [
{
"valueType": "string",
"value": "blue"
},
{
"valueType": "string",
"value": "white"
}
]
}
]
}
With the above payload, it's not that easy for the product configurator to know what to show to the client UI.
- if there is an array of
characteristicValueSpecification show the list of charvalue. this works fine for the colour - if there is no array of
characteristicValueSpecification and valueType= "number" or "string", show an empty charvalue. This could work for the Serial Number - if there is no array of
characteristicValueSpecification and valueType= "boolean" don't show charvalue. This could work for the Low Latency
I got a suggestion to create a dummy characteristicValueSpecification for the serial number:
{
"name": "Serial Number",
"valueType": "number",
"configurable": true,
"maxCardinality": 1,
"minCardinality": 1,
"characteristicValueSpecification": [
{
"valueType": "number",
"value": ""
}
]
}
Note: I check the TMF620 doc but I think all examples are for the simple case of an enumeration of characteristicValue
Any API compliant and conformant suggestion?
Cheers,
------------------------------
Kind regards,
Matthieu Hattab
Lyse Platform
------------------------------