GTIN is strongly recommended in the structured data but not mandatory.
From ldJson.js
/**
* Extracts the GTIN (Global Trade Item Number) from a product's attributes.
* Checks for GTIN, UPC, or EAN attributes as defined in the Catalog.
*
* @param {Object} product - The product object containing attributes
* @returns {string} The GTIN value if found, empty string otherwise
*/
function getGTIN(product) {
return product?.attributes?.find(attr => attr.name === 'gtin')?.value
|| product?.attributes?.find(attr => attr.name === 'upc')?.value
|| product?.attributes?.find(attr => attr.name === 'ean')?.value
|| product?.attributes?.find(attr => attr.name === 'isbn')?.value
|| '';
}You can customize this function to use your own logic logic to retrieve the GTIN code, even from external sources, during the rendering process.
The main customization point to define markup structure is the templates folder Those files follow the Handlebars syntax and the referenced variables can be defined in render.js