...

Halloween Chatbot Experience: Technical Guidelines

Illustrator: Jana Pérez
halloween bot experience tutorial

Please note that 'Variables' are now called 'Fields' in Landbot's platform.

Please note that 'Variables' are now called 'Fields' in Landbot's platform.

As promised, we have put together a guide to the more technical bits of our Halloween chatbot campaign. You can find how to reproduce the game narrator experience propelled by user prompts; how to leverage the HTML5 game framework as well as how to achieve direct communication between a Javascript module in Landbot and other modules.

If you have questions that we failed to address in this little guide, please submit them via the bot at the bottom of the article.

How to Achieve Game-Like Narrator Experience?

Looking at any adventure game, you will notice the messages from the narrator, the guide, appear at the bottom of the screen. The conversation is not just a way to educate the player but to move the game forward. Each message such as enter command, screen touch, etc. expects a user interaction.

To achieve this effect in Landbot we used RxJS, which is a library specialized in software programming based on events and asynchrony through observable sequences.import { fromEvent } from 'rxjs';
fromEvent(document, 'click').subscribe(() => console.log('Clicked!'));With the Landbot 3.0 release, we also launched @landbot/core, which handles connectivity operations and facilitates the use of asynchronous message reception.@landbot/core uses RxJS internally to generate an observable which objective is to emit the messages it receives from the database in real-time, whether from a bot, an agent, or the end-user.import Core from '@landbot/core';
import * as firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';

const core = new Core({
 firebase: firebase, // required
 brandID: 12235, // required
 channelToken: 'H-504749-YPHR4CX6K7LGJLXB', // required
});
core.pipelines.$sequence.subscribe((message) => console.log(message));
core.init();
For more information about the @landbot/core library, see the technical documentation.

To design an adventure-game-style conversational experience, we combined the two observables, so that each message appeared every time the user clicked on the document.import { of, fromEvent } from 'rxjs';
import { delayWhen, filter, concatMap } from 'rxjs/operators';

const clicks = fromEvent(document, 'click').subscribe(() => console.log('Clicked!'));

core.pipelines.$sequence.pipe(
 filter(supportedMessages),
 concatMap(message => {
   if (message.action === 'script') {
     // Code blocks are not visible and don't require user interaction
     return of(message);
   } else {
     return of(message).pipe(delayWhen(() => clicks))
   }
 })
);

/**
* Basic support for text, buttons and code blocks from the builder.
*/
function supportedMessages(message) {
 return ['text', 'dialog', 'hidden'].includes(message.type);
}Live example:

How to Apply an HTML5 Game Framework?

Developing games for HTML5 was quite simple thanks to Phaser, a free 2D game framework used to simplify the development of HTML5 games for both desktop and mobile.

To develop the Halloween chatbot experience, we only needed to know and apply the most basic aspects. And, of course, many graphic assets provided by our spectacular in-house graphic designer.

The following code snippet shows one of the usage examples. All in all, with just a few lines of code, we were able to create amazing effects:

Landbot + Phaser - Javascript Execution

There are many ways to achieve direct communication between a Javascript module (Landbot) and other modules, but probably the easiest is to expose the functions we want to execute in the "global scope".

In the code snippet below, we show an example from the game that connects Landbot with the game development engine.

The game module exposes a series of functions ('moveLeft', 'moveRight', 'jump') that are executed after the conversation reaches a specific point (message block) thanks to the code blocks that follow.

Notes:

The execution of the code blocks is carried out through 'eval ()', since it’s not a web application that handles credentials or sensitive data.

Frequently Asked Questions about Landbot Pricing

What’s a Landbot chatbot template?

There are three ways to go about building a conversational app with Landbot:

1 - Do it all from scratch but still without coding

2 - Use only a few pre-made elements (bricks)

3 - Pick and customize a pre-designed template


There’s no need to reinvent a flow if our conversational experience designers already built a chatbot template for your use case. Before committing to a free sign up or a specific template, you can always use the preview function to try out the end-user experience. When you do load your chosen template, you’ll see the conversational flow all set up for you with guiding notes when needed.

All you have to do is customize the content inside the flow that’s already there. Edit the text, images, gifs, and links in the blocks so they fit your brand and product!

What’s the difference between a chat, a WhatsApp chat, and an AI chat?
  • A chat in Landbot represents a structured conversation between your bot and an end user, following a rule-based flow for web chatbots. It guides the user through specific tasks using buttons, keyword triggers, and decision trees with predetermined responses.

  • A WhatsApp chat in Landbot is a conversation between your bot and an end user on WhatsApp, following Meta’s messaging rules. When an end user messages your bot, a 24-hour window opens, allowing free responses, and the interaction counts as a WhatsApp chat in your Landbot plan. After 24 hours of inactivity, only pre-approved Message Templates can be sent, which you can manage directly in the Landbot platform.

  • AI chats incorporate AI functionalities, leveraging Landbot’s AI feature blocks or AI Assistants for lead generation, FAQs, or appointment booking. This enables the bot to understand intent and provide personalized, real-time responses instead of relying solely on predefined flows. AI chats are tracked and billed separately from regular chats and WhatsApp chats.

