Giter Site home page Giter Site logo

Comments (2)

nachio avatar nachio commented on May 30, 2024 1

This is amazing. Thank you so much for the pointers and an overview. Enough to get me on my way. Thanks again!

from smooch-bot-example.

alavers avatar alavers commented on May 30, 2024

Can all this (full screen, let the bot initiate the conversation and show a typing indicator) be achieved with this framework?

In short, yes, but much of the onboarding UI was heavily customized and is not reusable, so you would have to do much of it yourself.

The conversation script of the Smooch onboarding uses this state machine model, so that part would be easy to do. However, from your questions it sounds like you're interested in the UI as well. The onboarding chat UI was derived from our web widget, smooch/smooch-js, but it was very heavily modified, things like setting up a Smooch app using your company name and automatically detecting when certain steps were completed, all of that was custom built front and back for the specific onboarding experience we wanted.

The goal of smooch/smooch-bot however is to be a offer a more generic framework, without any assumptions made about the UI.

With that said, I can give you some pointers.

  1. Without any code changes you can run the smooch/smooch-js widget in full screen by running it in embedded mode.

  2. Simulating the bot's typing indicators requires a little more work. The way we did this was very hackish to be honest. We set a kind of "bot will respond" flag in each bot message's metadata and assuming that flag was there we rendered a fake typing indicator client side as soon as the user sent a message.

  3. The bot response delay is also simulated. We compute the delay based on the length of the bot's message. You can do this easily in your bot's say() implmementation by simply delaying the promise resolution with Q.delay, or your own favorite promise implementation.

  4. Finally, the immediate first message you see in the onboarding experience is actually implemented as a Smooch whisper, which we trigger with a track call.

I hope that gives you something useful to work off of :)

from smooch-bot-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.