๐Ÿ“Main Menu and Closest location

For this use case, we will provide clear instructions and insights into:

  • Define all use cases for Main Menu
  • Preparation: Gather all necessary documents and information required for the closest location use case, such as latitude and longitude of location, name and address.

You can now start building your Main Menu and Closest location journey:

  1. Go to Chatbot in the left side navigation and click Create New Chatbot

  2. Define your "Chatbot Name" and choose your Channel "WhatsApp", then click Create

  3. Add a List widget and name it (e.g License Types or Application Types) then:

    1. Add your message in the Body (e.g Hello #ProfileName#, please select one of the following options:)

    2. Add Section Name that will be showing to user over WhatsApp

    3. Based on your use case start to Add List Item (e.g Closest Branch) and for each item define:

      1. Item Name (e.g Closest Branch), and optionally add a description
      2. Item Description - to provide more information about service
      3. Item Payload - This defines the value that will be returned to the chatbot if a user selects this item (eg. NB)
      4. Repeat the steps with all use cases you have in mind
    4. Define the variable that you will use to navigate the user to the correct answer based on his selection (e.g Add SM as a variable name in Save List payload in this variable - This will save the list item payload in the defined variable)

  4. Now add a Branch widget and define the number of branches based on the list items where in each branch:

    1. Define the Variable that captured the user's selection - In this example, we named the variable SM
    2. Define the Operator and Value for this variable that will enable this branch, in this case equals (eg. SM equals NB)
    3. Repeat the steps with all variables
  5. For each Branch depending on the type of use cases:

    1. Create a specific Subflow, use Subflow Handover widget and create a journey as shown in other documents of this Guide
  6. For Closest location use cases:

    1. Add a Collect input widget and select the validation as Location.
    2. Define a message you want to send to end user
    3. Define the Variable that captured the user's location - In this example, we named the variable Location
    4. Add a Javascript widget and define a code that will calculate closest distance from location shared by customer and Branch location (if you need access to code please contact your Account Manager)
    5. Add a Send message widget to inform customers that you will share location in next message
    6. Add a Location widget and use variables defined in JavaScript to send a Maps location over WhatsApp
  7. You can now Test this bot then be ready to Deploy๐ŸŽ‰