I'm assuming this has something to do with the validation tool being an early release. The RSVP action isn't validating well. The markup below also isn't showing in gmail, and I'm at a loss as to why.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="application/ld+json">
{
"#context": "schema.org",
"#type": "Event",
"name": "3pm April 21st",
"startDate": "2013-05-05T15:00:00",
"endDate": "2013-05-05T16:00:00",
"location": {
"#type": "Place",
"address": {
"#type": "PostalAddress",
"name": "XXXX",
"streetAddress": "999 West Adams",
"addressLocality": "Chicago",
"addressRegion": "IL",
"postalCode": "60607",
"addressCountry": "USA"
}
},
"action": [
{
"#type": "RsvpAction",
"handler": {
"#type": "HttpActionHandler",
"url": "http://foobar.net/1"
},
"attendance": "http://schema.org/RsvpAttendance/Yes"
},
{
"#type": "RsvpAction",
"handler": {
"#type": "HttpActionHandler",
"url": "http://foobar.net/2"
},
"attendance": "http://schema.org/RsvpAttendance/No"
},
{
"#type": "RsvpAction",
"handler": {
"#type": "HttpActionHandler",
"url": "http://foobar.net/3"
},
"attendance": "http://schema.org/RsvpAttendance/Maybe"
}
]
}
</script><img alt="Open_tracker" src="http://localhost:3000/invitations/14157/open_tracker"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
</div>
</body>
</html>
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<script type="application/ld+json">
5
{
6
"#context": "schema.org",
7
"#type": "Event",
8
"name": "3pm April 21st",
9
"startDate": "2013-05-05T15:00:00",
10
"endDate": "2013-05-05T16:00:00",
11
"location": {
12
"#type": "Place",
13
"address": {
14
"#type": "PostalAddress",
15
"name": "XXX",
16
"streetAddress": "999 West Adams",
17
"addressLocality": "Chicago",
18
"addressRegion": "IL",
19
"postalCode": "60607",
20
"addressCountry": "USA"
21
}
22
},
23
"action": [
24
{
25
"#type": "RsvpAction",
26
"handler": {
27
"#type": "HttpActionHandler",
28
"url": "http://foobar.net/1"
29
},
30
"attendance": "http://schema.org/RsvpAttendance/Yes"
31
},
32
{
Extracted structured data
Item1
Type:
RsvpAction
Unknown type RsvpAction
Properties:
attendance
http://schema.org/RsvpAttendance/No
Unknown property http://schema.org/attendance
The property attendance cannot be used with the RsvpAction type
handler
Item3
Unknown property http://schema.org/handler
The property handler cannot be used with the RsvpAction type
Item2
Type:
Place
Properties:
address
Item9
Item3
Type:
HttpActionHandler
Unknown type HttpActionHandler
Properties:
url
http://foobar.net/2
Item4
Type:
HttpActionHandler
Unknown type HttpActionHandler
Properties:
url
http://foobar.net/3
Item5
Type:
HttpActionHandler
Unknown type HttpActionHandler
Properties:
url
http://foobar.net/1
Item6
Type:
Event
Properties:
startDate
2013-05-05T15:00:00
Not a valid DateTime value
Not a valid Date value
endDate
2013-05-05T16:00:00
Not a valid DateTime value
Not a valid Date value
name
3pm April 21st
location
Item2
action
Item8
Item1
Item7
Item8
Item1
Item7
Item8
Item1
Item7
The property action cannot be used with the Event type
The property action cannot be used with the Event type
The property action cannot be used with the Event type
Item7
Type:
RsvpAction
Unknown type RsvpAction
Properties:
attendance
http://schema.org/RsvpAttendance/Maybe
Unknown property http://schema.org/attendance
The property attendance cannot be used with the RsvpAction type
handler
Item4
Unknown property http://schema.org/handler
The property handler cannot be used with the RsvpAction type
Item8
Type:
RsvpAction
Unknown type RsvpAction
Properties:
attendance
http://schema.org/RsvpAttendance/Yes
Unknown property http://schema.org/attendance
The property attendance cannot be used with the RsvpAction type
handler
Item5
Unknown property http://schema.org/handler
The property handler cannot be used with the RsvpAction type
The validation tool in the docs is in alpha and it doesn't support all new types yet. Besides, RSVP and Review actions are not currently supported by Gmail, as reported in the reference guide: https://developers.google.com/gmail/schemas/reference/rsvp-action
Related
I have recently add the json data to an email for show the highlight section in the email client for a train reservation but in the email there are also a advertising section for a care hire company and it's show this in the highlight too.
Is there a way to disable the RentalCar type in the email or to indicate to indicate to the client to ignoring a specific section of the html?
JSON-LD example
{
"reservationNumber": "XXXXX",
"reservationFor": {
"trainCompany": { "name": "Company", "#type": "Organization" },
"departureStation": { "name": "Departure station", "#type": "TrainStation" },
"arrivalStation": {
"name": "Arrival station",
"#type": "TrainStation"
},
"arrivalTime": "2018-08-15T12:47:00",
"#type": "TrainTrip"
},
"price": "10.00",
"reservationStatus": "http://schema.org/ReservationConfirmed",
"checkinUrl": "https://checkin-url.com/uk-en",
"modifyReservationUrl": "https://checkin-url.com/uk-en",
"#content": "http://schema.org",
"#type": "TrainReservation"}
Thanks
Damien
I am new to this and I am trying to provide a service to my tennis players where they can go on website, fill up a form for reserving the court. The form will send an email with time and place when they want to play. Upon confirmation, that should update the calendar. I tried various scenarios provided, but it did not work. I am not sure what am I missing. I just send en email to myself as follows:
<html>
<body>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "IO12345",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationFor": {
"#type": "Event",
"name": "Google I/O 2013",
"startDate": "2017-08-30T08:30:00-08:00",
"location": {
"#type": "Place",
"name": "Moscone Center",
"address": {
"#type": "PostalAddress",
"streetAddress": "800 Howard St.",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94103",
"addressCountry": "US"
}
}
}
}
</script>
<p>
Dear John, thanks for booking your Google I/O ticket with us.
</p>
<p>
BOOKING DETAILS<br/>
Reservation number: IO12345<br/>
Order for: John Smith<br/>
Event: Google I/O 2013<br/>
Start time: May 15th 2013 8:00am PST<br/>
Venue: Moscone Center, 800 Howard St., San Francisco, CA 94103<br/>
</p>
</body>
</html>
but I see it just a text as above.
thanks in advance,
Hagop
You are missing a property : reservationStatus that is required. I've used the Basic event reminder without a ticket JSON-LD:
<html>
<head>
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationFor": {
"#type": "Event",
"name": "Foo Fighters Concert",
"startDate": "2017-09-06T11:30:00-12:30",
"location": {
"#type": "Place",
"name": "AT&T Park",
"address": {
"#type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
}
}
</script>
</head>
<body>
<p>
An event was reserved.
</p>
</body>
</html>
Here is the result:
I've tried your code and added the reservationStatus and it worked. You can test your schemas using Email Markup Tester.
Hope this helps.
I have an event reservation markup that works. I'm now trying to add a ViewAction but I'm getting a Modify Reservations CTA instead of View Tickets as shown on this page:
https://developers.google.com/gmail/markup/highlights#ticketed_event_reservation
The Modify Reservations CTA appears to be associated with Hotel Reservations, so I'm not sure why this is showing up for my event reservation type. I know the action.name doesn't change the CTA text but it's there to follow the code.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "123456",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "FIRSTNAME LASTNAME"
},
"reservationFor": {
"#type": "Event",
"name": "Michelle Branch",
"startDate": "2017-07-30 19:00:00.000",
"location": {
"#type": "Place",
"name": "Emos",
"address": {
"#type": "PostalAddress",
"streetAddress": "Emos",
"addressLocality": "Austin",
"addressRegion": "Texas",
"postalCode": "-----",
"addressCountry": "United States"
}
}
},
"ticketNumber": "123456",
"numSeats": "1",
"url": "URLHERE",
"action": {
"#type": "ViewAction",
"target": "URLHERE",
"url": "URLHERE",
"name": "View Order"
},
"description": "View Order"
}
</script>
I'm trying to implement the Order schema as presented on : https://developers.google.com/gmail/markup/reference/order
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Order",
"merchant": {
"#type": "Organization",
"name": "Test Ltd."
},
"orderNumber": "56d59b633427b",
"orderStatus": "http://schema.org/PaymentComplete",
"acceptedOffer": {
"#type": "Offer",
"itemOffered": {
"#type": "Product",
"name": "Test Products"
},
"price": "41.09",
"priceCurrency": "USD",
"eligibleQuantity": {
"#type": "QuantitativeValue",
"value": "1"
},
"url": "http://project1.local/account/tickets",
"potentialAction": {
"#type": "ViewAction",
"target": "http://project1.local/account/tickets"
}
}}
</script>
The issue is that the email shows like a normal email. What am I doing wrong?
Thank you!
PS: The code validates on https://developers.google.com/structured-data/testing-tool/
Try using the JSON I've posted below. PaymentComplete is not recognized, so I used OrderDelivered. You can find more info here:
https://schema.org/OrderStatus
I noticed the word "tickets" in your URL, are you intending to use the order schema for ticket confirmations? I would suggest using event reservation instead. Using this will integrate with Google Now cards and also input the event into the user's Calendar. You can still generate a action button by using url or modifyReservationurl.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "Order",
"merchant": {
"#type": "Organization",
"name": "Test Ltd."
},
"orderNumber": "56d59b633427b",
"orderStatus": "http://schema.org/OrderDelivered",
"priceCurrency": "USD",
"price": "41.00",
"acceptedOffer": {
"#type": "Offer",
"itemOffered": {
"#type": "Product",
"name": "Test Products"
},
"price": "41.00",
"priceCurrency": "USD",
"eligibleQuantity": {
"#type": "QuantitativeValue",
"value": "1"
}
},
"url": "https://project1.local/account/tickets",
"potentialAction": {
"#type": "ViewAction",
"target": "https://project1.local/account/tickets"
}
}
</script>
Does Google support adding multiple markups in one email? For e.g i want to add an action button markup for Gmail and a Highlight markup for Inbox. Can this be done? I did not find any documentation for it.
Yes, having multiple markups is supported. For example, for a flight reservation.
All the code until "arrivalTime" is standard for a basic flight confirmation, but with the addition of "checkinUrl" you add a Go-To action to create a [Check In] button in Gmail.
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "FlightReservation",
"reservationNumber": "RXJ34P",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "Eva Green"
},
"reservationFor": {
"#type": "Flight",
"flightNumber": "110",
"airline": {
"#type": "Airline",
"name": "United",
"iataCode": "UA"
},
"departureAirport": {
"#type": "Airport",
"name": "San Francisco Airport",
"iataCode": "SFO"
},
"departureTime": "2017-03-04T20:15:00-08:00",
"arrivalAirport": {
"#type": "Airport",
"name": "John F. Kennedy International Airport",
"iataCode": "JFK"
},
"arrivalTime": "2017-03-05T06:30:00-05:00"
},
"checkinUrl": "http://united.com/onlinecheckin.html",
"potentialAction": {
"#type": "CheckInAction",
"target": "http://united.com/onlinecheckin.html"
}
}
</script>