바로가기 액션을 사용하면 사용자가 액션을 완료할 수 있는 웹사이트로 이동합니다. 원클릭 작업과 달리 이동 작업은 여러 번 상호작용할 수 있습니다.
Gmail의 이동 작업
사용 사례
현재 Gmail에서 지원하는 바로가기 작업은 다음과 같습니다.
향후 더 많은 작업이 지원될 수 있습니다.
작업 보기
사용자가 작업을 완료하기 위해 사이트로 이동해야 하는 이메일에 ViewAction 버튼을 추가할 수 있습니다.
다음 선언은 이메일에 ViewAction 버튼을 추가합니다.
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"url": "https://watch-movies.com/watch?movieId=abc123",
"name": "Watch movie"
},
"description": "Watch the 'Avengers' movie online"
}
</script>
마이크로데이터
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="potentialAction" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="target" href="https://watch-movies.com/watch?movieId=abc123"/>
<meta itemprop="name" content="Watch movie"/>
</div>
<meta itemprop="description" content="Watch the 'Avengers' movie online"/>
</div>
게시자 데이터
publisher 필드를 설정하여 이메일 메시지를 보내는 조직에 관한 세부정보를 추가할 수 있습니다.
JSON-LD
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"description": "Watch the 'Avengers' movie online",
"potentialAction": {
"@type": "ViewAction",
"url": "https://watch-movies.com/watch?movieId=abc123",
"name": "Watch movie"
},
"publisher": {
"@type": "Organization",
"name": "Google Play",
"url": "https://play.google.com",
"url/googlePlus": "https://plus.google.com/106886664866983861036"
}
}
</script>
마이크로데이터
<div itemscope itemtype="http://schema.org/EmailMes>sag<e"
meta itemprop="description" content="Watch the ><9;Avengers' movie online"/
div itemprop="potentialAction" i>temsc<ope itemtype="http://schema.org/ViewAction"
link itemprop=&quo>t;tar<get" href="https://watch-movies.c>om/<watc>h?m<ovieId=abc123"/
meta itemprop="name" content="Watch >movie<"/
/div
div itemprop="publish>er&qu<ot; itemscope itemtype="http://schema.org/Orga>nizat<ion"
meta itemprop="name" content="Google Play"/
li>nk <item>p<rop=>"url" href="https://play.google.com"/
link itemprop="url/googlePlus" href="https://plus.google.com/106886664866983861036"/
/div
/div
Track Action
사용자가 배송 중인 상품을 추적하기 위해 사이트로 이동해야 하는 이메일에 TrackAction 버튼을 추가할 수 있습니다.
trackingUrl 속성을 지정하면 작업이 자동으로 생성됩니다. 모바일 애플리케이션에 직접 연결하려면 다음과 같이 TrackAction도 포함하세요.
JSON-LD
<script type="application/ld+>json"
{
"@context": "http://schema.org",
"@type": "ParcelDelivery",
"deliveryAddress": {
"@type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"addressCountry": "US",
"postalCode": "94107"
},
"expectedArrivalUntil": "2013-03-12T12:00:00-08:00",
"carrier": {
"@type": "Organization",
"name": "FedEx"
},
"itemShipped": {
"@type": "Product",
"name": "iPod Mini"
},
"partOfOr<der&quo>t;: {
"@type": "Order",
"orderNumber": "176057",
"merchant": {
"@type": "Organization",
"name": "Bob Dole"
}
},
"trackingUrl": "http://fedex.com/track/1234567890"
"potentialAction": {
"@type": "TrackAction",
"target": "http://fedex.com/track/1234567890"
},
}
/script
마이크로데이터
<div itemscope itemtype="http://schema.org/ParcelDeli>ver<y"
div itemprop="deliveryAddress" itemscope itemtype="http://>schem<a.org/PostalAddress"
meta itemprop="streetAddre>ss&qu<ot; content="24 Willie Mays Plaza"/
meta i>tempr<op="addressLocality" content=&quo>t;San< Francisco"/
meta itemprop="ad>dress<Region" content="CA"/
me>ta <item>pro<p="addressCountry" content="US"/
meta itemprop=&q>uot<;postalCode" content="94107"/
/div
meta itemprop=">expec<tedArrivalUntil" content="2>013<-03->12T<12:00:00-08:00"/
div itemprop="carrier" itemscope itemty>pe=&q<uot;http://schema.org/Organization"<>/span>
< met>a i<temprop="name" content="FedEx"/
/div
div itempr>op=&q<uot;itemShipped" itemscope itemtype=&quo>t;htt<p://schema.org/Product"
meta itemprop="name" content=&qu>ot;iPod< Mini"/
/div
div itemprop=">;part<OfOr>der<&quo>t; <itemscope itemtype="http://schema.org/Order"
meta itemp>rop<="orderNumber" content="176057"/
div itemprop="merch>ant&q<uot; itemscope itemtype="http://schema.org/Organization&quo>t;
< > < met>a itemprop="name" content="Bob Dole"/
/div
/div
link itemprop="trackingUrl" href="http://fedex.com/track/1234567890"/
div itemprop="potentialAction" itemscope itemtype="http://schema.org/TrackAction"
link itemprop="target" href="http://fedex.com/track/1234567890"/
/div
/div
마크업 테스트
이메일 마크업 테스터 도구를 사용하여 마크업의 유효성을 검사할 수 있습니다. 마크업 코드를 붙여넣고 검증 버튼을 클릭하여 콘텐츠를 스캔하고 오류가 있는 경우 보고서를 받습니다.
사양
다양한 이동 작업 유형의 사양은 특정 유형 ViewAction 또는 TrackAction의 문서를 참고하세요.