Hello everyone,
We are implementing a web messaging custom button for our client.
It has to have database.set command to parse data.
And to launch the messenger on button click.
The bug that we have noticed is that when the button shows before web messaging is ready, it creates error:
could not load plugin
could not register plugin - MessagingService
and sometimes it works, sometimes it does not. So we wanted to avoid showing the button before the messenger is fully loaded.
We tried the following:
Using only Messenger.ready, bug that MessagingService plugin is not registered is shown.
If we try to wait for MessagingService.ready event, than messenger wont work if there is no history. So. it only works if there is an conversation active.

If we reload the page or move through pages on portal, the following error occurs (and I believe it is related to the database.set command being called before all of messenger is loaded):
genesys.min.js:10 TypeError: Cannot read properties of null (reading 'appendChild')
We decided to use promises because of Database.set not populating on time.
Can you please check if this code is something that is valid, using timeout and promises? Or if you have any other suggestion, please let me know.

Thank you!
#ConversationalAI(Bots,AgentAssist,etc.)------------------------------
Marija Kovrlija
Star Telecom
------------------------------