Difference between revisions of "ATC/Current/SDK/Use Events methods with content offers"
From Genesys Documentation
m (Text replacement - "\|Platforms?=([^\|]*)PureCloud([\|]*)" to "|Platform=$1GenesysCloud$2") |
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2") |
||
Line 6: | Line 6: | ||
|Dimension=WebActions | |Dimension=WebActions | ||
|ComingSoon=No | |ComingSoon=No | ||
− | |Platform=GenesysEngage- | + | |Platform=GenesysEngage-cloud, PureConnect, GenesysCloud |
|Prereq= | |Prereq= | ||
|Section={{Section | |Section={{Section |
Revision as of 02:33, July 25, 2020
This topic is part of the manual Journey JavaScript SDK for version Current of Genesys Predictive Engagement.
Contents
See examples how how to use Events methods with content offers.
Subscribe to offered events
ac('on', 'contentoffer:offered', (event) => {
console.log('received %s:%s event', event.actionMediaType, event.actionState, event);
});
Subscribe to accepted events
ac('on', 'contentoffer:accepted', (event) => {
console.log('received %s:%s event', event.actionMediaType, event.actionState, event);
});
Subscribe to rejected events
ac('on', 'contentoffer:rejected', (event) => {
console.log('received %s:%s event', event.actionMediaType, event.actionState, event);
});
Subscribe to ignored events
ac('on', 'contentoffer:ignored', (event) => {
console.log('received %s:%s event', event.actionMediaType, event.actionState, event);
});
Subscribe to errored events
ac('on', 'contentoffer:errored', (event) => {
console.log('received %s:%s event', event.actionMediaType, event.actionState, event);
});
Subscribe to all content offer events
ac('on', 'contentoffer:all', (event) => {
console.log('received %s:%s event', event.actionMediaType, event.actionState, event);
});
Unsubscribe from content offers in the offered state
ac('off', 'contentoffer:offered', eventHandler); // unsubscribes `eventHandler` from 'contentoffer:offered' events
Comments or questions about this documentation? Contact us for support!