My EventReservation markup has been approved by Google but I'm noticing that at times, the ViewAction (a simple link) that I associated with it disappears from Gmail and I was wondering what could cause this problem.
Markup example:
{
{
"#context":"http://schema.org",
"#type":"EventReservation",
"reservationStatus":"http://schema.org/Confirmed",
"reservationNumber":XXX,
"url":"XXX",
"action": {
"#type":"ViewAction",
"name":"Message Host",
"url":"XXX"
},
"modifiedTime":"2015-08-13T17:56:29+0000",
"underName": {
"#type":"Person",
"name":"XXX"
},
"reservationFor": {
"#type":"Event",
"name":"XXX",
"image":"XXX",
"startDate":"2015-08-17T10:42:28-0400",
"endDate":"",
"location": {
"#type":"Place",
"name":"",
"address": {
"streetAddress":"XXX",
"addressLocality":"XXX",
"addressRegion":"XXX",
"postalCode":"XXX",
"addressCountry":"XXX"
}
}
}
}
There are a few ways to generate a button with the EventReservation schema. You can generate a "View Ticket" button using a URL property:
"url": "https://example.com"
To get a "modify reservation" button, use the modifyReservation property:
"modifyReservationUrl": "https://example.com
In the example you've posted, I'm assuming you're trying to trigger a custom action label with the ViewAction schema. I was able to achieve this by defining a top level Event Reservation first then the View Action. My example below:
<script type="application/ld+json">
{
"#context": "http://schema.org",
"#type": "EventReservation",
"reservationNumber": "123456",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "John Smith"
},
"reservationFor": {
"#type": "Event",
"name": "Example Event",
"startDate": "2015-08-17T14:30:00-08:00",
"location": {
"#type": "Place",
"name": "AT&T Park",
"address": {
"#type": "PostalAddress",
"streetAddress": "24 Willie Mays Plaza",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94107",
"addressCountry": "US"
}
}
},
"potentialAction": {
"#type": "ViewAction",
"name": "View Event",
"target": "https://www.example.com"
}
}
</script>
The action button doesn't disappear and should stay:
json+ld markup is also removed by some eMail carriers.
I found Mandrill was removing my markup, until I changed the format from json+ld to microdata.
Related
I have no clue as to why this is happening for this API only. I am getting 503 service unavailable. Can someone please help me in this.
Payload Used:
{
"#odata.type": "microsoft.graph.externalItem",
"acl": [
{
"type": "user",
"value": "****Azure Object ID***",
"accessType": "grant",
"identitySource": "azureActiveDirectory"
},
{
"type": "user",
"value": "*****AZURE OBJECT ID******",
"accessType": "grant",
"identitySource": "azureActiveDirectory"
}
],
"properties": {
"Product": "Product created in manual",
"Company": "ITC Infotech",
"Category": "Mobile",
"Description" : "this is just a dummy description",
"Price": "$20.22",
"HomePage": "https://www.google.com",
"Image": "https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/gardenia-royalty-free-image-1580854928.jpg?crop=1xw:1xh;center,top&resize=480:*"
},
"content": {
"value": "this is just a dummy description",
"type": "text"
}
}
Looks like you need to add /external/connections. Please look at this document.
I am trying to get some information from user via cards, the target url is receiving a blank post request instead of user input.Here is the code
requests.post(url="incoming webhook",
json=
{
"#type": "MessageCard",
"#context": "http://schema.org/extensions",
"summary": "John Doe",
"title": "input",
"potentialAction": [
{
"#type": "ActionCard",
"name": "Change status",
"inputs": [{
"#type": "MultichoiceInput",
"id": "list",
"title": "Select a status",
"isMultiSelect": "true",
"style":"compact",
"choices": [{
"display": "OBE",
"value": "OBE"
}, {
"display": "OUI",
"value": "OUI"
}, ]
}],
"actions": [{
"#type": "HttpPOST",
"name": "Save",
"target": "aworkingurl",
}]
}]})
The url that I used is from a site called webhooks.site which gives urls that accept POST and GET requests, the site shows that a POST has been attempted but the content is empty but when I posted some string to the same url it show that data just fine.
An expanded JSON-LD file was saved from Protege and I would like to write a context that compacts the JSON-LD such that the NamedIndividuals become Javascript objects. My JSON-LD file provides orbital parameters for planets.
I attempted to define "earth" as a term but it did not have the desired effect of replacing the #id and #type. What I'd like is a compact JSON-LD file that I can parse into an object and access parameter values with something similar to mars.inclination, or graph[i].inclination. Guidance and examples would be appreciated. Thanks.
Here is a portion yet complete JSON-LD file with the context I developed in JSON-LD Playground:
{
"#context": {
"demo": "http://example.org/demo#",
"decimal": "http://www.w3.org/2001/XMLSchema#decimal",
"owl": "http://www.w3.org/2002/07/owl#",
"label": "http://www.w3.org/2000/01/rdf-schema#label",
"comment": "http://www.w3.org/2000/01/rdf-schema#comment",
"eccentricity": {
"#id": "demo:eccentricity",
"#type": "decimal"
},
"inclination": {
"#id": "demo:inclination",
"#type": "decimal"
},
"omega": {
"#id": "demo:omega",
"#type": "decimal"
},
"sma": {
"#id": "demo:sma",
"#type": "decimal"
},
"raan": {
"#id": "demo:raan",
"#type": "decimal"
},
"tau": {
"#id": "demo:tau",
"#type": "decimal"
},
"period": {
"#id": "demo:period",
"#type": "decimal"
},
"earth": {
"#id": "demo:Earth",
"#type": "owl:namedIndividual"
}
},
"#graph": [
{
"#id": "demo:Earth",
"#type": [
"owl:NamedIndividual",
"demo:Orbit"
],
"eccentricity": "0.016708",
"inclination": "7.155",
"omega": "-11.26064",
"period": "365.256363",
"raan": "23.4392811",
"sma": "1",
"tau": "114.20783",
"label": "Earth"
},
{
"#id": "demo:Mars",
"#type": [
"owl:NamedIndividual",
"demo:Orbit"
],
"eccentricity": "0.0934",
"inclination": "5.65",
"omega": "49.558",
"period": "686.971",
"raan": "317.68143",
"sma": "1.523679",
"tau": "286.502",
"label": "Mars"
},
{
"#id": "demo:Mercury",
"#type": [
"owl:NamedIndividual",
"demo:Orbit"
],
"eccentricity": "0.20563",
"inclination": "3.38",
"omega": "48.331",
"period": "88",
"raan": "281.01",
"sma": "0.387098",
"tau": "29.124",
"label": "Mercury"
},
{
"#id": "demo:Orbit",
"#type": "owl:Class"
}
]
}
In an app, I'm returning messages of type list_card with option key for an intent.
Here is the json of a sample query:
{
"id": "275212ef-cf97-4576-afa7-facfbc044ada",
"timestamp": "2017-07-17T17:36:03.655Z",
"lang": "en",
"result": {
"source": "agent",
"resolvedQuery": "who is Sneha",
"action": "cp.name_search",
"actionIncomplete": false,
"parameters": {
"keyword": "Sneha"
},
"contexts": [
{
"name": "cpname_search-followup",
"parameters": {
"keyword.original": "Sneha",
"keyword": "Sneha"
},
"lifespan": 2
},
{
"name": "cpuid_search-followup",
"parameters": {
"keyword.original": "Sneha",
"keyword": "Sneha"
},
"lifespan": 1
}
],
"metadata": {
"intentId": "86bd1a17-8e9a-4956-b270-5fb4ac952f5f",
"webhookUsed": "true",
"webhookForSlotFillingUsed": "false",
"webhookResponseTime": 135,
"intentName": "cp.name_search"
},
"fulfillment": {
"speech": "Searching...",
"source": "agent",
"messages": [
{
"type": "simple_response",
"platform": "google",
"textToSpeech": "Here are the search results. \nWant anything else?"
},
{
"type": "list_card",
"platform": "google",
"title": "Search results",
"items": [
{
"optionInfo": {
"key": "uid 72",
"synonyms": []
},
"title": "Sneha Vasista",
"description": "Srinivas Institute of Technology",
"image": {
"url": "//www.curlpad.com/assets/img/custom_images/user.png"
}
},
{
"optionInfo": {
"key": "uid 2053",
"synonyms": []
},
"title": "Sneha Bhat",
"description": "Canara Engineering College",
"image": {
"url": "//www.curlpad.com/assets/img/custom_images/user.png"
}
},
{
"optionInfo": {
"key": "uid 2114",
"synonyms": []
},
"title": "Sneha Sajan",
"description": "P.A College of Engineering",
"image": {
"url": "//www.curlpad.com/assets/img/custom_images/user.png"
}
},
{
"optionInfo": {
"key": "uid 2320",
"synonyms": []
},
"title": "Sneha ",
"description": "sdit",
"image": {
"url": "//www.curlpad.com/assets/img/custom_images/user.png"
}
},
{
"optionInfo": {
"key": "uid 2363",
"synonyms": []
},
"title": "Sneha ",
"description": "Srinivas School of Engineering, Mukka",
"image": {
"url": "//www.curlpad.com/assets/img/custom_images/user.png"
}
}
]
},
{
"type": "0",
"speech": "Here are the search results."
}
]
},
"score": 1
},
"status": {
"code": 200,
"errorType": "success"
},
"sessionId": "e6aa9e52-a9e1-481a-adb5-476c5b386e02"
}
Now the problem is, when I tap the list item in AoG simulator, it passes title of item to next query.
But while testing in Api.ai simulator, it behaves well and passes that key to the next query.
What can be the problem here?
Any hints?
If you're using API.AI, then it will appear in the Intent as an actions_intent_OPTION Event.
One good solution is to have the Intent that sends the list with an OutputContext. Then create a particular Fallback Intent with actions_intent_OPTION as Event and your desired action for that Context which should handle both the voice and press responses.
And you will find your option_key at ["originalRequest"]["data"]["inputs"][0]["arguments"][0]["textValue"] instead of parameter.
You can also see the response value in the actions_intent_option context.
What you need to do is set up a fallback intent directly under your current intent.
For example, if you display the list from the default welcome intent, you can do the following.
Click "Add follow-up intent" and choose fallback.
Don't forget to set the action and enable webhook in the fallback intent.
Now, you should be able to retrieve your answer from the fallback intent using the following code.
const param = app.getContextArgument('actions_intent_option','OPTION').value;
I'm developing event markup using json-ld to be included with confirmation emails.
Some of my events are recurring at regular intervals. However, recurring events are not supported by the latest Schema.org specifications so I've followed the advice offered here: http://lists.w3.org/Archives/Public/public-vocabs/2011Dec/0062.html and decided to embed a json list of the individual events.
The json-ld passes the tests in the Email Markup Tester provided by google (https://www.google.com/webmasters/markup-tester/u/0/).
However, when I test the google calendar integration by sending the email to myself, only 1 out of 6 events in the series appears in my calendar (oddly, it's neither the first or last event in the list).
Does gmail markup support multiple events in the same email? If so is there a better way to do it?
Example Markup:
<script type="application/ld+json">
[
{
"reservationNumber": "7e15afb6b2485005e55481be58de4141b70f85006bd25823",
"reservationFor": {
"startDate": "2015-05-09T16:00:00-07:00",
"endDate": "2015-05-09T22:30:00-07:00",
"description": "regularly schedule XXXX",
"location": {
"address": {
"addressCountry": "US",
"addressLocality": "XXX",
"addressRegion": "XXX",
"streetAddress": "XXX",
"postalCode": "XXX",
"#type": "PostalAddress"
},
"#type": "Place",
"name": "XXX"
},
"#type": "Event",
"name": "XXX Every 2 Weeks"
},
"modifyReservationUrl": "https://example.com/XXX",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "XXX"
},
"#context": "http://schema.org",
"#type": "EventReservation"
},
...
{
"reservationNumber": "40553edbce52f0052e153919a4dad49ec32516c15433bf4a",
"reservationFor": {
"startDate": "2015-05-23T16:00:00-07:00",
"endDate": "2015-05-23T22:30:00-07:00",
"description": "regularly schedule XXX",
"location": {
"address": {
"addressCountry": "US",
"addressLocality": "XXX",
"addressRegion": "XXX",
"streetAddress": "XXX",
"postalCode": "XXX",
"#type": "PostalAddress"
},
"#type": "Place",
"name": "XXX"
},
"#type": "Event",
"name": "XXX Every 2 Weeks"
},
"modifyReservationUrl": "https://example.com/XXX",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"#type": "Person",
"name": "XXX"
},
"#context": "http://schema.org",
"#type": "EventReservation"
},
]
</script>
You can try adding this markup in the html file by using the Quick Apps script tutorial mentioned in the documentation here.
Does making a list help: https://schema.org/ItemList
Haven't tested this out, but it might be a useful approach.