Hi Tiziano
to start: just force hide the native GPE offers on the website via CSS:
.genesys-app:not(#genesys-messenger) {
display: none;
}
This will hide the native offers, but not the Messenger.
Then use the SDK commands to subscribe to the events.
Save the data you get from Journey.qualifiedContentOffer, you will need to refer to the
journeyContext.triggeringAction.id when you are sending back events to Genesys via Journey.recordActionStateChange.
Send a 'offered" event when displaying your custom Offer. (when hiding the native offers, sometimes this doesn't happen automatically).
Send "accepted" when the user clicks on the main CTA button.
Send "rejected" when the user closes the offer via a X button.
Also, final recommendation is to avoid using Webmessaging offers when implementing custom rendering. Just still use a content offer, and on the main CTA button implement a command to open the Webmessenger ( Genesys('command', 'Messenger.open') ) in addition to track the accepted status as above.
------------------------------
Michele Scala
Solutions Architect
------------------------------