Skip to content

Conversation

@kevinbouti
Copy link
Contributor

Add Product Role examples (UNCL codes & Digital Twin) for issue #4658

Add Product Role examples (UNCL codes & Digital Twin) for issue schemaorg#4658
@kevinbouti
Copy link
Contributor Author

Hi @MatthiasWiesmann, here is the example PR as requested. Ready for review!

@fthobe
Copy link
Contributor

fthobe commented Dec 27, 2025

@kevinbouti I think this goes into order / cart and not into product. It's a document definition standard and not a product definition standard.

Removed the 'TYPES' line and updated 'inDefinedTermSet' to include a structured object with name and URL.
@kevinbouti
Copy link
Contributor Author

@fthobe You are technically correct that UNCL 1001 is a document code standard. However, in the context of Digital Product Passports (DPP) and circular economy, we often need to define the intended role of a product (e.g., is this item a "Spare Part" or a "Consumable"?) at the product definition level, long before it enters a cart or order.

To address your concern, I have updated the examples to:

Use DefinedTerm with a generic name (e.g., "Consumable") as the primary value.

Treat UNCL 1001 only as a reference mapping inside inDefinedTermSet, rather than implying the product is a document.

Added non-EDI examples like "Digital Twin" and "Software Component" to show broader usage.

This strikes a balance between semantic strictness and real-world B2B needs

@fthobe
Copy link
Contributor

fthobe commented Dec 27, 2025

I left a longer comment on the issue, I do absolutely believe replicating standard processes in schema is great, but I also believe an additional planing effort should be made to avoid fragmenting document types in a way that does not adhere to the existing implementation of the same data elsewhere.

@kevinbouti
Copy link
Contributor Author

Thanks @fthobe. I've read your detailed feedback on the Issue.

I completely agree that we must avoid fragmenting document standards. I will reply to the architectural points on the Issue thread to keep this PR focused.

However, just to clarify the immediate DPP (Digital Product Passport) necessity driving this example: in a Circular Economy context (like the EU Ecodesign for Sustainable Products Regulation), the "role" of an item (e.g., Spare Part, Raw Material, Recycled Component) is an intrinsic property of the physical object itself.

A repairer or recycler scanning a QR code years after the initial sale needs to know this role immediately, without having access to the original Order or Invoice context. That is why defining it at the Product level (the persistent data carrier) is critical for us, rather than relying solely on transactional document types.

I'll jump over to the Issue now to continue the discussion on alignment.

"@type": "Product",
"name": "Laptop Battery Replacement",
"description": "A consumable battery for Model X",
"hasProductRole": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is property is not defined (yet) and this should cause the ruby tests to fail.
Make sure to build the site with

./software/util/buildsite.py -c -a -r --rubytests

Copy link
Contributor

@MatthiasWiesmann MatthiasWiesmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot add examples before the schema changes.

@kevinbouti
Copy link
Contributor Author

hanks @MatthiasWiesmann for catching that!
You're absolutely right - I jumped ahead.

I need to first:

  1. Submit a schema change PR to define hasProductRole property
  2. Wait for approval and merge
  3. Then come back with example PR

I'll hold this PR and start with the schema property definition first.

Updated JSON-LD examples to include additional context and structured data for products.
Copy link
Contributor Author

@kevinbouti kevinbouti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feat(#4658): Correct JSON-LD examples for DPP compliance

  • Replace hasProductRole with schema.org-compliant category/additionalProperty
  • Consolidate @context definition and remove duplicates
  • Add unique @id identifiers for RDF compatibility
  • Change CRM Module type to SoftwareApplication
  • Preserve UN/CEFACT reference (code 711)
  • Ensure multi-format serialization ready

Tests: JSON-LD valid, DPP compliant, RDF convertible

"category": "Consumable",
"additionalProperty": [
{
"@type": "PropertyValue",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what this should express.
UN/CEFACT Code is not a good name (key), that's a whole standard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the guidance. You are right, using "UN/CEFACT Code" as the name was semantically weak.

I have updated the example to use the standard PropertyValue pattern correctly:

Used propertyID to explicitly link to the UN/CEFACT standard URI (machine-readable).

Changed name to a generic "Product Type Code".

Kept the value "711" (Consumable).

Copy link
Contributor Author

@kevinbouti kevinbouti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have updated the example to use the standard PropertyValue pattern correctly:

Renamed property: Changed name to a generic "Product Type Code" instead of the standard's name.

Added propertyID: Explicitly linked to the UN/CEFACT standard URI (https://service.unece.org/trade/untdid/d19b/tred/tred1001.htm) to make it machine-readable.

Added examples for issue 4658 including product and software application details in various formats.
Copy link
Contributor Author

@kevinbouti kevinbouti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mise à jour

"@type": "PropertyValue",
"propertyID": "GTIN",
"value": "5901234123457"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this into the gtin property.

Updated the schema markup for product details to use 'gtin' directly instead of an identifier div. Adjusted the structure for consistency across various product types.
Copy link
Contributor Author

@kevinbouti kevinbouti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mise à jour

Removed redundant 'Software Component' category and additional property from examples.
Copy link
Contributor Author

@kevinbouti kevinbouti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update

@MatthiasWiesmann MatthiasWiesmann merged commit f0c912a into schemaorg:main Dec 30, 2025
1 check passed
kevinbouti added a commit to kevinbouti/verisav-public-docs that referenced this pull request Dec 30, 2025
- Exemples pour Product et SoftwareApplication
- Formats: PRE-MARKUP, MICRODATA, RDFA, JSON-LD
- Contribution officielle à Schema.org Community Group
- Référence: schemaorg/schemaorg#4663
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

Successfully merging this pull request may close these issues.

3 participants