当前位置: 动力学知识库 > 问答 > 编程问答 >

google schemas - Multiple email markups for Gmail and Inbox

问题描述:

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>
分享给朋友:
您可能感兴趣的文章:
随机阅读: