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

Merge all gtin properties into one gtin property #1244

Open
jvandriel opened this issue Jul 6, 2016 · 26 comments

Comments

Projects
None yet
@jvandriel
Copy link

commented Jul 6, 2016

I'd like to see all gtin properties (gtin8, gtin12, gtin13, gtin14) merged into 1 property, gtin.

Reason being that I quite regularly encounter the 'wrong' property being specified for the amount of digits filled out. Which makes me wonder whether there's a real need for the different types of gtin properties. Wouldn't it be much easier for publishers and consumers alike if there's just one property and simply leave it up to the consumers to detect how many digits there are?

@mfhepp

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2016

Thanks for the suggestion, but to my knowledge, an item might have more than one GTIN type (at least GTIN 13 and GTIN 14), so I am not in favor of this proposal.

What we could do is create one super-property "gtin" of all those. A consuming client could then guess the type of GTIN from its length, and markup would be easier, too.

Martin


martin hepp http://www.heppnetz.de
mhepp@computer.org @mfhepp

On 06 Jul 2016, at 13:58, jvandriel notifications@github.com wrote:

I'd like to see all gtin properties (gtin8, gtin12, gtin13, gtin14) merged into 1 property, gtin.

Reason being that I quite regularly encounter the 'wrong' property being specified for the amount of digits filled out. Which makes me wonder whether there's a real need for the different types of gtin properties. Wouldn't be much easier for publishers and consumers alike if there just is one property and simply leave it up to the consumers to detect how many digits there are?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@jvandriel

This comment has been minimized.

Copy link
Author

commented Jul 6, 2016

"but to my knowledge, an item might have more than one GTIN type"

Thanks for pointing that out, I wasn't aware of this.

"What we could do is create one super-property "gtin" of all those."

That would work, so +1.

@jaygray0919

This comment has been minimized.

Copy link

commented Jul 6, 2016

Spot on @mfhepp . We also should ask GS1 to weigh in here. Different business sectors use different GTIN structures, such as Publishing v. Pick-Pack-Stock items. There are other GS1 issues such as bricks that also might enter this discussion. This is a complex area and should be informed by the folks doing the work.

@thadguidry

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2016

Martin is right about GTIN 13 and 14.

I have also run into a similar issue as @jvandriel on the consuming side in regards to just wanting to consume that one property instead of 4 where my app code handles the logic already.

👍 for a super property for "gtin" as Text

@RLRichardson

This comment has been minimized.

Copy link

commented Jul 6, 2016

Martin,

Given that GTINs are intended to uniquely identify products, an item should not have multiple GTIN types. I would be interested in understanding your use cases, which are most likely based on inappropriate or inaccurate usage of the identifier.

Rich Richardson | Vice President, Emerging Capabilities and Industries | GS1 US

@thadguidry

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2016

@RLRichardson For me, I think I have seen those mistakes, sometimes within the databases I work with. It usually involves padding over the Indicator Digit...which shouldn't be done. This begins to look like Mistake 1 that is mentioned on GS1 GTIN Info page 10 here

@jvandriel

This comment has been minimized.

Copy link
Author

commented Jul 7, 2016

"which are most likely based on inappropriate or inaccurate usage of the identifier."

That's an issue I definitely recognize and not only from sites I've worked on but also from marketplaces like Amazon, Ebay and Google shopping. And tackling it is quite problematic.

Do you know of a way how to / repository where one can check whether products have the correct identifier @RLRichardson?

Because if there is no such method / repository, how are websites/marketplaces supposed to be able to publish the right identifier / coalesce overlapping identifiers into the right one?

In these cases the only option I see sites have is to publish the multiple (gtin) identifiers with each product and let data consumers (with more extensive resources) sort it out.

@mfhepp

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2016

@RLRichardson I had the following use cases in mind:

  1. Two product variants for different national markets may have different GTINs.
  2. Packing variants for the same product will have different GTIN14s If I am not mistaken.

Now, I understand that in the GS1 terminology, a trade item should not have more than one GTIN, and that in the examples above, you have multiple distinct trade items that should not be conflated in the GS1 model.

