<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>tourTips JavaScript API Module</title><link>https://community.telligent.com/community/13/w/api-documentation/75730/tourtips-javascript-api-module</link><description>&lt;p&gt;&lt;span&gt;Developing on Verint Community? Use the API documentation as a reference for all supported interactions with Verint Community.&lt;/span&gt;&lt;/p&gt;</description><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>tourTips JavaScript API Module</title><link>https://community.telligent.com/community/13/w/api-documentation/75730/tourtips-javascript-api-module</link><pubDate>Fri, 08 Mar 2024 17:51:12 GMT</pubDate><guid isPermaLink="false">48a156da-140f-4151-8191-b95091ccff9b</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/13/w/api-documentation/75730/tourtips-javascript-api-module#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 03/08/2024 17:51:12&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;jQuery.telligent.evolution.tourTips&lt;/h3&gt;
&lt;p&gt;This module exposes the client API by which widgets can register tour tips to be available to a user. It also supports persisting read states, as well as notifying the UI of which registered tips should be rendered to the user (that haven&amp;#39;t already been marked as read by the user).&lt;/p&gt;
&lt;h3&gt;Model&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Overview&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tour tips are popups that are shown to the user within a guided tour the first time the user visits a page associated with elements on the page.&lt;/li&gt;
&lt;li&gt;Tour tips are widget-specific, not-page specific. A user visiting a page containing widget types never encountered by the user before that also have tour tips will be presented with the tips in an ordered, guided tour with the options to mark each tip as read (marking) or to skip the tour and revisit later (suppressing).&lt;/li&gt;
&lt;li&gt;A user&amp;#39;s per-tip read state is persisted on the server as well as in &lt;code&gt;localstorage&lt;/code&gt; to to more efficieintly determine the read-state on the next viewing.&lt;/li&gt;
&lt;li&gt;Tips can be presented not only on the page&amp;#39;s first load, but also at any time while the page is already rendered, to support scenarios where widgets load content dynamically that contains tips.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Registration and Rendering&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Widgets register tips to be rendered on the client side through this API.&lt;/li&gt;
&lt;li&gt;Though this module&amp;#39;s &lt;code&gt;register&lt;/code&gt; method can be used directly, it is more commonly called through the [[tourtip UI Component|ui-tourtip]] [[ui JavaScript API Module|UI Component]] which is, itself, more commonly rendered through the &lt;code&gt;$core_v2_tourTip.Render&lt;/code&gt; Widget API.&lt;/li&gt;
&lt;li&gt;Batches of tips that have been registered all within a short period of time are processed to determine which have not already been viewed by the user, using local storage caching, batched requests to the server for a set of tips, and server caching of those same tips&amp;#39; read states.&lt;/li&gt;
&lt;li&gt;Tips that are determined to have not been marked as read are then raised within a [[ui.tourtips Client Message|ui.tourtips]] client-side [[messaging JavaScript API Module|message]] for rendering by the UI.&lt;/li&gt;
&lt;li&gt;By default, a tour tip widget is provided which subscribes to the ui.tourtips message, handles the presentation of these unread tips, and consumes this module&amp;#39;s &lt;code&gt;mark&lt;/code&gt; and &lt;code&gt;suppress&lt;/code&gt; methods for saving read state or skipping the tour. However the presentation of tips is intended to be customizable or completely replaceable by custom widgets.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Methods&lt;/h3&gt;
&lt;h4&gt;register&lt;/h4&gt;
&lt;p&gt;Registers a tip to be potentially shown to the user, dependent upon whether local or server storage already indicates the tip being in an unread state for the user, and tip presentation not currently being suppressed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$.telligent.evolution.tourTips.register(tip);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;mark&lt;/h4&gt;
&lt;p&gt;Persists a tip&amp;#39;s read state as read or unread, both on the server as well as in user-scoped client-side localstorage.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Mark a tip as read
$.telligent.evolution.tourTips.mark(tipKey, true);

// Mark a tip as unread
$.telligent.evolution.tourTips.mark(tipKey, false);
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;suppress&lt;/h4&gt;
&lt;p&gt;Suppresses presentation of tour tips by suppressing the publishing of [[ui.tourtips Client Message|ui.tourtips]] client-side [messages](@messaging for the accessing user for the provided period of time&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// suppress all unread tour tips from displaying for a given duration in milliseconds
 $.telligent.evolution.tourTips.suppress(milliseconds)
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Tip objects contain:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;key&lt;/code&gt;: (string) Unique tip identifier&lt;/li&gt;
&lt;li&gt;&lt;code&gt;message&lt;/code&gt;: (string) Tip content&lt;/li&gt;
&lt;li&gt;&lt;code&gt;index&lt;/code&gt;: (number) Index at which to show the tip&lt;/li&gt;
&lt;li&gt;&lt;code&gt;element&lt;/code&gt;: (DOM element) HTML element associated with the tip&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Related&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;[[tourtip UI Component|ui-tourtip]] [[ui JavaScript API Module|UI Component]]&lt;/li&gt;
&lt;li&gt;[[ui.tourtips Client Message|ui.tourtips]] client-side [[messaging JavaScript API Module|message]]&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$core_v2_tourTip.Render&lt;/code&gt; Widget API&lt;/li&gt;
&lt;/ul&gt;
&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>