Email Markup Tester - json

Google's email Markup Tester always fails with the error
"INVALID_OBJECT: orderStatus,http://schema.org/OrderStatusType"
I have tried with all there samples located on this page:
https://developers.google.com/gmail/markup/reference/order
Do we think its just a question of waiting for them to fix it?
example json:
<html>
<body>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Order",
"merchant": {
"#type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "29.99",
"acceptedOffer": {
"#type": "Offer",
"itemOffered": {
"#type": "Product",
"name": "Google Chromecast"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"#type": "QuantitativeValue",
"value": "1"
}
},
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"
}
</script>
</body>
</html>

I had the same issue and fixed validation by adding:
"orderStatus" : "OrderDelivered",
I noticed using the following didn't work (even though it is how the Google Example in the documentation has it ):
"orderStatus": "http://schema.org/OrderStatus/OrderDelivered",

The problem is that Google is insisting that you provide a valid statusOrder key. The the following validates:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Order",
"merchant": {
"#type": "Organization",
"name": "Amazon.com"
},
"orderNumber": "123-4567890-1234567",
"priceCurrency": "USD",
"price": "29.99",
"acceptedOffer": {
"#type": "Offer",
"itemOffered": {
"#type": "Product",
"name": "Google Chromecast"
},
"price": "29.99",
"priceCurrency": "USD",
"eligibleQuantity": {
"#type": "QuantitativeValue",
"value": "1"
}
},
"orderStatus" : "OrderDelivered",
"url": "https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"
}
</script>

Related

How can i get the current URL (its dynamic, because of a blog) to a Schema.org File?

I want to create a Schema.org for our blog. Unfortunately I don't have a placeholder for the corresponding URL. Can someone help me?
<script type="application/ld+json">
{
"#context": "https://schema.org/",
"#type": "BreadcrumbList",
"itemListElement": [{
"#type": "ListItem",
"position": 1,
"name": "netpulse.ch",
"item": "https://www.netpulse.ch"
},{
"#type": "ListItem",
"position": 2,
"name": "Online Marketing News",
"item": "https://www.netpulse.ch/blog/"
},{
"#type": "ListItem",
"position": 3,
"name": "{{blog.title}}",
"item": "{{InitialPostAlias}}"
}]
}
</script>

Does Google regard #type": "AggregateOffer" and "#type": "Offer" as duplication?

A site is flagging up (Google Search Console) Unparsable structured data- Duplicate unique property.
It is highlighting #type": "AggregateOffer" but there is only one instance of #type": "AggregateOffer" on any page.
As well as #type": "AggregateOffer" there is "#type": "Offer" on each affected page.
Does Google regard #type": "AggregateOffer" and "#type": "Offer" as duplication?
"offers": {
"#type": "Offer",
"seller": {
"#type": "Organization",
"name": "Not real name"
},
"#type": "AggregateOffer",
"highPrice":714.32,
"lowPrice":449.12,
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock"
I have reworked the above code and my schema now validates:
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "Product",
"productID": "47",
"url": "https://www.webeg.uk/cpscpsprep/acatalog/Engagement-Ring-47.html",
"image": "s-Engagement.jpg",
"description":"A stunning diamond ring for the future bride....",
"itemCondition":"New",
"name": "Engagement Ring",
"offers": {
"#type": "AggregateOffer",
"highPrice":410.00,
"lowPrice":390.00,
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock",
"seller": {
"#type": "Organization",
"name": "Sample Company"
}
}
}
</script>
https://validator.schema.org/#url=https%3A%2F%2Fwww.webeg.uk%2Fcpscpsprep%2Facatalog%2FEngagement-Ring-47.html
So it seems the answer is that Google does not like #type": "AggregateOffer" and "#type": "Offer" in the same schema snippet!
Thank you.

Structured data not working right with CSS selectors (adding slashes in links and other problems). How do I fix this?

