Difference between revisions of "WID/Current/SDK/Engagement-combined"
(Published) |
(Published) |
||
Line 83: | Line 83: | ||
oMyPlugin.command('Engage.invite');</source> | oMyPlugin.command('Engage.invite');</source> | ||
===invite=== | ===invite=== | ||
− | Opens the Engage Widget and renders the text based on the options provided. If no options are provided, | + | Opens the Engage Widget and renders the text based on the options provided. If no options are provided, the widget doesn't open. |
===Example=== | ===Example=== | ||
Line 191: | Line 191: | ||
{{!}}} | {{!}}} | ||
===offer=== | ===offer=== | ||
− | Opens | + | Opens a widget for a product offer using the data sent through the command options provided below. The widget can include both rendering options and the actual data that needs to be displayed in the Offer Widget. If no options are provided, the widget will not open. |
===Example=== | ===Example=== | ||
Line 234: | Line 234: | ||
{{!}}mode | {{!}}mode | ||
{{!}}string | {{!}}string | ||
− | {{!}} | + | {{!}}The display type of the Offer widget. |
{{!}}overlay, toaster | {{!}}overlay, toaster | ||
{{!}}toaster | {{!}}toaster | ||
Line 248: | Line 248: | ||
{{!}}layout | {{!}}layout | ||
{{!}}string | {{!}}string | ||
− | {{!}}Additional layout options supported for all modes. | + | {{!}}Additional layout options are supported for all modes. |
{{!}}minimal, leftText, rightText, topText, bottomText | {{!}}minimal, leftText, rightText, topText, bottomText | ||
{{!}}leftText | {{!}}leftText | ||
Line 255: | Line 255: | ||
{{!}}headline | {{!}}headline | ||
{{!}}string | {{!}}string | ||
− | {{!}}Offer title header text. | + | {{!}}The Offer title header text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 262: | Line 262: | ||
{{!}}description | {{!}}description | ||
{{!}}string | {{!}}string | ||
− | {{!}}Offer body description text. | + | {{!}}The Offer body description text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 269: | Line 269: | ||
{{!}}cta | {{!}}cta | ||
{{!}}object | {{!}}object | ||
− | {{!}}An object containing | + | {{!}}An object containing HTML attributes and/or CXBus commands for the CTA (call to action) button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 276: | Line 276: | ||
{{!}}cta.text | {{!}}cta.text | ||
{{!}}string | {{!}}string | ||
− | {{!}}CTA button text. | + | {{!}}The CTA button text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 283: | Line 283: | ||
{{!}}cta.url | {{!}}cta.url | ||
{{!}}string | {{!}}string | ||
− | {{!}}URL string for the CTA button. | + | {{!}}The URL string for the CTA button. |
Note: The URL must be properly defined with the complete Protocol URL Address. For example, https://www.genesys.com. | Note: The URL must be properly defined with the complete Protocol URL Address. For example, https://www.genesys.com. | ||
{{!}}_blank, _parent, _self, _top, framename | {{!}}_blank, _parent, _self, _top, framename | ||
Line 291: | Line 291: | ||
{{!}}cta.target | {{!}}cta.target | ||
{{!}}string | {{!}}string | ||
− | {{!}} | + | {{!}}Specifies where the URL is opened. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 319: | Line 319: | ||
{{!}}image.src | {{!}}image.src | ||
{{!}}string | {{!}}string | ||
− | {{!}}URL of the image. | + | {{!}}The URL of the image. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 333: | Line 333: | ||
{{!}}insertAfter | {{!}}insertAfter | ||
{{!}}string | {{!}}string | ||
− | {{!}}Applicable only in mobile mode. An | + | {{!}}Applicable only in mobile mode. An ID or class name of an HTML selector from the host page. The offer will be inserted after this element. Precede the value mentioned here with the standard Class ('.') and ID selector ('#') character. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 340: | Line 340: | ||
{{!}}insertBefore | {{!}}insertBefore | ||
{{!}}string | {{!}}string | ||
− | {{!}}Applicable only in mobile mode. An | + | {{!}}Applicable only in mobile mode. An ID or class name of an HTML selector from the host page. The offer will be inserted before this element. Precede the value mentioned here with the standard Class ('.') and ID selector ('#') character. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 347: | Line 347: | ||
{{!}}insertInto | {{!}}insertInto | ||
{{!}}string | {{!}}string | ||
− | {{!}}Applicable only in mobile mode. An | + | {{!}}Applicable only in mobile mode. An ID or class name of an HTML selector from the host page. The offer will be appended inside this element. Precede the value mentioned here with the standard Class ('.') and ID selector ('#') character. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 354: | Line 354: | ||
{{!}}styles | {{!}}styles | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the offer content. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 361: | Line 361: | ||
{{!}}styles.closeButton | {{!}}styles.closeButton | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the close button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 368: | Line 368: | ||
{{!}}styles.closeButton.color | {{!}}styles.closeButton.color | ||
{{!}}string | {{!}}string | ||
− | {{!}} | + | {{!}}The color of the close button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 375: | Line 375: | ||
{{!}}styles.closeButton.opacity | {{!}}styles.closeButton.opacity | ||
{{!}}number | {{!}}number | ||
− | {{!}}CSS 'opacity' property for the close button. | + | {{!}}The CSS 'opacity' property for the close button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 382: | Line 382: | ||
{{!}}styles.overlay | {{!}}styles.overlay | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the overlay container. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 389: | Line 389: | ||
{{!}}styles.overlay.top | {{!}}styles.overlay.top | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'top' property for the overlay container. | + | {{!}}The CSS 'top' property for the overlay container. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 396: | Line 396: | ||
{{!}}styles.overlay.right | {{!}}styles.overlay.right | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'right' property for the overlay container. | + | {{!}}The CSS 'right' property for the overlay container. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 403: | Line 403: | ||
{{!}}styles.overlay.bottom | {{!}}styles.overlay.bottom | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'bottom' property for the overlay container. | + | {{!}}The CSS 'bottom' property for the overlay container. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 410: | Line 410: | ||
{{!}}styles.overlay.left | {{!}}styles.overlay.left | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'left' property for the overlay container. | + | {{!}}The CSS 'left' property for the overlay container. |
− | Note: When all the position values are provided, the order of precedence will be | + | Note: When all the position values are provided, the order of precedence will be top, right, bottom, and left. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 418: | Line 418: | ||
{{!}}styles.overlay.center | {{!}}styles.overlay.center | ||
{{!}}boolean | {{!}}boolean | ||
− | {{!}}Aligns overlay container to the center of the screen. | + | {{!}}Aligns the overlay container to the center of the screen. |
{{!}}n/a | {{!}}n/a | ||
{{!}}true | {{!}}true | ||
Line 425: | Line 425: | ||
{{!}}styles.offer | {{!}}styles.offer | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the Offer window. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 432: | Line 432: | ||
{{!}}styles.offer.backgroundColor | {{!}}styles.offer.backgroundColor | ||
{{!}}string | {{!}}string | ||
− | {{!}} | + | {{!}}The background color of the offer. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 439: | Line 439: | ||
{{!}}styles.offer.color | {{!}}styles.offer.color | ||
{{!}}string | {{!}}string | ||
− | {{!}} | + | {{!}}The text color of the offer. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 446: | Line 446: | ||
{{!}}styles.offer.padding | {{!}}styles.offer.padding | ||
{{!}}string | {{!}}string | ||
− | {{!}} | + | {{!}}The padding for the offer container. |
{{!}}n/a | {{!}}n/a | ||
{{!}}0 | {{!}}0 | ||
Line 453: | Line 453: | ||
{{!}}styles.title | {{!}}styles.title | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the title. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 460: | Line 460: | ||
{{!}}styles.title.font | {{!}}styles.title.font | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'font' property for the title. | + | {{!}}The CSS 'font' property for the title. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 467: | Line 467: | ||
{{!}}styles.title.textAlign | {{!}}styles.title.textAlign | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'text-align' property for the title. | + | {{!}}The CSS 'text-align' property for the title. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 474: | Line 474: | ||
{{!}}styles.headline | {{!}}styles.headline | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the header text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 481: | Line 481: | ||
{{!}}styles.headline.font | {{!}}styles.headline.font | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'font' property for the header text. | + | {{!}}The CSS 'font' property for the header text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 488: | Line 488: | ||
{{!}}styles.headline.textAlign | {{!}}styles.headline.textAlign | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'text-align' property for the header text. | + | {{!}}The CSS 'text-align' property for the header text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 495: | Line 495: | ||
{{!}}styles.description | {{!}}styles.description | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for the offer description text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 502: | Line 502: | ||
{{!}}styles.description.font | {{!}}styles.description.font | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'font' property for the description text. | + | {{!}}The CSS 'font' property for the description text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 509: | Line 509: | ||
{{!}}styles.description.textAlign | {{!}}styles.description.textAlign | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'text-align' property for the description text. | + | {{!}}The CSS 'text-align' property for the description text. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 516: | Line 516: | ||
{{!}}styles.ctaButton | {{!}}styles.ctaButton | ||
{{!}}object | {{!}}object | ||
− | {{!}}An | + | {{!}}An object containing styles for call to action button in the offer window. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 523: | Line 523: | ||
{{!}}styles.ctaButton.font | {{!}}styles.ctaButton.font | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'font' property for the text in | + | {{!}}The CSS 'font' property for the text in CTA button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 530: | Line 530: | ||
{{!}}styles.ctaButton.textAlign | {{!}}styles.ctaButton.textAlign | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'text-align' property for the text in | + | {{!}}The CSS 'text-align' property for the text in CTA button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 537: | Line 537: | ||
{{!}}styles.ctaButton.background | {{!}}styles.ctaButton.background | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'background' property for the | + | {{!}}The CSS 'background' property for the CTA button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 544: | Line 544: | ||
{{!}}styles.ctaButton.color | {{!}}styles.ctaButton.color | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'color' property for the text in | + | {{!}}The CSS 'color' property for the text in CTA button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 551: | Line 551: | ||
{{!}}styles.ctaButton.fontSize | {{!}}styles.ctaButton.fontSize | ||
{{!}}string | {{!}}string | ||
− | {{!}}CSS 'font-size' property for the text in | + | {{!}}The CSS 'font-size' property for the text in CTA button. |
{{!}}n/a | {{!}}n/a | ||
{{!}}n/a | {{!}}n/a | ||
Line 561: | Line 561: | ||
|sectionHeading=API Events | |sectionHeading=API Events | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |structuredtext=Once you've registered your plugin on the bus, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus. | + | |structuredtext=Once you've {{Link-AnywhereElse|product=WID|version=Current|manual=SDK|topic=GWCBusAPIOverview#CXBus.registerPlugin|display text=registered your plugin on the bus}}, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus. |
− | {{NoteFormat|The global bus object is a debugging tool. When implementing | + | {{NoteFormat|The global bus object is a debugging tool. When implementing widgets on your own site, do not use the global bus object to register your custom plugins. Instead, see {{Link-AnywhereElse|product=WID|version=Current|manual=SDK|topic=GWCBusExtensions}} for more information about extending Genesys Widgets.|1}} |
<source lang="javascript"> | <source lang="javascript"> | ||
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin'); | var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin'); | ||
Line 576: | Line 576: | ||
{{!}}- | {{!}}- | ||
{{!}}ready | {{!}}ready | ||
− | {{!}}The Engage | + | {{!}}The Engage widget is initialized and ready to accept commands on the bus. |
{{!}}n/a | {{!}}n/a | ||
{{!}} | {{!}} | ||
{{!}}- | {{!}}- | ||
{{!}}opened | {{!}}opened | ||
− | {{!}}The Engage | + | {{!}}The Engage widget opens. |
Note: Applicable only to Engage.offer command | Note: Applicable only to Engage.offer command | ||
{{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | {{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | ||
Line 587: | Line 587: | ||
{{!}}- | {{!}}- | ||
{{!}}CTA | {{!}}CTA | ||
− | {{!}}When the user clicks | + | {{!}}When the user clicks the CTA button in the Engage widget. |
Note: Applicable only to Engage.offer command | Note: Applicable only to Engage.offer command | ||
{{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | {{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | ||
Line 593: | Line 593: | ||
{{!}}- | {{!}}- | ||
{{!}}hover | {{!}}hover | ||
− | {{!}}When the user first hovers over the Engage | + | {{!}}When the user first hovers over the Engage widget. |
Note: Applicable only to Engage.offer command | Note: Applicable only to Engage.offer command | ||
{{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | {{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | ||
Line 599: | Line 599: | ||
{{!}}- | {{!}}- | ||
{{!}}dismissed | {{!}}dismissed | ||
− | {{!}}When the user closes the Engage | + | {{!}}When the user closes the Engage widget by clicking the Close button. |
Note: Applicable only to Engage.offer command | Note: Applicable only to Engage.offer command | ||
{{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | {{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | ||
Line 605: | Line 605: | ||
{{!}}- | {{!}}- | ||
{{!}}closed | {{!}}closed | ||
− | {{!}}The Engage | + | {{!}}The Engage widget closes. |
Note: Applicable only to Engage.offer command | Note: Applicable only to Engage.offer command | ||
{{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | {{!}}[https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#Metadata Metadata] | ||
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}} | {{!}}} | ||
+ | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 615: | Line 616: | ||
|alignment=Vertical | |alignment=Vertical | ||
{{NoteFormat|Applicable only for Engage.offer command.}} | {{NoteFormat|Applicable only for Engage.offer command.}} | ||
− | |||
− | |||
− | |||
===Reference=== | ===Reference=== | ||
Line 624: | Line 622: | ||
!Type | !Type | ||
!Description | !Description | ||
− | !Introduced / Updated | + | !Introduced/Updated |
{{!}}- | {{!}}- | ||
{{!}}opened | {{!}}opened | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the | + | {{!}}Timestamp indicating when the offer was opened. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}closed | {{!}}closed | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the | + | {{!}}Timestamp indicating when the offer was closed. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}dismissed | {{!}}dismissed | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the user dismissed the | + | {{!}}Timestamp indicating when the user dismissed the offer by clicking the Close button. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
Line 648: | Line 646: | ||
{{!}}timeBeforeCTA | {{!}}timeBeforeCTA | ||
{{!}}integer (milliseconds) | {{!}}integer (milliseconds) | ||
− | {{!}}Total time in milliseconds from when the user opened the | + | {{!}}Total time in milliseconds from when the user opened the offer to when the CTA is triggered. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}timeFirstHover | {{!}}timeFirstHover | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the user first hovered over | + | {{!}}Timestamp indicating when the user first hovered over offer. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}timeBeforeHover | {{!}}timeBeforeHover | ||
{{!}}integer (milliseconds) | {{!}}integer (milliseconds) | ||
− | {{!}}Total time in milliseconds from when the user opened the | + | {{!}}Total time in milliseconds from when the user opened the offer to when the user first hovered over offer. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}timeElapsedHover | {{!}}timeElapsedHover | ||
{{!}}integer (milliseconds) | {{!}}integer (milliseconds) | ||
− | {{!}}Total time in milliseconds when the user hovered over | + | {{!}}Total time in milliseconds when the user hovered over offer. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
Line 676: | Line 674: | ||
{{NoteFormat|Applicable only for Engage.offer command.|1}} | {{NoteFormat|Applicable only for Engage.offer command.|1}} | ||
===Interaction Lifecycle=== | ===Interaction Lifecycle=== | ||
− | Every | + | Every offer interaction has a sequence of events we describe as the ''Interaction Lifecycle''. These events track progress and user choices from the beginning of an interaction (opening Offers), to the end (closing Offers), and every step in between. |
− | The following events | + | The following events comprise the Interaction Lifecycle: |
<source lang="LANGUAGE">ready | <source lang="LANGUAGE">ready | ||
opened | opened | ||
Line 685: | Line 683: | ||
dismissed | dismissed | ||
closed</source> | closed</source> | ||
− | ===Lifecycle | + | ===Lifecycle scenarios=== |
− | An Interaction Lifecycle can vary based on each user's intent and experience with the Offer | + | An Interaction Lifecycle can vary based on each user's intent and experience with the Offer widget. Here are several sequences of events in the lifecycle that correspond to different scenarios. |
− | The user opened the Offer | + | The user opened the Offer widget but changed their mind and closed it without seeing the offer details: |
<source lang="LANGUAGE">ready -> opened -> dismissed -> closed | <source lang="LANGUAGE">ready -> opened -> dismissed -> closed | ||
</source> | </source> | ||
− | The user opened the Offer | + | The user opened the Offer widget, hovered over the offer details, and then closed it: |
<source lang="LANGUAGE">ready -> opened -> hover -> dismissed -> closed | <source lang="LANGUAGE">ready -> opened -> hover -> dismissed -> closed | ||
</source> | </source> | ||
− | The user opened the Offer | + | The user opened the Offer widget and clicked on the button, which triggers CTA: |
<source lang="LANGUAGE">ready -> opened -> CTA -> closed | <source lang="LANGUAGE">ready -> opened -> CTA -> closed | ||
</source> | </source> | ||
− | + | For a list of all Offer events, see [https://all.docs.genesys.com/Draft:WID/Current/SDK/Engagement-combined#API_Events API Events]. | |
===Metadata=== | ===Metadata=== | ||
Each event in the Interaction Lifecycle includes the following block of metadata. By default, all values are set to false. As the user progresses through the lifecycle of an Offer Engage interaction, these values are updated. | Each event in the Interaction Lifecycle includes the following block of metadata. By default, all values are set to false. As the user progresses through the lifecycle of an Offer Engage interaction, these values are updated. | ||
− | The metadata block contains | + | The metadata block contains Boolean state flags, timestamps, and elapsed times. These values can be used to track and identify trends or issues with interactions. During runtime, the metadata can help you offer a smart and dynamic experience to your users. |
===Reference=== | ===Reference=== | ||
{{{!}} class="wikitable" | {{{!}} class="wikitable" | ||
Line 711: | Line 709: | ||
{{!}}opened | {{!}}opened | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the | + | {{!}}Timestamp indicating when the offer was opened. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}closed | {{!}}closed | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the | + | {{!}}Timestamp indicating when the offer was closed. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}dismissed | {{!}}dismissed | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the user dismissed the | + | {{!}}Timestamp indicating when the user dismissed the offer by clicking the close button. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
Line 731: | Line 729: | ||
{{!}}timeBeforeCTA | {{!}}timeBeforeCTA | ||
{{!}}integer (milliseconds) | {{!}}integer (milliseconds) | ||
− | {{!}}Total time in milliseconds from when the user opened the | + | {{!}}Total time in milliseconds from when the user opened the offer to when the CTA is triggered. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}timeFirstHover | {{!}}timeFirstHover | ||
{{!}}integer (timestamp) | {{!}}integer (timestamp) | ||
− | {{!}}Timestamp indicating when the user first hovered over | + | {{!}}Timestamp indicating when the user first hovered over the offer. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}timeBeforeHover | {{!}}timeBeforeHover | ||
{{!}}integer (milliseconds) | {{!}}integer (milliseconds) | ||
− | {{!}}Total time in milliseconds from when the user opened the | + | {{!}}Total time in milliseconds from when the user opened the offer to when the user first hovered over the offer. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}timeElapsedHover | {{!}}timeElapsedHover | ||
{{!}}integer (milliseconds) | {{!}}integer (milliseconds) | ||
− | {{!}}Total time in milliseconds when the user hovered over | + | {{!}}Total time in milliseconds when the user hovered over the offer. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}- | {{!}}- | ||
{{!}}elementClicked | {{!}}elementClicked | ||
{{!}}string | {{!}}string | ||
− | {{!}}Name of CTA element that was clicked | + | {{!}}Name of CTA element that was clicked. |
{{!}}9.0.015.04 | {{!}}9.0.015.04 | ||
{{!}}} | {{!}}} |
Revision as of 22:09, February 27, 2020
Contents
Learn how to use the Genesys Engage plugin to integrate any Engage solution with Genesys Widgets.
Overview
The Genesys Engage plugin is generic and contains commands that automate customer engagement within Genesys Widgets. Starting with version 9.0.015.11, the Engage plugin includes Offers, which allows a customer to view a product or promotion on a page. It comes with many display modes and rendering options, such as overlay/toaster mode with text or image-only layouts, or both.
Usage
Use the Engage plugin to show either an invite or an offer via the following methods:
- Calling the Engage.invite command
- Calling the Engage.offer command
Namespaces
The Engage plugin uses the following namespaces.
Type | Namespace |
---|---|
i18n - Localization | Engage |
CXBus - API Commands & API Events | Engage |
CSS | .cx-engage |
Screenshots
Engage Invite
Engage Offer
Configuration
The Genesys Engage plugin doesn't have any configuration options.
Localization
The Genesys Engage plugin doesn't have any localization options.
API Commands
Once you've registered your plugin on the bus, you can call commands on other registered plugins. Here's how to use the global bus object to register a new plugin on the bus.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.command('Engage.invite');
invite
Opens the Engage Widget and renders the text based on the options provided. If no options are provided, the widget doesn't open.
Example
oMyPlugin.command('Engage.invite', {
'type':'toast',
'timeout':3000,
'title':'Engage Title',
'body':'Engage invite body content',
'accept':'Yes',
'decline':'No, thanks',
'command': 'WebChat.open',
'options':{'proactive'; true, 'userData': {'category': 'shoes'}}
});
oMyPlugin.command('Engage.invite',{
'type':'toast',
'timeout':3000,
'title':'Engage Title',
'body':'Engage invite body content',
'accept':'Yes',
'decline':'No, thanks'
}).done(function(response){
// Act upon the received response code
switch(response){
case 'accepted':oMyPlugin.command('WebChat.open');
break;
case 'declined': break;
case 'closed': break;
case 'timeout': break;
}
});
Options
Option | Type | Description | Accepted Values |
---|---|---|---|
type | string | Widget display type. | toast |
timeout | number | Timeout integer in milliseconds. | n/a |
title | string | String for widget title. | n/a |
body | string | String for offer body text. | n/a |
accept | string | String for Accept button text. | n/a |
decline | string | String for Decline button text. | n/a |
command | string | Command to execute. | n/a |
options | object | Options related to the command provided. | n/a |
Resolutions
Status | When | Returns |
---|---|---|
resolved | When engage invite is accepted by user. | accepted |
resolved | When engage invite is declined by user. | declined |
resolved | When engage invite widget is closed by user. | closed |
resolved | When engage invite widget closes due to timeout. | timeout |
offer
Opens a widget for a product offer using the data sent through the command options provided below. The widget can include both rendering options and the actual data that needs to be displayed in the Offer Widget. If no options are provided, the widget will not open.
Example
oMyPlugin.command('Engage.offer', {
mode:'overlay',
modal:true,
layout:'leftText',
title: 'GRAB WHAT YOU NEED!!',
headline:'We Got All!',
description:'Get free NextDay delivery on orders of $35 or more. Start shopping now!',
cta:{
text:'Join',
url:'https://www.genesys.com',
target:'_blank'
},
image:{
src:'https://picsum.photos/id/237/300/300',
alt:'Alternate Text for Image'
},
styles:{
closeButton:{
'color':'red'
}
}
});
Options
Option | Type | Description | Accepted values | Default | Introduced/Updated |
---|---|---|---|---|---|
mode | string | The display type of the Offer widget. | overlay, toaster | toaster | 9.0.015.04 |
modal | boolean | Applicable only when mode is 'overlay'. A smokescreen will be shown in the background of overlay modal window. This window can be dismissed by clicking anywhere in the smokescreen area. | n/a | false | 9.0.015.04 |
layout | string | Additional layout options are supported for all modes. | minimal, leftText, rightText, topText, bottomText | leftText | 9.0.015.04 |
headline | string | The Offer title header text. | n/a | n/a | 9.0.015.04 |
description | string | The Offer body description text. | n/a | n/a | 9.0.015.04 |
cta | object | An object containing HTML attributes and/or CXBus commands for the CTA (call to action) button. | n/a | n/a | 9.0.015.04 |
cta.text | string | The CTA button text. | n/a | n/a | 9.0.015.04 |
cta.url | string | The URL string for the CTA button.
Note: The URL must be properly defined with the complete Protocol URL Address. For example, https://www.genesys.com. |
_blank, _parent, _self, _top, framename | n/a | 9.0.015.04 |
cta.target | string | Specifies where the URL is opened. | n/a | n/a | 9.0.015.04 |
cta.command | string | A CXBus command to execute. | n/a | n/a | 9.0.015.04 |
cta.commandOptions | string | Options related to CXBUs command. | n/a | n/a | 9.0.015.04 |
image | object | An object containing image tag attributes. | n/a | n/a | 9.0.015.04 |
image.src | string | The URL of the image. | n/a | n/a | 9.0.015.04 |
image.alt | string | Alternate text for the image. | n/a | n/a | 9.0.015.04 |
insertAfter | string | Applicable only in mobile mode. An ID or class name of an HTML selector from the host page. The offer will be inserted after this element. Precede the value mentioned here with the standard Class ('.') and ID selector ('#') character. | n/a | n/a | 9.0.015.04 |
insertBefore | string | Applicable only in mobile mode. An ID or class name of an HTML selector from the host page. The offer will be inserted before this element. Precede the value mentioned here with the standard Class ('.') and ID selector ('#') character. | n/a | n/a | 9.0.015.04 |
insertInto | string | Applicable only in mobile mode. An ID or class name of an HTML selector from the host page. The offer will be appended inside this element. Precede the value mentioned here with the standard Class ('.') and ID selector ('#') character. | n/a | n/a | 9.0.015.04 |
styles | object | An object containing styles for the offer content. | n/a | n/a | 9.0.015.04 |
styles.closeButton | object | An object containing styles for the close button. | n/a | n/a | 9.0.015.04 |
styles.closeButton.color | string | The color of the close button. | n/a | n/a | 9.0.015.04 |
styles.closeButton.opacity | number | The CSS 'opacity' property for the close button. | n/a | n/a | 9.0.015.04 |
styles.overlay | object | An object containing styles for the overlay container. | n/a | n/a | 9.0.015.04 |
styles.overlay.top | string | The CSS 'top' property for the overlay container. | n/a | n/a | 9.0.015.04 |
styles.overlay.right | string | The CSS 'right' property for the overlay container. | n/a | n/a | 9.0.015.04 |
styles.overlay.bottom | string | The CSS 'bottom' property for the overlay container. | n/a | n/a | 9.0.015.04 |
styles.overlay.left | string | The CSS 'left' property for the overlay container.
Note: When all the position values are provided, the order of precedence will be top, right, bottom, and left. |
n/a | n/a | 9.0.015.04 |
styles.overlay.center | boolean | Aligns the overlay container to the center of the screen. | n/a | true | 9.0.015.04 |
styles.offer | object | An object containing styles for the Offer window. | n/a | n/a | 9.0.015.04 |
styles.offer.backgroundColor | string | The background color of the offer. | n/a | n/a | 9.0.015.04 |
styles.offer.color | string | The text color of the offer. | n/a | n/a | 9.0.015.04 |
styles.offer.padding | string | The padding for the offer container. | n/a | 0 | 9.0.015.04 |
styles.title | object | An object containing styles for the title. | n/a | n/a | 9.0.015.04 |
styles.title.font | string | The CSS 'font' property for the title. | n/a | n/a | 9.0.015.04 |
styles.title.textAlign | string | The CSS 'text-align' property for the title. | n/a | n/a | 9.0.015.04 |
styles.headline | object | An object containing styles for the header text. | n/a | n/a | 9.0.015.04 |
styles.headline.font | string | The CSS 'font' property for the header text. | n/a | n/a | 9.0.015.04 |
styles.headline.textAlign | string | The CSS 'text-align' property for the header text. | n/a | n/a | 9.0.015.04 |
styles.description | object | An object containing styles for the offer description text. | n/a | n/a | 9.0.015.04 |
styles.description.font | string | The CSS 'font' property for the description text. | n/a | n/a | 9.0.015.04 |
styles.description.textAlign | string | The CSS 'text-align' property for the description text. | n/a | n/a | 9.0.015.04 |
styles.ctaButton | object | An object containing styles for call to action button in the offer window. | n/a | n/a | 9.0.015.04 |
styles.ctaButton.font | string | The CSS 'font' property for the text in CTA button. | n/a | n/a | 9.0.015.04 |
styles.ctaButton.textAlign | string | The CSS 'text-align' property for the text in CTA button. | n/a | n/a | 9.0.015.04 |
styles.ctaButton.background | string | The CSS 'background' property for the CTA button. | n/a | n/a | 9.0.015.04 |
styles.ctaButton.color | string | The CSS 'color' property for the text in CTA button. | n/a | n/a | 9.0.015.04 |
styles.ctaButton.fontSize | string | The CSS 'font-size' property for the text in CTA button. | n/a | n/a | 9.0.015.04 |
API Events
Once you've registered your plugin on the bus, you can subscribe to and listen for published events. Here's how to use the global bus object to register a new plugin on the bus.
var oMyPlugin = window._genesys.widgets.bus.registerPlugin('MyPlugin');
oMyPlugin.subscribe('Engage.ready', function(e){});
Name | Description | Data | Introduced/Updated |
---|---|---|---|
ready | The Engage widget is initialized and ready to accept commands on the bus. | n/a | |
opened | The Engage widget opens.
Note: Applicable only to Engage.offer command |
Metadata | 9.0.015.04 |
CTA | When the user clicks the CTA button in the Engage widget.
Note: Applicable only to Engage.offer command |
Metadata | 9.0.015.04 |
hover | When the user first hovers over the Engage widget.
Note: Applicable only to Engage.offer command |
Metadata | 9.0.015.04 |
dismissed | When the user closes the Engage widget by clicking the Close button.
Note: Applicable only to Engage.offer command |
Metadata | 9.0.015.04 |
closed | The Engage widget closes.
Note: Applicable only to Engage.offer command |
Metadata | 9.0.015.04 |
Metadata
Interaction Lifecycle
Every offer interaction has a sequence of events we describe as the Interaction Lifecycle. These events track progress and user choices from the beginning of an interaction (opening Offers), to the end (closing Offers), and every step in between.
The following events comprise the Interaction Lifecycle:
ready
opened
CTA
hover
dismissed
closed
Lifecycle scenarios
An Interaction Lifecycle can vary based on each user's intent and experience with the Offer widget. Here are several sequences of events in the lifecycle that correspond to different scenarios.
The user opened the Offer widget but changed their mind and closed it without seeing the offer details:
ready -> opened -> dismissed -> closed
The user opened the Offer widget, hovered over the offer details, and then closed it:
ready -> opened -> hover -> dismissed -> closed
The user opened the Offer widget and clicked on the button, which triggers CTA:
ready -> opened -> CTA -> closed
For a list of all Offer events, see API Events.
Metadata
Each event in the Interaction Lifecycle includes the following block of metadata. By default, all values are set to false. As the user progresses through the lifecycle of an Offer Engage interaction, these values are updated.
The metadata block contains Boolean state flags, timestamps, and elapsed times. These values can be used to track and identify trends or issues with interactions. During runtime, the metadata can help you offer a smart and dynamic experience to your users.
Reference
Name | Type | Description | Introduced/Updated |
---|---|---|---|
opened | integer (timestamp) | Timestamp indicating when the offer was opened. | 9.0.015.04 |
closed | integer (timestamp) | Timestamp indicating when the offer was closed. | 9.0.015.04 |
dismissed | integer (timestamp) | Timestamp indicating when the user dismissed the offer by clicking the close button. | 9.0.015.04 |
triggeredCTA | integer (timestamp) | Timestamp indicating when the CTA was triggered. | 9.0.015.04 |
timeBeforeCTA | integer (milliseconds) | Total time in milliseconds from when the user opened the offer to when the CTA is triggered. | 9.0.015.04 |
timeFirstHover | integer (timestamp) | Timestamp indicating when the user first hovered over the offer. | 9.0.015.04 |
timeBeforeHover | integer (milliseconds) | Total time in milliseconds from when the user opened the offer to when the user first hovered over the offer. | 9.0.015.04 |
timeElapsedHover | integer (milliseconds) | Total time in milliseconds when the user hovered over the offer. | 9.0.015.04 |
elementClicked | string | Name of CTA element that was clicked. | 9.0.015.04 |