What is considered a “seat” in a Landbot plan?

A seat refers to a user license that grants an individual access to the Landbot platform under a specific account. Each seat allows one team member to log in, build, manage, and collaborate on chatbots. The number of seats included depends on your subscription plan, and additional seats can be purchased on all paid plans.

What subscription plans does Landbot offer?
  • Starter: Ideal for individuals and small businesses looking to create website chatbots effortlessly.

  • WhatsApp Starter: Perfect for small teams and businesses automating conversations across websites, Messenger, and WhatsApp.

  • Pro: Great for growing teams that need advanced features, automation, and integrations for website chatbots.

  • WhatsApp Pro: Best for businesses looking to scale customer interactions on WhatsApp with automation and rich messaging capabilities.

  • Business: Tailored for enterprises that require a fully customized chatbot solution with premium support and integrations for all channels.

How does the 14-day free trial work?

New sign-ups to the Landbot platform receive a 14-day free trial with access to all Landbot features and channels. After this period, the account is automatically downgraded to the Sandbox (Free) plan, which has certain limitations. You can upgrade to a paid plan should you wish to continue using Landbot’s premium features.

How is my subscription charged?

Your credit card is automatically charged at the start of each billing period. For monthly plans, the charge is processed on the first day of each new monthly cycle, while for annual plans, it occurs on the first day of the new yearly cycle.

Can I change my subscription plan later?

Yes, you can upgrade or downgrade your subscription plan anytime within the Landbot platform. Changes will be applied according to Landbot's billing policies.

How many chats are included in the Business Plan?

Our Business Plan is fully customizable to suit your needs, including the number of chats, seats, and WhatsApp Business Account numbers. Please reach out to our Sales team for a personalized quote tailored to your requirements.

What happens when I reach my plan's chats limit?

If you go over your paid plan’s chat limit, extra chats will be charged based on the chat type. Regular chats cost €0.05 per extra chat, while WhatsApp chats also cost €0.05 per chat plus Meta’s additional fee. AI chats are €0.10 per extra chat. Business plans have custom pricing for extra chats.

Are there any plans that only include WhatsApp?

No, all of our plans that include WhatsApp (WhatsApp Starter, WhatsApp Pro, and Business) also grant access to other channels, such as web, API, and Facebook Messenger. These additional channels are included in all WhatsApp plans.

Can I add more than one WhatsApp number to my account?

Yes, you can link multiple WhatsApp Business Account numbers to your Landbot account, but the number of WhatsApp Business Account numbers allowed depends on your plan.

What payment methods does Landbot accept?

We accept Visa, MasterCard, and American Express. Bank transfers are only available for Business plans.

What currency will I be billed in?

Subscriptions are billed in Euros (€) for most customers. However, customers in the following countries will be billed in US Dollars ($): Argentina, Bolivia, Brazil, Chile, Colombia, Costa Rica, Cuba, Ecuador, El Salvador, French Guiana, Grenada, Guatemala, Guyana, Haiti, Honduras, Jamaica, Mexico, Nicaragua, Paraguay, Panama, Peru, Puerto Rico, the Dominican Republic, Suriname, Uruguay, the USA, and Venezuela.

Does Landbot use the official WhatsApp Business API? How does the application process work?

Yes! Landbot uses WhatsApp’s official API to integrate the most popular instant messaging app. The API offered by Facebook(Meta) is under constant improvement, the reliability is fantastic and generates a frictionless experience for your users and for your team. To review which type of enterprises, businesses and brands WhatsApp accepts at the moment, please read our WhatsApp API application guide.

Landbot’s onboarding team helps you in the application process. Once you sign up for Landbot’s WhatsApp solution, our team will ask you to submit the required information and initiate the application process on your behalf. The entire process usually lasts around 1-2 weeks, regardless of which provider you work with. We take utmost care to ensure each business we collaborate with has their application approved, managing the application process at every step of the way. However, ultimately, the final approval decision rests with WhatsApp.

Can I start building my bot before my WhatsApp API access is approved?

Landbot’s special WhatsApp Test environment feature allows you to build and test your WhatsApp bot before your API application gets approved.

This is possible because the testing channel is a closed one, and only allows communication between the Landbot interface and the phone number you associated with the test account. So you can already test your WhatsApp bot with your own phone, and have it ready to be published live to your users when the access is approved by WhatsApp.

Do you offer support resources on WhatsApp bot creation?

Yes, you have access to a large collection of support resources including WhatsApp guides, documentation and academy videos to help you get the most out of the WhatsApp chatbot builder and campaign manager. Listed below are some of the resources:

- How to Create a WhatsApp Bot: Step By Step Guide
- How to Create & Test your WhatsApp Chatbot: Video Guide
- Landbot Academy: WhatsApp

What is the WhatsApp opt-in and how does it work?

WhatsApp opt-in is the active consent users have to give you before you can contact them via WhatsApp. Opt-ins need to be done via a third-party channel. You can learn more about WhatsApp opt-ins and how they work here.