I work for a website with 10000+ products and I decided to input the structured data dynamically via CSS selectors in GTM because doing it manually would be too time consuming. It all worked fine, but then I ran into some problems.
Firstly, the structured data added slashes to links that lead to a 404, like so:
"url": "https:\/\/example.com\/shop\/category\/subcategory\/product"
Secondly, the prices in my country are separated with a comma, and not a dot, so the rich results test returns an error. Is there a way to change this?
Full schema here.
<script type="application/ld+json"> {
"#context": "https://www.schema.org",
"#type": "product",
"sku": "{{sku}}",
"image": ["{{carousel-item active}}"],
"name": "{{product-title}}",
"description": "{{product-description}}",
"category": "{{category}}",
"brand": {
"#type": "brand",
"name": "BRAND",
"logo": "https://example.com/images/logo.png"
},
"offers": {
"#type": "Offer",
"itemCondition": "http://schema.org/NewCondition",
"availability": "http://schema.org/InStock",
"price": "{{price}}",
"priceValidUntil": "2021-11-11",
"priceCurrency": "HRK",
"url": "{{Page URL}}",
"shippingDetails": {
"#type": "OfferShippingDetails",
"shippingRate": {
"#type": "MonetaryAmount",
"value": "25",
"currency": "HRK"
},
"shippingDestination": {
"#type": "DefinedRegion",
"addressCountry": "HR"
},
"deliveryTime": {
"#type": "ShippingDeliveryTime",
"transitTime": {
"#type": "QuantitativeValue",
"minValue": "3",
"maxValue": "5"
},
"cutOffTime": "17:00-08:00",
"businessDays": {
"#type": "OpeningHoursSpecification",
"dayOfWeek": [
"https://schema.org/Monday",
"https://schema.org/Tuesday",
"https://schema.org/Wednesday",
"https://schema.org/Thursday",
"https://schema.org/Friday" ]
}
}
}
}
}
}
</script>
I am very new to this, so please be gentle.
P.S. All other parts of schema work fine.

How can I fix the JSON code error in the attached picture from the code below?

JSON-LD markup generated by Google Structured Data Markup Helper.
error description in image.
here
here is my json
<script type= "application/ld+json">
{
"#context" : "http://schema.org",
"#type" : "Article",
"headline" : "7 Ways To .........",
"author" : {
"#type" : "Person",
"name" : "xxxxxxxxx",
},
"datePublished" : "2017-06-22T08:50",
"image" : {
"#type": "imageObject",
"url":"xxxxx",
},
"articleSection" : "Use one of three methods to find the value of the business–cash flow, market or assets. Then boost business value quickly.",
"url" : "xxxxx",
"publisher" : {
"#type" : "Organization",
"name" : "xxxxxxxxxx",
"logo": {
"#type": "imageObject",
"url": "xxxxxx",
}
},
}</script>
several time extra comma in end of the value.
valid JSON below
{
"#context": "http://schema.org",
"#type": "Article",
"headline": "7 Ways To .........",
"author": {
"#type": "Person",
"name": "xxxxxxxxx"
},
"datePublished": "2017-06-22T08:50",
"image": {
"#type": "imageObject",
"url": "xxxxx"
},
"articleSection": "Use one of three methods to find the value of the business–cash flow, market or assets. Then boost business value quickly.",
"url": "xxxxx",
"publisher": {
"#type": "Organization",
"name": "xxxxxxxxxx",
"logo": {
"#type": "imageObject",
"url": "xxxxxx"
}
}
}

Multiple JSON-LD tag groups in one page

Can I use multiple JSON-LD groups (using Schema.org) in the same page?
If I can't, how to combine them together? I'm not so familiar with the syntax.
Group 1:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "LocalBusiness",
"address": {
"#type": "PostalAddress",
"streetAddress": "3102 Highway 98",
"addressRegion": "FL",
"addressLocality": "Mexico Beach",
"postalCode": "45252",
"addressCountry": "US",
},
"geo": {
"#type": "GeoCoordinates",
"latitude": "40.75",
"longitude": "73.98"
},
"name": "Beachwalk Beachwear & Giftware",
"telephone": "850-648-4200",
"email": "admin#example.com",
"faxNumber": "860-562-4250",
}
</script>
Group 2:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Organization",
"url": "http://example.com",
"name": "My Domain Title",
"logo": "http://example.com/wp-content/uploads/2015/08/abc.jpg",
"contactPoint": [
{
"#type": "ContactPoint",
"telephone": "0192-39192130",
"contactType": "customer service"
},
{
"#type": "ContactPoint",
"telephone": "0182-239120398",
"contactType": "customer service"
}
],
"sameAs": [
"http://facebook.com/myfbaccount",
"http://twitter.com/mytwitteraccount"
]
}
</script>
You can either have multiple script blocks on your page or combine it in a single block. The easiest way to combine them into a single block is to use the #graph keyword as follows:
<script type="application/ld+json">
{
"#graph": [
{ ... your first JSON-LD block ... },
{ ... your second JSON-LD block ... }
]
}
</script>
According to the spec (https://www.w3.org/TR/json-ld/#h3_advanced-context-usage) the usage of several contexts is possible with a simple list of contexts:
[
{
"#context": "http://example.org/contexts/person.jsonld",
"name": "Manu Sporny",
"homepage": "http://manu.sporny.org/",
"depiction": "http://twitter.com/account/profile_image/manusporny"
},
{
"#context": "http://example.org/contexts/place.jsonld",
"name": "The Empire State Building",
"description": "The Empire State Building is a 102-story landmark in New York City.",
"geo": {
"latitude": "40.75",
"longitude": "73.98"
}
}
]