Getting Started

Hooks

Advanced

Miscellaneous

Getting Started

Get started with JAWCE.

Although JAWCE aims to run as a standalone language-independent engine..

Some Java / Kotlin knowledge is assumed

The example chatbot engine comes with a sample template (eHailing chatbot) -
see my LinkedIn post here

Checkout the Official getting started to WhatsApp Cloud API.

I assume you have your WhatsApp account and credentials in place

Since JAWCE is developed with Java (porting to Kotlin WIP 🚧) it is natural that chatbot templates (conversation flow) are saved in the project resources/templates folder.

  • Clone JAWCE

    Clone or download the JAWCE chatbot sample project:

    git clone git@github.com:DonnC/jawce.git
    

    After successful clone, open the project in an IDE of your choice

  • Install dependencies

    Install project maven dependencies

    From now on, we will focus on the chatbot folder with the sample chatbot

  • Setup Credentials

    Remember the WhatsApp Credentials we mentioned?

    Navigate to the /chatbot/src/main/resources/application.yml properties file and replace secret keys with your account credentials

    chatbot:
        configs:
            # ...
            hub-token: "replace-with-your-hub-token"
            access-token: "replace-with-your-access-token"
            phone-number-id: "replace-with-your-phone-number-id"
    
  • Test Run

    Start your development server

    Run the chatbot project, if all goes well. It should run on the port configured in the application properties file.

  • Webhook Config

    If the example chatbot run successfully. You can configure NGROK to tunnel your local setup to obtain an HTTPS webhook to configure on Meta developer portal.

    In a new terminal, do

    ngrok http 8080
    

    The webhook url will be accessible on https://ngrok-url/jawce/webhook which you can use to configure on your meta developer application portal as below

    Example dev console portal config