docs.wappBot

www.developerity.com
Faz─▒l Akbulut

Introduction

Are you selling some products and you have too many customers? Don't you have time to respond quickly to your customers or don't want to waste time with junk messages? That's not problem. Take advantage of Talkwai's unique Artificial Intelligence algorithm and our flawless script to respond to your customers 24/7 automatically from your sites very easily. Share information about your products and do more. Add welcome messages and define the words you want. Prepare questions, create surveys, gather information, generate reports and see data. It all depends on your imagination!

Check out our FAQs page.

Features

wappBot script has so many unique features. Please go to our codecanyon product page to see all features.

Requirements

  • Any hosting
  • Whatsapp account
  • Talkwai account
  • Simple as that.

    Installation


    Don't worry, this steps very easy and takes less than 2 minutes.

    Step 1
  • Before the start, let's create a database.
  • If you use cPanel control panel:
  • After creating the database, you will need to create a user and assign privileges. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.
  • After that, time to assign privileges. Privileges determine how a user is able to interact with the database. For example, privileges will dictate whether or not the user can add and delete information.
  • Let's move on to the next step. Right click to zip and extract downloaded archive.
  • Open config.php file, you will see 4 fields to edit: Hostname, username, password and database name. If you are not using your own private server and purchased a hosting; The hostname field is always "localhost". In this case, do not touch that area. In the remaining 3 fields, enter your database credentials that you created in the previous step then save.
  • Login to your phpmyadmin with cpanel/plesk or any panel and import "wapp_php.sql" file.
  • In phpMyAdmin, select your database from the list on the left.
  • Click on "Import" from the top set of tabs.
  • Click on the "Browse" button next to "Location of the sql file."
  • Browse to your "wapp_php.sql SQL file and click "Open."
  • Click the "Go" button at the bottom. Wait while your database imports.
  • Step 2
  • Upload wappBot folder content to your server with FileZilla or any FTP. (into public_html or httpdocs)
  • Now go to the address where you uploaded the files. If you uploaded it to the root directory like public_html/httpdocs; Just go to yourdomain.com. If you uploaded another folder in the root directory, for example "exfolder"; then you should go to: yourdomain.com/exfolder.
  • You can login with admin - admin credentials.
  • That's all, congratulations!
    If you need help with the installation, feel free to send a message.

    Talkwai Usage

    Check out Talkwai documentation page: https://www.talkwai.com/hub/developers

    If the images are too small, right click to open the picture in a new tab.

    wappBot, runs together with Talkwai. Without Talkwai, wappBot cannot be used. Talkwai is responsible for your chat bot's task of Artificial intelligence. Talkwai is required to run wappBot and it is the AI behind wappBot that makes the magic happen. You train your AI with Talkwai; prepare surveys, questions or reports and collect information. Messages sent from your users are sent to Talkwai through API and Talkwai responds to the question with the most accurate way possible thanks to highly advanced AI. wappBot takes this message and delivers it to your user.

    Talkwai is always free to use for small business and quite easy to use. You can use Talkwai for a lifetime, with a API limit of 10 query per minute, which means that you can answer 10 questions from your users every single minute. If you own a larger enterprise, you may take a look at other plans of Talkwai and select the one that suits you the best.

    That's all we have to say about Talkwai. If you need more information, please visit the company's website.

    To begin with, Let's create your first project on Talkwai:

  • Open Talkwai.com and sign up. You can sign up with social login for quick access.
  • Now log in, then the system will take you to the pricing page.
  • Here, select the package that suits you the best. You can continue with the free plan if you wish not to pay.
  • If it is your first using experience; click the 'Create new project' button that in the middle of the scene, for making your first project. You can't pass the page if you didn't create any project.
  • Type your project name and your website.
  • Click the 'Create now button'.
  • After the project is created, you will see the secret keys of Client API and Developer API on the screen. These keys are necessary for wappBot to communicate with Talkwai. In the next step, we will ask you to copy these keys and paste them into your wappBot Configuration page.


    Training and using artificial intelligence

    Now, you may begin training your AI. For this, click 'Instruct' from the left side menu.

    This is the section where you can add logic and instructions into your AI. You can set up the way you wish to answer your user's messages from here. Before you start, let's look at how this feature is explained on the Talkwai's documentation page so that you can grasp the logic about the way it works. Afterwards, we will briefly explain it to you as well too.

    FROM TALKWAI DOCS PAGE:

    This is where we can add logic to your ai. Every instruction is responsible for a job. Some to detect user inputs and response, some to create more complex logic to improve user engagement. These instructions, reset the end user's speech transformation. For each project, you define many instructions where your combined instructions can make a full conversation.

    Default instructions: When you create a project, two default instructions will be create for you.

    Default Welcome Instructions: These instructions, it matches when the end user starts talking with your representative. This training should return a response that allows the end user to know what your project is doing or what they can say to start talking.

    Default Uncertainty Instructions: These instructions, it matches when the end user cannot match the expression to another target.

    Create a new instruction and then educate it:

    You define several training phrases for each instruction. The education phrase is an example of what it can write or say to your end user, also known as the end user phrase. For example, an end user might say "what's your name?", "Do you have a name?" or just "name?" He/she may ask. Each of these end-user phrases is unique but has the same purpose: getting your name.

    Create a new instruction:

  • In the middle of the instruct page, click that 'Create new Instructions' button.
  • In the Name field, enter the name you want to give to the group of instructions. This name is for you to easily identify your instructions.
  • Choose your instructions type: Regular or Uncertainty.
  • In the Training phrase section, click the blank text field. Enter the following training phrases and press enter after typing every instruction:

  • What is your name?
    Do you have a name?
    name

    P.S.: in many cases, it is recommended to enter at least 10 training phrases for reliable instruction matching.

  • In the Responses section, click the blank text field and enter this text:

  • My name is Talkwai!

  • Click the 'Save' button and wait for the notification drop-down window to say that the instructions has been successfully created.

  • END DOCUMENTATION OF TALKWAI


    We have told you that this short sample is taken from Talkwai's documentation page before.

    Now, to sum up all in a shorter way:

  • There are 2 types of instructions: Regular and Uncertainty.
  • The Uncertainty instruction includes only answers, while the Regular instruction contains training phrases and responses.
  • When your users sends a message, Talkwai will take this message and try to match it in the training phrase section of the Regular Instructions. If there is a matching, it finds the most appropriate answer from the Responses section of this instruction and delivers it. If there is no matching, Uncertainity instrcuction will work instead of Regular instruction and the most appropriate answer will be once again selected and delivered.
  • For example:

  • Create a new Regular Instruction: Write 'Tomato is red' in the Training phrase section and 'Yes you're right, tomato is red!' in the Responses section and save them.
  • Create a new Uncertainity instruction: Write 'I don't know what this means.' in Responses section and save it.

    Now, let's run a scenario where a potential customer ask questions:

  • Client: Hello, do you know that tomato is red?
    Your Bot: Yes you're right, tomato is red!


    Client: Hello, do you know banana is yellow?
    Your Bot: I don't know what that means.

    Now, should the message written by the user be exactly the same with the instruction you set in your training phrases? No! When you enter an instruction such as 'Tomato is red' in the training phrases section; Even if your user doesn't write exactly the same sentence, Talkwai AI will understand what your user means and give the correct answer..

    For example:

    Client: Hey bro, it does not matter whether the tomato is small or large, it is always red.
    Your Bot: Yes you're right, tomato is red!


    Usage of Questions:

    We've explained how the instructions work, now it's question's turn. In this stage, we will talk about how Talkwai operates with questions. We have already explained in detail in the next step how wappBot handles the questions. So you can quickly go over the text here and proceed with the next stage without wasting too much time here.

    To do this, click 'Q & Answers' in the left side menu and then click 'Questions'. Here, you can determine the type of questions you will ask your users.

    We've done a quick role play in the 'wappBot Usage' section about ordering a pizza.

    These were the questions:

    Question 1: What size should the pizza be? Please choose one: Small, medium, large.
    Question 2: What pizza do you want?
    Question 3: Finally, what is your address?
    Question 4: We have received your order! If we cannot deliver it to you within half an hour, we will give you this pizza for free :)

    You may add your desired questions from this section as well. The order of rank is written next to questions. Please do not forget the fact that the first question will start being asked from 1.

    We've given a lot more training in the next stage.

    We believe you have a strong sense of understanding of everything now, let's move to the wappBot Usage.

    wappBot Usage

    If you've come all the way to this stage, you may want to learn a little more about system features and configurations.

    To get started, open the wappBot script page:

    You can see the button that will allow you to connect to the Whatsapp servers in the first row. Before the first installation, this button is disabled and the color is gray. (Fill the form first for Connect to whatsapp.)

    To click the button, its color need to be green, you must first perform the necessary configurations to be able to do this. We'll refer back to this stage later, let's proceed with the next stages for now.

    Configuration field:

    Purchase Code: You need to enter codecanyon purchase code in this field. After the purchase is complete, codecanyon will give you this code. It must be a valid code, because before we send your requests to whatsapp, we will check the verification of your licence.

    Client Key: Its the Client Key that is needed for you to link up with Talkwai.

    Developer Secret: Its the Developer Secret Key that is needed for you to link up with Talkwai.

    In the Talkwai Usage section, we've mentioned where Client key and Developer secret key are located.

    That's all in terms of the configuration settings they are essential for system to work. Any other settings are optional.


    Options field:

    Only send welcome messages: If you activate this option, the system will record those whom it sent message to before and if the person was previously registered, it will not send messages again. In summary, with this option enabled, the system will send a message only (1) once. It is a feature made for customers who only wishes to send welcome messages to their customers and then manually reply without the chatbot.

    A brief example:

    Client: Hello there! I wanted to send a message for collab!
    Your Bot: Heya! We would love to collab! You can get free clothing+monthly packages, get posted on our page, in stories & paid..........
    Client: Nice deal! But there are a lot of questions I can think of.
    Client: You there?
    Client: Hi again, you didn't send any message yet...

    As you can see, the system will not send any message again after the first one is sent and will leave the job to you.

    Delete message after replied: Allows messages to be deleted once they are answered. It is a permanent action and deleted messages cannot be retrieved.

    Use Questions and get Data: After a user sends you a message, you can ask questions, create surveys, and gather information before you start chatting. It can be about anything. For example, you have a pizza shop and want to take orders or just want to get to know the user better. Any who, we talked about how questions were added during the Talkwai usage.

    Now let's talk a bit about how it works.

    Let's say you want to get to know your user better:

    Client: Hi sir, I have a question.
    Your Bot: Hello, we want to get to know you better before we start talking. What is your name?
    Client: My name is Aleina.
    Your Bot: I'm glad Aleina, how old are you?
    Client: I am 25 years old.
    Your Bot: Where do you live?
    Client: I'm live in Turkey.
    Your Bot: Sounds good! Thank you very much for sharing some information about you with us. How can I help you?
    Client: ............

    Or you have a pizza store and want to receive an order:

    Client: Hey! I want 3 pizzas.
    Your Bot: Hello sir, of course! What size should the pizza be? Please choose one: Small, medium, large.
    Client: Large please!
    Your Bot: What pizza do you want?
    Client: I want a vegetarian pizza and it must have plenty of mushrooms in it.
    Your Bot: Finally, what is your address?
    Client: 2932 Horseshoe Lane xxxxxxx
    Your Bot: We have received your order! If we cannot deliver it to you within half an hour, we will give you this pizza for free :)

    It all comes to your imagination. You can prepare these questions based on your needs. Once an Q/A function is used, answers will be collected in the Talkwai panel. You can see all the info here and change or use it at will.

    One message after the last question: When you ask all your questions, it allows you to send the last message to start chatting.

    For example, enter "You answered all questions, type anything to start the chat." to this field then save. In this case, thinking that you have a total of 2 questions, your chat will be as follows:

    Bot [Question 1]: What is your name?
    Client: Jackson
    Bot [Question 2]: How old are you?
    Client: I'm 34 years old.
    Bot: You answered all questions, type anything to start the chat.

    As you can see, you have sent a message to inform your customers after the questions are over. This is just an example, you can use it for many different purposes.

    Blacklist: If you don't want to send a message to a certain person or a group, you can use this area to prevent your chat bot from talking with them. You need to enter the name of the person that is registered in your phone, not the phone number. If it is not registered on your phone, then you should write the exact text you see in whatsapp with the spaces.

    For example, there are 6 individuals that you want to put them on the Blacklist. 4 registered and 2 not registered in your phone like this:

    Mark Zuckerberg
    Elon Musk
    Eminem
    Fazil Akbulut
    +55 66 92247-1234
    +90 551 031 12 34

    You need to add them to the Blacklist like this:

    Mark Zuckerberg,Elon Musk,Eminem,Fazil Akbulut,+55 66 92247-1234,+90 551 031 12 34

    You need to enter the name that is registered in your phone exactly the same or pure number; put comma between them and never use space after each comma.

    Speed: We put your account into a sleep mode for a very brief time every time a message is sent. This option sets the time of sleep mode. (We said sleep mode but don't let that confuse you, we are talking about seconds here.)

    Status: Section where you can activate or deactivate the chatbot system.

    This concludes everything about settings and configs. When you click 'Save changes' button after these procedures, you can see that the button that allows you to connect to whatsapp servers, which we mentioned before, will turn from grey to green.

    Connecting to WhatsApp:

  • Click the green button above after fill the necessary fields. (Connect to whatsapp)



  • You'll see another button on the pop-up window, now click on it (Start the tunnel)


  • You may see a blank screen for a few seconds, then we will create a special tunnel to WhatsApp servers for you. This process may take a couple of minutes, please do not close or refresh the page.
  • Once the connection is made, you'll see a barcode on the screen.
  • Open WhatsApp in your phone.
  • Select 'Whatsapp Web' from the menu icon, located at the top right side.


  • Scan the barcode with your camera.


  • If the process is successful, you will feel a slight vibration from your phone and you will see on your screen that the connection is established. After this step, do not click on the 'Log out from all computers' button. Never!


  • Wait a little more after scanning the barcode. You will finally see a success message.


  • That's all. Congratulations!

    Types

    wappBot can send text, image, contact and vCard messages. So how are these types used?
    All types are used in the "responses" section of Talkwai. There are some parameters you just need to set.

    Image: To send an image, you must enter the external link. Please make sure the file types are allowed. (.png, .jpg, .jpeg, .gif)
    Define image link with this way:

    {{$IMAGE='https://developerity.com/cc-assets/wappbot590.jpg'}}

    For example:



    Contact / vCard: To send a contact or vCard, first make sure that the contact is registered on your phone. Then enter the person's fully registered name on your phone.

    For example, if the vCard or contact you want to send is registered as Elon Musk on your phone; the parameter must look like this:

    {{$CONTACT='Elon Musk'}}



    Somethings

    Emoji Usage: Many emoji have become unusable with the API update by Talkwai. As far as we know, 2 emoji can be used. If you need more emojis, you can try using these emojis on Talkwai by searching "html emoji" on the internet. We will make an effort in the near future for more emoji.

    How to connect with another number:

  • Open WhatsApp in your phone
  • Select 'Whatsapp Web' from the menu icon, located at the top right side
  • Click 'Log out from all computers' or just used from wappbot
  • Go back to script page then you will see qr code again
  • Warnings

  • System will answer all your unanswered or unread questions when it starts up. So, be sure to delete, reply, or archive all these messages before operating the system. Also, unanswerable conversations will get the system stuck.
  • Do NOT share your Codecanyon Purchase Code with anyone, not even your best friends. If you do such a thing, those who have access to your code could mess with your settings. For instance: They can cut of the connection between your phone number and WhatsApp, change the speed, and activate or deactivate the system. Purchase code is produced by codecanyon. Therefore we are unable to reset it for you. The responsibility of this matter is entirely yours.
  • Due to the principle of the system when it comes to the way it is operated, WhatsApp web will be imitated while creating a private tunnel to the WhatsApp servers. Shortly, you won't be able to use WhatsApp Web while using this system. Because Whatsapp is allows you to use only a single WhatsApp web in the browser. And since this system uses an imitated version of WhatsApp web and WhatsApp cannot detect it because it is processed as if you are using the original WhatsApp Web, you cannot use the real one at the same time. Also, your internet and Whatsapp app must always be on. When the internet connection is lost, the system will also stop working.
  • We said that the Talkwai free plan has a limit of 10 query per minute. If you want to use Talkwai Questions in your AI, you may need to choose a paid plan. Since our system make requests one by one each time to receive the questions, your limit of one minute will be filled in a direct proportion with the question you add. If your one minute limit expires after giving all the necessary answers to your first client, your AI will not be able to reply to any other messages received from other clients at the time of one minute limit recovery.
  • In some cases, the system automatically receives all your questions from Talkwai and saves them in the database. If this is not done, the questions cannot be forwarded to your users in case of any interruption, as the questions cannot be obtained from Talkwai. So, before run the system, make sure that you prepare all questions as desired and do not change them. If you change later, old questions can still be sent to your users who were asked questions at the time. Like we said, we will save your questions in our database.