Outlook365 Add-In Event on Change Attendee Action - javascript

I am working on to creating Outlook ADD-In for Outlook365 cloud account.
I want to capture event on attendees change i.e rather than manually clicking on Add-In icon for every change, if someones Add or remove some attendee from calendar invite, the event can be captured and some java script function can be called in my Add-In app.

In case your add-in is active and attendees are changed in appointment window, you can get events when attendees are changed. requirement set 1.7 for Outlook 2016 was made GA during IGNITE.
You need to handle RecipientsChanged events.
https://learn.microsoft.com/en-us/javascript/office/objectmodel/requirement-set-1.7/outlook-requirement-set-1.7?view=office-js
You can also refer to the following youtube video for an example
https://youtu.be/xbUcGlcnfxQ
In case you want without add-in being active, you need to use graph API web-hooks to get notified of the change.

Related

GTM - how to capture click event on button and change it's behavior

I've searched a lot, read the docs but all I found on this issue refers to analytics and following, counting clicks only.
But the thing I need to do is to change the behavior of one of the buttons on the website, so that when user clicks on one product card's 'buy' button, the gtm would capture this click and redirect the user to another url instead of adding the product to cart (default behavior).
The reason I need to do it thru gtm and not by changing frontend code directly is the long release cycle of our product (2 weeks), but we need to change button behavior for several days only, check reactions and than cancel it.
Is it possible to do at all with gtm and what should I add there (trigger / tag)? Do I need to write special script for this or is it possible to do by native gtm functions?

GTM - Trigger a tag once by first user interaction

I'm trying to fire a tag in Google Tag Manager only once after some first user interactions, such as mouse click, scroll, key press etc.
I managed it to fire the tag with a proper GTM setup, but now the tag fires every time I scroll or click on the page - and I don't want to fire the tag that often.
Is there a proper solution to do that? Thanks
#1 Set a custom cookie.
Tags > New > Custom HTML
add javascript for your cookie.
do not add a trigger.
#2 Add the custom cookie as a User-Defined Variable.
Variables > New > 1st Party Cookie
Set Cookie Name to same name used in JS from custom HTML tag above (eg: test_cookie)
#3 Create Trigger to run if test_cookie is true.
Trigger > Page View
Trigger fires > Some Page Views
Select your cookie variable (#2)
test_cookie > equals > true
#4 Create new Tag to do whatever you want once per session. In my case I am showing a modal.
Tags > New > Custom HTML
Click Advanced Settings > Tag Sequencing > Fire After
Select Tag that sets custom cookie (#1)
Select Don't Fire if fails or is paused
Firing Triggers = All Pages
Exceptions = select the trigger you created above to test if cookie is true (#3)
Publish and it should work provided your JS is correct for setting the cookie is is set to expire after each session.
This guy explains how to set cookies in GTM pretty well
https://www.analyticsmania.com/post/cookies-with-google-tag-manager/
If you mean only once per page, then you can look in the advanced settings for your tags, where you can choose between "fire unlimited", "once per event" and "once per page", and select the "once per page" setting. Unlimited means it fires on every applicable trigger, "once per event" means if fires on every trigger for a distinct event, and "one per page" means it fires only once for the given url.
If you mean "fire only once per session", then there is no built-in mechanism. You would have to set a cookie (maybe using a custom template for a "create cookie tag", you could fire that in a tag sequence after your one-time tag has fired) and then create an exception trigger that prevents the tag from firing when the cookie is set. However by storing data on the users device (by cookies, local storage or basically any other means) your website has to follow the ePrivacy directive, so check if you have to obtain user consent.

How does StorageEvent work in Office Add-in?

I have 2 task panes in Word Add-in (using Office UI Fabric with React). I select item in first pane and then I write item's id to localStorage. In the second pane I press update button, so I can see details of the item.
I want to avoid pressing update button. So I tried adding window.addEventListener('storage', f) in the second pane, but it doesn't trigger.
Am I doing something wrong?
or
Does Add-in interpret itself as single window and that's why StorageEvent is not triggered?
And what alternatives do I have?
(Office.context.document.settings, SharedWorker, ...?)
I've consulted with the Office product team. Their experience is that the storage event does not fire reliably in add-ins, and that this is probably a problem with IE. They recommend that you poll local storage instead of relying on the event.

Using Window.postmessage() to send a click event

I am trying to create a single page web application which incorporates outlook's embedded calendar into an iframe. There will be two calendars, one which displays my shared calendar's current month and another one which looks at next month. I would like to use Window.postmessage() to send a click event to the outlook calendar to click the button which sets the calendar to view the next month. I have to use Window.postmessage() due to cross-origin policy as I cant access the elements in the calendars. Is this possible using Window.postmessage()? Is there any example available to show how its done?

JQuery Scheduler with drag and drop

We want to create a customized scheduler in HTML5, CSS3 and JQuery. With the possibility to list items outside of the Scheduler, so that the user can drag the items and drop them inside the Schedule.
Users can not create events inside the Scheduler, they can just drag and drop existing events (that are saved in a database).
We also want to show schedules of user's friends, when the user types the name of a friend in a textbox, so that he can synchronize/organize/discuss his own tasks with the other user.
Is there any jQuery plugin that can do that, and that doesn't give the possibility to create new events inside the scheduler?
I already started to do this from scratch, but I won't be able deliver on time.
look at fullcalendar.io scheduler. The scheduler pat it's triple licensed, free for opensource prj

Categories

Resources