在 Outlook 日历中建议新的会议时间
在 Outlook 中,如果被邀请者无法在原始设置的日期/时间参加会议并暂定接受或拒绝,则会议组织者可以允许被邀请者建议备选会议时间。 组织者可通过适当调整会议时间来接受建议。
示例:与会者做出暂定响应并建议不同的日期/时间
下面是一个示例,其中 Alex 邀请 Adele 共进午餐,Adele 暂定接受并建议备选日期和时间,然后 Alex 通过相应地调整会议来接受建议:
作为组织者,Alex 向 Adele 发送了一个会议请求。 他将 event 的 allowNewTimeProposals 属性设置为
true
,以便让 Adele 在需要时建议另一个时间。POST https://graph.microsoft.com/v1.0/me/events Prefer: outlook.timezone="Pacific Standard Time" Content-type: application/json { "subject": "Let's go for lunch", "body": { "contentType": "HTML", "content": "Does noon work for you?" }, "start": { "dateTime": "2019-08-15T12:00:00", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-15T14:00:00", "timeZone": "Pacific Standard Time" }, "allowNewTimeProposals": true, "location":{ "displayName":"Harry's Bar" }, "attendees": [ { "emailAddress": { "address":"AdeleV@contoso.com", "name": "Adele Vance" }, "type": "required" } ] }
Alex 获得以下响应:
HTTP/1.1 201 Created Content-type: application/json { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('64339082-ed84-4b0b-b4ab-004ae54f3747')/events/$entity", "@odata.etag": "W/\"NEXywgsVrkeNsFsyVyRrtAAAAhBhkg==\"", "id": "AAMkADAwJXJGu0AAACEhWOAAA=", "createdDateTime": "2019-08-01T06:41:07.805128Z", "lastModifiedDateTime": "2019-08-01T06:41:08.3298275Z", "changeKey": "NEXywgsVrkeNsFsyVyRrtAAAAhBhkg==", "categories": [], "originalStartTimeZone": "Pacific Standard Time", "originalEndTimeZone": "Pacific Standard Time", "reminderMinutesBeforeStart": 15, "isReminderOn": true, "hasAttachments": false, "subject": "Let's go for lunch", "bodyPreview": "Does noon work for you?", "importance": "normal", "sensitivity": "normal", "isAllDay": false, "isCancelled": false, "isOrganizer": true, "responseRequested": true, "seriesMasterId": null, "showAs": "busy", "type": "singleInstance", "webLink": "https://outlook.office365.com/owa/?itemid=AAMkADAwJXJGu0AAACEhWOAAA%3D&exvsurl=1&path=/calendar/item", "onlineMeetingUrl": null, "allowNewTimeProposals": true, "recurrence": null, "responseStatus": { "response": "organizer", "time": "0001-01-01T00:00:00Z" }, "body": { "contentType": "html", "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nDoes late morning work for you?\r\n</body>\r\n</html>\r\n" }, "start": { "dateTime": "2019-08-15T12:00:00.0000000", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-15T14:00:00.0000000", "timeZone": "Pacific Standard Time" }, "location": { "displayName": "Harry's Bar", "locationType": "default", "uniqueId": "Harry's Bar", "uniqueIdType": "private" }, "locations": [ { "displayName": "Harry's Bar", "locationType": "default", "uniqueId": "Harry's Bar", "uniqueIdType": "private" } ], "attendees": [ { "type": "required", "status": { "response": "none", "time": "0001-01-01T00:00:00Z" }, "emailAddress": { "name": "Adele Vance", "address": "AdeleV@contoso.com" } } ], "organizer": { "emailAddress": { "name": "Alex Wilber", "address": "AlexW@contoso.com" } } }
Adele 在她的收件箱中以 eventMessageRequest 的形式接收邀请。 她注意到 allowNewTimeProposals 属性已设置。 使用与此 eventMessageRequest 相关联的 event,她做了一个暂定性答复,并在 proposedNewTime 正文参数中将日期建议为次日的同一时间。 她还将 sendResponse 参数设置为 true。
POST https://graph.microsoft.com/v1.0/me/events/AAMkADU5NRaRqdoI4oeRpAAAB_woNAAA=/tentativelyAccept Content-type: application/json { "comment": "Can you make the next day instead?", "sendResponse": "true", "proposedNewTime": { "Start": { "DateTime": "2019-08-16T12:00:00", "TimeZone": "Pacific Standard Time" }, "End": { "DateTime": "2019-08-16T14:00:00", "TimeZone": "Pacific Standard Time" } } }
Adele 成功进行了回复,并收到以下响应:
HTTP/1.1 202 Accepted
Alex 收到一封 eventMessageResponse 类型的电子邮件。 他注意到了以下内容:
- 主题包含一个前缀,上面写着“已建议新时间:让我们共进午餐吧”
- 发送者是 Adele Vance
-
responseType 是
tentativelyAccepted
- Adele 的建议位于 eventMessageResponse 的 proposedNewTime 属性中
GET https://graph.microsoft.com/v1.0/me/messages?$top=1 Prefer: outlook.timezone="Pacific Standard Time"
出于演示目的,假设 Adele 的回复是 Alex 邮箱中的最新消息,则 Alex 可以简单地请求该最新消息。
HTTP/1.1 200 OK Content-type: application/json Preference-Applied: outlook.timezone="Pacific Standard Time" { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('64339082-ed84-4b0b-b4ab-004ae54f3747')/messages", "@odata.nextLink": "https://graph.microsoft.com/v1.0/me/messages?$top=1&$skip=4"", "value": [ { "@odata.type": "#microsoft.graph.eventMessageResponse", "@odata.etag": "W/\"DAAAABYAAAA0RfLCCxWuR42wWzJXJGu0AAACEGHC\"", "id": "AAMkADAwJXJGu0AAACEiVAAAA=", "createdDateTime": "2019-08-01T07:06:27Z", "lastModifiedDateTime": "2019-08-01T07:06:28Z", "changeKey": "DAAAABYAAAA0RfLCCxWuR42wWzJXJGu0AAACEGHC", "categories": [], "receivedDateTime": "2019-08-01T07:06:28Z", "sentDateTime": "2019-08-01T07:06:24Z", "hasAttachments": false, "internetMessageId": "<BY5PR17MB38759D33B8925D525A476F33D9DE0@contoso.outlook.com>", "subject": "New Time Proposed: Let's go for lunch", "bodyPreview": "Can you make the next day instead?", "importance": "normal", "parentFolderId": "AQMkADAwQAAAIBDAAAAA==", "conversationId": "AAQkADAwQAQAMkh89RO3QpBiUCETTtVbIo=", "conversationIndex": "AdVINBlgySHz1E7dCkGJQIRNO1VsigAA4n6R", "isDeliveryReceiptRequested": null, "isReadReceiptRequested": false, "isRead": false, "isDraft": false, "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADAwJXJGu0AAACEiVAAAA%3D&exvsurl=1&viewmodel=ReadMessageItem", "inferenceClassification": "focused", "unsubscribeData": [], "unsubscribeEnabled": false, "meetingMessageType": "meetingTentativelyAccepted", "type": "singleInstance", "isOutOfDate": false, "isAllDay": false, "isDelegated": false, "responseType": "tentativelyAccepted", "recurrence": null, "body": { "contentType": "html", "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nCan you make the next day instead?\r\n</body>\r\n</html>\r\n" }, "sender": { "emailAddress": { "name": "Adele Vance", "address": "AdeleV@contoso.com" } }, "from": { "emailAddress": { "name": "Adele Vance", "address": "AdeleV@contoso.com" } }, "toRecipients": [ { "emailAddress": { "name": "Alex Wilber", "address": "AlexW@contoso.com" } } ], "ccRecipients": [], "bccRecipients": [], "replyTo": [], "flag": { "flagStatus": "notFlagged" }, "startDateTime": { "dateTime": "2019-08-15T12:00:00.0000000", "timeZone": "Pacific Standard Time" }, "endDateTime": { "dateTime": "2019-08-15T14:00:00.0000000", "timeZone": "Pacific Standard Time" }, "location": { "displayName": "Harry's Bar", "locationType": "default", "uniqueIdType": "unknown" }, "proposedNewTime": { "start": { "dateTime": "2019-08-16T12:00:00", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-16T14:00:00", "timeZone": "Pacific Standard Time" } } } ] }
Alex 还注意到,午餐的 event 现在包括一个指示 Adele 建议的 proposedNewTime 属性。 如果相应的与会者建议了备选会议时间,则此属性仅在 attendee 实例中出现。
GET https://graph.microsoft.com/v1.0/me/events/AAMkADAwJXJGu0AAACEhWOAAA=?$select=subject,allowNewTimeProposals,start,end,attendees,organizer Prefer: outlook.timezone="Pacific Standard Time"
HTTP/1.1 200 Ok { "@odata.context": "https://graph.microsoft.com/testexchangev1.0/$metadata#users('64339082-ed84-4b0b-b4ab-004ae54f3747')/events(subject,allowNewTimeProposals,start,end,attendees,organizer)/$entity", "@odata.etag": "W/\"NEXywgsVrkeNsFsyVyRrtAAAAhEDMA==\"", "id": "AAMkADAwJXJGu0AAACEhWOAAA=", "subject": "Let's go for lunch", "allowNewTimeProposals": true, "start": { "dateTime": "2019-08-15T12:00:00.0000000", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-15T14:00:00.0000000", "timeZone": "Pacific Standard Time" }, "attendees": [ { "type": "required", "status": { "response": "tentativelyAccepted", "time": "2019-08-01T07:06:24.5046431Z" }, "proposedNewTime": { "start": { "dateTime": "2019-08-16T12:00:00.0000000", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-16T14:00:00.0000000", "timeZone": "Pacific Standard Time" } }, "emailAddress": { "name": "Adele Vance", "address": "AdeleV@contoso.com" } } ], "organizer": { "emailAddress": { "name": "Alex Wilber", "address": "AlexW@contoso.com" } } }
Alex 决定通过将 event 更新为建议的 start 和 end 日期/时间来接受 Adele 的建议。
PATCH https://graph.microsoft.com/v1.0/me/events/AAMkADAwJXJGu0AAACEhWOAAA= Prefer: outlook.timezone="Pacific Standard Time" Content-type: application/json { "start": { "dateTime": "2019-08-16T12:00:00.0000000", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-16T14:00:00.0000000", "timeZone": "Pacific Standard Time" } }
Adele 成功进行了更新,并收到以下响应。
HTTP/1.1 200 Ok { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('64339082-ed84-4b0b-b4ab-004ae54f3747')/events/$entity", "@odata.etag": "W/\"NEXywgsVrkeNsFsyVyRrtAAAAhBizA==\"", "id": "AAMkADAwJXJGu0AAACEhWOAAA=", "createdDateTime": "2019-08-01T06:41:07.805128Z", "lastModifiedDateTime": "2019-08-01T08:21:43.5696529Z", "changeKey": "NEXywgsVrkeNsFsyVyRrtAAAAhBizA==", "categories": [], "originalStartTimeZone": "Pacific Standard Time", "originalEndTimeZone": "Pacific Standard Time", "reminderMinutesBeforeStart": 15, "isReminderOn": true, "hasAttachments": false, "subject": "Let's go for lunch", "bodyPreview": "Does noon work for you?", "importance": "normal", "sensitivity": "normal", "isAllDay": false, "isCancelled": false, "isOrganizer": true, "responseRequested": true, "seriesMasterId": null, "showAs": "busy", "type": "singleInstance", "webLink": "https://outlook.office365.com/owa/?itemid=AAMkADAwJXJGu0AAACEhWOAAA%3D&exvsurl=1&path=/calendar/item", "onlineMeetingUrl": null, "allowNewTimeProposals": true, "recurrence": null, "responseStatus": { "response": "organizer", "time": "0001-01-01T00:00:00Z" }, "body": { "contentType": "html", "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nDoes noon work for you?\r\n</body>\r\n</html>\r\n" }, "start": { "dateTime": "2019-08-16T12:00:00.0000000", "timeZone": "Pacific Standard Time" }, "end": { "dateTime": "2019-08-16T14:00:00.0000000", "timeZone": "Pacific Standard Time" }, "location": { "displayName": "Harry's Bar", "locationType": "default", "uniqueId": "Harry's Bar", "uniqueIdType": "private" }, "locations": [ { "displayName": "Harry's Bar", "locationType": "default", "uniqueId": "Harry's Bar", "uniqueIdType": "private" } ], "attendees": [ { "type": "required", "status": { "response": "notResponded", "time": "4501-01-01T00:00:00Z" }, "emailAddress": { "name": "Adele Vance", "address": "AdeleV@contoso.com" } } ], "organizer": { "emailAddress": { "name": "Alex Wilber", "address": "AlexW@contoso.com" } } }
无与会者建议备选时间
在步骤 2 中,如果 Adele 回答暂定或拒绝,并且没有提出不同的日期/时间,则会发生以下情况:
- 在步骤 3 中,Alex 将收到 responseType 属性设置为
tentativelyAccepted
的 eventMessageResponse(如果 Adele 拒绝,则设置为decline
)。 在此 eventMessageResponse 实例中,Alex 将找不到 proposedNewTime 属性。 - 在步骤 4 中,Alex 在关联的 event 中也找不到 proposedNewTime 属性。