However, the definition of a schema:Product and schema:Product model are broader that that of a trade item in GS1 terminology. Strictly speaking, a GS1 trade item is a subclass of schema:ProductModel (because schema:ProductModel does not share the full ontological commitment of GS1's definition).

schema:Product can also be used for unique items as well as placeholders for multiple variants of the same product. So it would not be per se invalid to attach both a GTIN8 and a GTIN13 to a schema:Product if it is available in two packaging variants, the smaller having the GTIN8 and the bigger having the GTIN13.

We are btw not in disagreement that having unique trade items as schema:Product entities is more useful for clients consuming the data. But schema:Product is used in many different industries and contexts and not in all of them the GS1 notion of a trade item is consensual.

@danbri

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2018

Let's do this! I'd like GS1 to take the lead in defining a general property http://schema.org/gtin

  • ideally as a superproperty of the existing gtin-properties (gtin8 etc).
  • suggest update to /isbn too if appropriate.
  • with appropriate text explaining the padding/variant issues

/cc @philarcher @mgh128

@danbri

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2018

On the issue discussed previously, can we work up some examples addressing the concerns @mfhepp enumerated? Even if they are corner cases or poor practice it would be good to have them covered clearly in documentation.

Q: Is it important to be able to figure out, for any given GTIN, whether it is a gtin12,13,14 or 8?

@mgh128

This comment has been minimized.

Copy link

commented Jan 5, 2018

In the GS1 web vocabulary at https://gs1.org/voc we already define a single property https://gs1.org/voc/gtin that expects the 14-digit representation of a GTIN.

According to https://www.gs1.org/docs/idkeys/GS1_GTIN_Executive_Summary.pdf the GTIN-8, GTIN-12 and GTIN-13 can all be represented in a consistent 14-digit format by left-padding with the appropriate number of '0' digits, i.e. by six, two and one digits of '0' respectively. Note that the left-padding does not result in a change of the final check-digit character that is calculated from the preceding digits (see https://www.gs1.org/services/check-digit-calculator ).

The corresponding RDF Turtle markup for https://gs1.org/voc/gtin is below:

https://gs1.org/voc/gtin
a rdf:Property, owl:DatatypeProperty, owl:FunctionalProperty ;
rdfs:comment "A Global Trade Item Number (GTIN) is the 14 digit GS1 Identification Key used to identify products. The key comprises a GS1 Company Prefix followed by an Item Reference Number and a Check Digit. See https://www.gs1.org/gtin for more details."@en ;
rdfs:domain https://gs1.org/voc/Product ;
rdfs:isDefinedBy https://gs1.org/voc/ ;
rdfs:label "GTIN"@en ;
rdfs:range xsd:string ;
skos:exactMatch http://schema.org/gtin14 ;
skos:closeMatch http://schema.org/gtin13 ;
skos:closeMatch http://schema.org/gtin12 ;
skos:closeMatch http://schema.org/gtin8 ;
http://www.w3.org/2003/06/sw-vocab-status/ns#term_status "testing" .

I note that @jaygray0919 mentions bricks. Within GS1, a 'brick' is the narrowest product classification within the Global Product Classification (GPC) framework, which is concerned with classification of products by their function, rather than the assignment of a unique GTIN identifier for a product. More info on GS1 GPC at https://www.gs1.org/gpc
In this sense, GPC plays a similar role within GS1 to UNSPSC in the broader community.

Within GS1, a product or trade item (which can also include a service) is expected to have a GTIN and to correspond to one GPC brick. Broader product categories are expressed within the GPC hierarchy ( segment > family > class > brick )

Within the GS1 web vocabulary at https://gs1.org/voc, we also define the following properties that relate to GPC bricks and product classification:

https://gs1.org/voc/gpcCategoryCode
a rdf:Property, owl:DatatypeProperty, owl:FunctionalProperty ;
rdfs:comment "8-digit code (GPC Brick Value) specifying a product category according to the GS1 Global Product Classification (GPC) standard. For more information see https://www.gs1.org/gpc"@en ;
rdfs:domain https://gs1.org/voc/Product ;
rdfs:isDefinedBy https://gs1.org/voc/ ;
rdfs:label "GPC Category Code"@en ;
rdfs:range xsd:string ;
http://www.w3.org/2003/06/sw-vocab-status/ns#term_status "testing" .

https://gs1.org/voc/gpcCategoryDescription
a rdf:Property, owl:DatatypeProperty, owl:FunctionalProperty ;
rdfs:comment "A description of the code specifying a product category according to the GS1 Global Product Classification (GPC) standard."@en ;
rdfs:domain https://gs1.org/voc/Product ;
rdfs:isDefinedBy https://gs1.org/voc/ ;
rdfs:label "GPC Category Description"@en ;
rdfs:range rdf:langString ;
http://www.w3.org/2003/06/sw-vocab-status/ns#term_status "testing" .

@philarcher

This comment has been minimized.

Copy link

commented Jan 5, 2018

Would it be possible (and correct) to define the schema's 4 gtin properties as sub properties of gs1:gtin (or, more likely, a new schema:gtin property). And, while we're at it, can we say that schema:isbn is also a sub property of gtin? I hoping we can be @mgh128 is the authority on this.

@ekgs1

This comment has been minimized.

Copy link

commented Jan 5, 2018

I would not make at schema:isbn a sub property of gtin. It is a different identification system.

@mgh128

This comment has been minimized.

Copy link

commented Jan 5, 2018

@danbri

The reason for the existence of gtin12 and gtin13 is largely historic in origin.
GS1 was created by the merger of the Uniform Code Council (UCC) and EAN International around 2005. ( see http://40.gs1.org/historic-timeline.php )

UCC oversaw the issue of Universal Product Code (UPC / UPC-A), which was the 12-digit product barcode used in North America. The UPC-A / UPC is now known as the GTIN-12.

EAN International oversaw the issue of EAN-13 product barcodes used in the rest of the world.
The EAN-13 is now known as the GTIN-13.

The 14-digit representation of GTIN was introduced as a way of unifying these within a single representation, as well as providing extra capacity via the indicator digit.

GTIN-8 identifiers are structured somewhat differently from GTIN-12, GTIN-13 and GTIN-14. because they are more compact, so they internally use a GS1-8 prefix instead of using the full GS1 Company Prefix that is used within the construction of GTIN-12, GTIN-13 and GTIN-14 identifiers.

Note that there also GS1 barcodes that are not globally unique. These include Restricted Circulation Numbers (RCNs) which are not considered to be GTIN-8, GTIN-12, GTIN-13. Further information about Restricted Circulation Numbers can be found in the GS1 General Specifications at https://www.gs1.org/barcodes-epcrfid-id-keys/gs1-general-specifications ( see section 1.4.1.2 )

Further information about GTIN can be found at https://www.gs1.org/gtin

@RichardWallis

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2018

Yes leave isbn as it is. In theory ISBN13 is compatible as a gtin13, however there are transformations required for ISBN10. Many bibliographic descriptions include both ISBN13 and ISBN10 in the isbn property. Making it a sub-property of gtin would make this not possible.

@mgh128

This comment has been minimized.

Copy link

commented Jan 5, 2018

I agree with @ekgs1 that ISBN is a separate identification system. Having said that, GS1 prefixes 978 and 979 are allocated to International ISBN Agency for books, with a portion of 979 sub-allocated to International ISMN Agency for music. In this way, an ISBN number can be encoded within an EAN-13, UPC-A or UPC-E barcode. See section 2.1.2.1.5 of the GS1 General Specifications.

@philarcher

This comment has been minimized.

Copy link

commented Jan 5, 2018

OK, forget I mentioned ISBNs, sorry. Can we (GS1) offer a solid definition of a gtin super property for schema.org? One that explains the 8, 12, 13 and 14 digit variants in a concise way that's suitable for the schema.org community?

@ekgs1

This comment has been minimized.

Copy link

commented Jan 11, 2018

@danbri

Here is a suggested definition for http://schema.org/gtin.

"The Global Trade Item Number (GTIN) is used by companies to uniquely identify its trade items. Trade items are products or services that are priced, ordered or invoiced at any point in the supply chain. The GTIN can be used to identify types of products at any packaging level (e.g., consumer unit, inner pack, case, pallet). There are four GTIN formats (GTIN-8, GTIN-12, GTIN-13 and GTIN-14). For applications that require a uniform 14-digit format, leading zeroes need to be added as filler digits as follows:

000000nnnnnnnn (GTIN-8)
00nnnnnnnnnnnn (GTIN-12)
0nnnnnnnnnnnnn (GTIN-13)

See https://www.gs1.org/gtin for more details . "

@danbri

This comment has been minimized.

Copy link
Contributor

commented Feb 17, 2018

Ok, so what are the steps here?

We will need to add a new property for '/gtin', does this new text replace the former definitions for the gtin8/12/13/14 definitions too? It doesn't exactly answer "which should I use?" yet...

@mgh128

This comment has been minimized.

Copy link

commented Feb 17, 2018

If we're happy with the updated definition that Eric @ekgs1 provided, I think we hope that a single new schema.org/gtin property would use that definition and that the existing gtin8, gtin12, gtin13 and gtin14 properties in schema.org would be deprecated or at least marked for imminent deprecation.

If you feel that the definition is still too ambiguous regarding whether or not to pad to 14 digits, we could perhaps change the last two sentence to read:

A Global Trade Item Number (GTIN) is the 14 digit GS1 Identification Key used to identify products. For printed barcodes appearing on products, you may also encounter 8-digit, 12-digit or 13-digit versions of GTIN. These should each be padded to the left with leading zeros to reach a total of 14 digits as follows:

000000nnnnnnnn (GTIN-8)
00nnnnnnnnnnnn (GTIN-12)
0nnnnnnnnnnnnn (GTIN-13)

@danbri

This comment has been minimized.

Copy link
Contributor

commented Feb 21, 2019

can we tell sites "hey just remove the number from the property name", or are we requiring left padding? imagine being in the team making the change...

does lack of left padding make it ambiguous? why can't data-consuming apps do the left padding? it feels kinda y2k, cobol etc to require it...

also
looks like nuance on whether new property replaces or generalizes.
if product x has a gtinN of y, does it have a new gtin property of y too automatically? or are we pickier and require it to be cleaner, properly padded etc?

@mgh128

This comment has been minimized.

Copy link

commented Feb 21, 2019

I've just been discussing with @philarcher . In the GS1 Web vocabulary developed a few years ago, we have a single property https://gs1.org/voc/gtin - though that currently expects a GTIN always padded to 14 digits.

However, in our more recent GS1 Digital Link standard, we're not requiring padding to 14 digits when the GTIN appears within the URI path information.

We think it's probably best if schema.org collapse the four current properties to a single schema.org/gtin property and don't require padding to 14 digits. We can then remove the restriction about padding to 14 digits from our term https://gs1.org/voc/gtin , so that both terms are perfectly aligned.

The historic reason for padding to 14 digits is that when GTINs are encoded in higher capacity barcodes together with other GS1 application identifiers, left-padding to 14 digits meant that it could accommodate all of GTIN-8, GTIN-12, GTIN-13, GTIN-14 within a single fixed-length numeric field.

However, as you note, that's not really an issue for applications that consume the Linked Data, since they can easily add or remove any padding, if required.

In answer to your last question, in our proposal that neither a single schema:gtin property nor an updated gs1:gtin property would require left-padding to 14 digits, then it's true that if product x has a schema:gtinN of y, then it will in future have a schema:gtin of y, where both values of y are identical.

Of course, y should be a valid GTIN, which means that it should be an all-numeric string of either 8, 12, 13 or 14 digits. It should also have a valid GS1 check digit and there are other rules about what constitutes a valid GTIN. Further information on this can be found in the GS1 General Specifications.

For completeness, I should also point out that there are values that look like they might be a GTIN but are actually a Restricted Circulation Number (RCN), which do not have global uniqueness. For example, some retailers might use an RCN for some of their own-brand products that are not sold by other retailers. Further information on RCNs can be found in the GS1 General Specifications. A Restricted Circulation Number SHALL NOT be used as the value of a gs1:gtin property - nor should it be used as the value of a schema:gtin property

Our preference is that products are identified by a globally unique GTIN and we'd welcome alignment of a single property in each vocabulary ( schema:gtin and gs1:gtin ), both expecting an unpadded numeric string of 8, 12, 13, 14 digits for a genuine valid GTIN value. We would also welcome deprecation of existing properties schema:gtin8, schema:gtin12, schema:gtin13 and schema:gtin14 as soon as possible after schema:gtin is introduced.

@MichaelAndrews-RM

This comment has been minimized.

Copy link

commented May 22, 2019

In theory ISBN13 is compatible as a gtin13, however there are transformations required for ISBN10. Many bibliographic descriptions include both ISBN13 and ISBN10 in the isbn property.

I mentioned ISBNs, sorry. Can we (GS1) offer a solid definition of a gtin super property for schema.org?

What are users wanting to enter ISBN numbers expected to do? Especially if they have a 10 digit number?

@mgh128

This comment has been minimized.

Copy link

commented May 22, 2019

An ISBN-10 can be converted to an ISBN-13 by prefixing with '978' and recalculating the final check digit, either using the details provided at https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-13_check_digit_calculation or https://isbn-information.com/check-digit-for-the-13-digit-isbn.html or using the GS1 Check Digit calculation (see https://www.gs1.org/services/check-digit-calculator ).
The resulting ISBN-13 can be used like a GTIN-13.
To convert an ISBN-13 or GTIN-13 to a GTIN in 14-digit representation, prepend it with a single '0' digit.

As a worked example, consider the following ISBN-10: 0596000480
Step 1: remove final check digit (since it needs to be recalculated) --> 059600048
Step 2: prepend with '978' --> 978059600048
Step 3: recalculate the check digit (e.g. paste result from step 2 into https://www.gs1.org/services/check-digit-calculator ) --> 9780596000486

An ISBN-13 is accommodated within the GTIN-13 number space (the '978' acts like a GS1 Prefix reserved specifically for accommodating ISBN values within GTIN).

Any GTIN-13 can be converted to a 14-digit GTIN representation by prepending with a single '0' digit and no need to recalculate the check digit.

Result: Equivalent GTIN in 14-digit representation --> 09780596000486

danbri added a commit that referenced this issue Jul 2, 2019

danbri added a commit that referenced this issue Jul 2, 2019

danbri added a commit that referenced this issue Jul 3, 2019

Improved text and definition of /gs1 with help from GS1
(thanks @mgh128, @philarcher). Added support for Digital Link URIs/URLs.
We now have an expected type also of URL, to handle that case. #1244
@philarcher

This comment has been minimized.

Copy link

commented Jul 9, 2019

Thanks very much for doing this, Dan.

I have consulted with senior colleagues and offer a slightly different text. The main motivation is that the existing text rather gives the impression that any number that is of the right length and that has the relevant check digit is a GTIN. That's not the reality since they are structured to include the GS1 office that issued the prefix, the licensee of that prefix, and the actual identifier issued by the licensee (i.e. a typical global identifier with a hierarchy to guarantee uniqueness). With that in mind, how's this for an alternative definition:

Global Trade Item Number (GTIN). A GTIN is the GS1 identification key used to identify trade items. A trade item is any item (product or service) upon which there is a need to retrieve predefined information and that may be priced, or ordered, or invoiced at any point in any supply chain. The GTIN identification scheme typically comprises a company prefix assigned by GS1, an item reference assigned by the licensee of the GS1 company prefix and a check digit. The [[gtin]] property generalizes the earlier [[gtin8]], [[gtin12]], [[gtin13]] and [[gtin14]] properties. The GS1 Digital Link specifications express GTINs as URLs. See also GS1's GTIN Summary and Wikipedia for more details. Left-padding of the gtin values is not required or encouraged.

@danbri

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

Thanks @philarcher, we can move the text in that direction. The inline definition of "trade item" is not quite our house style, it feels like a mini ontology inside the definition, but I agree we need to be clear that having the right shape is not sufficient for something to be a GTIN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.