smooch - How to clear web messenger chat history for anonymous users

I am using the web messenger SDK and I need a way to clear the users chat history. I am unable to authenticate the user and therefore can't see a way to use the api. Is there a prefered way to do this with any built in methods or should I set something up to delete local storage?Just to clarify I can't authorise the user or set a JWT. I only have any information I can obtain from the web messenger SKD....Read more

How to block user - spammer in Smooch

I am using Smooch to integrate Whatsapp and Facebook with my API. Is there a way to block some users on Smooch side so that my API doesn't get any messages from them anymore or should I do it on my backend side?In the docs there is mentioned a blocked flag for Client Schemaso it might suggest it could be doable on the Smooch side....Read more

Smooch API for Twitter - ConsumerKey Mismatch errors

BackgroundI have set up a Twitter app & sandbox dev environment, from which I have a dev environment label ('prod'), consumer API key ('abcdefghijk') and an API secret key.Using OAUTH I then obtained an access token & secret for the Twitter account I want to access using Twitter's Account Activity API.Finally, using the Smooch API in node.js I have added the Twitter integration to one of my Smooch apps as follows:smooch.integrations.create({ appId: SMOOCH_APP_ID, props: { type: 'twitter', tier: 'sandbox', envName: 'prod', ...Read more

Building a bot with Smooch

I'm a first time user on Smooch. Can the Smooch platform itself be used to build a bot? In other words, can I define an intent/flow on Smooch platform itself or does it simply connect to other services?...Read more

How to use Smooch postbacks?

I can't seem to find any documentation on how to actually use the postabck feature. Does it call functions on the server? What does ti do with the pasees value?%[Button label here](postback:PAYLOAD_HERE) // What is the payload?...Read more

How to add admin chat UI using smooch?

I'm looking forward to implement chat window for admin where admin can reply to all customers. I am able to integrate chat with slack channel where admin can reply,But I couldn't find any inbuilt tool/plugin(web) available to implement that. Also didn't find any way to create a group chat....Read more

How to set up a pre-chat form in Smooch web messenger

I'd like to ask users for their name and email when they open the Smooch web widget, before the chat can be started. Similar to what Frank & Oak does:'m not very technical but can find my way around some HTML, CSS and even some javascript. I was hoping someone at Smooch would see my post and provide me with guidance on how to implement this :)I'd need the name and email to be sent to Front (which I'm using to handle Smooch messages).I know this might be a lot to ask, but if you find the time to help me, you ...Read more

smooch web messenger embedded mode no longer working?

I've updated the code for embedded mode according to the smooch documentation this page it is no longer working, just displays as default.Has this error in console Uncaught TypeError: Cannot read property 'appendChild' of null at Object.render (web-messenger.js:88) at e.__onWebMessengerHostReady__ ((index):141) at Object.<anonymous> (index.js:4) at Object.<anonymous> (smooch.4.0.4.min.js:178) at e (bo...Read more

Smooch: How to trigger postback when user clicks a button?

I have some questions about the postback button.We are developing independent-built, own Web Messenger using Smooch.I am making an API call using Smooch-core. ( like below )this.smooch = await new SmoochCore({ keyId: SMOOCH_KEY_ID, secret: SMOOCH_SECRET, .... });...await this.smooch.appUsers.sendMessage(this.appId, this.userId, message);The problem is that it works differently from our intent when we render and tap the button.To create a button in the Messenger window, app maker sends a message with a postback type action, receives th...Read more

How to append the Smooch web-messenger-container element to a custom element

I want to be able to append the #web-messenger-container element to an element instead of the document.body.I've tried using Smooch.render without setting the embedded attribute to true and it works fine on some browsers, but on others, the smooch CDN calls are cancelled. It is related with this issue: don't want to use embedded mode, I just want to move the Smooch button to another container. I've tried moving the iframe element with JS but it causes the iframe to reload and the Smooch window di...Read more

smooch - Linking not supported for whatsapp sandbox integrations

I'm trying to follow this guide to start business initiated conversation in WhatsApp. I successfully created the user in the first step, but I cannot link it to the WhatsApp channel.I'm calling API POST request:{myAppID}/appusers/{myUserID}/channelsWith body:{ "type":"whatsapp", "confirmation":{"type":"immediate"}, "phoneNumber":"phoneNumberInInternationalFormat"}But result is:{ "error": { "code": "bad_request", "description": "Linking not supported for whatsapp sandbox integrations." ...Read more