Difference between revisions of "ATC/Current/SDK/Use Events methods with web actions"
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2") |
(Published) |
||
Line 6: | Line 6: | ||
|Dimension=WebActions | |Dimension=WebActions | ||
|ComingSoon=No | |ComingSoon=No | ||
− | |Platform=GenesysEngage-cloud | + | |Platform=PureConnect, GenesysCloud, GenesysEngage-cloud |
− | |||
|Section={{Section | |Section={{Section | ||
+ | |sectionHeading=About web messaging | ||
+ | |anchor=WebMessaging | ||
+ | |alignment=Vertical | ||
+ | |structuredtext={{BarbFeatureTemp|Feature=Web messaging}}This article only applies to customers using web chat. If you are a Genesys Cloud customer, we encourage you to use the new {{Link-AnywhereElse|product=ATC|version=Current|manual=AdminGuide|topic=About_web_messaging|display text=web messaging}} feature to replace web chat. | ||
+ | |Status=No | ||
+ | }}{{Section | ||
|sectionHeading=Event methods for web actions | |sectionHeading=Event methods for web actions | ||
|anchor=WebActionMethods | |anchor=WebActionMethods | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=To capture information about events that occur during the lifecycle of a web action, use the Events methods shown in the following table. | |structuredtext=To capture information about events that occur during the lifecycle of a web action, use the Events methods shown in the following table. | ||
{{{!}} class="wikitable" | {{{!}} class="wikitable" | ||
Line 36: | Line 39: | ||
{{!}}} | {{!}}} | ||
<br /> | <br /> | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 43: | Line 44: | ||
|anchor=WebActionMediaTypes | |anchor=WebActionMediaTypes | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=<br /> | |structuredtext=<br /> | ||
{{{!}} class="wikitable" | {{{!}} class="wikitable" | ||
Line 61: | Line 60: | ||
{{!}}} | {{!}}} | ||
<br /> | <br /> | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 68: | Line 65: | ||
|anchor=EventsWebActions | |anchor=EventsWebActions | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=The following table lists the events that you can use with {{Link-SomewhereInThisVersion|manual=SDK|topic=Use_Events_methods_with_web_actions|anchor=WebActionMethods|display text=Events methods for web actions}}. Event information returned includes the action state, customer ID, session ID, and action map ID. | |structuredtext=The following table lists the events that you can use with {{Link-SomewhereInThisVersion|manual=SDK|topic=Use_Events_methods_with_web_actions|anchor=WebActionMethods|display text=Events methods for web actions}}. Event information returned includes the action state, customer ID, session ID, and action map ID. | ||
{{{!}} class="wikitable" | {{{!}} class="wikitable" | ||
Line 117: | Line 112: | ||
{{!}}Error message for any exceptions caught during presentation of the action. | {{!}}Error message for any exceptions caught during presentation of the action. | ||
{{!}}} | {{!}}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 124: | Line 117: | ||
|anchor=CaptureMore | |anchor=CaptureMore | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=The Web Action Events API can be used with Genesys Widgets commands to enrich events with more data that may be useful. | |structuredtext=The Web Action Events API can be used with Genesys Widgets commands to enrich events with more data that may be useful. | ||
Line 139: | Line 130: | ||
}); | }); | ||
</syntaxhighlight>{{NoteFormat|The data returned by WebChatService.getSessionData will differ based on your Genesys platform.}} | </syntaxhighlight>{{NoteFormat|The data returned by WebChatService.getSessionData will differ based on your Genesys platform.}} | ||
− | |||
− | |||
|Status=No | |Status=No | ||
}} | }} | ||
}} | }} |
Revision as of 13:21, December 15, 2020
Contents
Use Events methods to subscribe to events that occur during the lifecycle of Genesys Predictive Engagement web actions such as web chats and content offers. This raw data can be streamed to third-party analytics platforms or to tag management platform data layers for use in analytics and reporting platforms.
About web messaging
This article only applies to customers using web chat. If you are a Genesys Cloud customer, we encourage you to use the new web messaging feature to replace web chat.
Event methods for web actions
To capture information about events that occur during the lifecycle of a web action, use the Events methods shown in the following table.
Method | Description |
---|---|
Subscribe to start receiving events for a given type of web action in a given state. | |
Receive events for only the first occurrence of a given type of web action in a given state. | |
Unsubscribe to stop receiving events for a given type of web action in a given state. |
Media types, lifecycle states, and code examples using Events methods
Media type | Lifecycle states | Code examples |
---|---|---|
contentoffer | Content offers lifecycle | Examples: Events methods with content offers |
webchat | Web chat lifecycle | Examples: Events methods with web chats |
Event types for web actions
The following table lists the events that you can use with Events methods for web actions. Event information returned includes the action state, customer ID, session ID, and action map ID.
Event | Data type | Description |
---|---|---|
actionId | UUIDv4 | Unique Id for a specific Predictive Engagement action. |
actionState | String | Current state of the action. For example, offered. |
actionMediaType | String | The engagement type. For example, webchat. |
actionMapId | UUIDv4 | Id of the action map that qualified/triggered this action. |
actionMapVersion | Integer | Version of the action map. |
customerId | UUIDv4 | Stable identifier of the customer. For example, a cookie Id. |
customerIdType | String | The specific type of customer identifier (always "cookie"). |
sessionId | UUIDv4 | Identifier of the customer's current web session. |
errorCode | Integer | Status code for any exceptions caught during presentation of the action. |
errorMessage | String | Error message for any exceptions caught during presentation of the action. |
Capture more data with Genesys widgets
The Web Action Events API can be used with Genesys Widgets commands to enrich events with more data that may be useful.
For example, the Genesys CloudconversationId
may be useful in an analytics context. For more information on the Widgets API, see API Commands.ac('on', 'webchat:all', (evt) => {
_genesys.widgets.bus.command('WebChatService.getSessionData').then((data) => {
if (data.conversationId) {
evt.conversationId = data.conversationId;
}
someAnalyticsProvider.send(evt);
})
});