Set up PPM Chatbot

This section provide details on how to set up PPM Chatbot.

Prerequisites

Make sure you have the following ready before setting up PPM Chatbot.

  • Create a PPM user and only give it the "Configuration - Access to all Applications and their configuration, except User Administration" license and the "Rasa Webhook" access grant.
  • Have a Windows or Linux server with the CPU supporting the AVX Instruction set.

Back to top

Set up Microsoft Teams bot

Use App Studio to create Bot in Microsoft Teams. For details, see Create your app manifest and package.

Note down the following information:

  • App ID: Generated automatically when you create a new bot.
  • App password: Click Generate password in the App passwords section to generate a password.

Back to top

Set up Rasa server

You can either manually set up the Rasa server or use the VM image provided by PPM to complete the setup.

Manual setup

  1. Install the Rasa server. For details, see https://rasa.com/docs/rasa/user-guide/installation/.

    Install Rasa version 1.7.2. It was certified by PPM. Make sure the CPU support the AVX Instruction set.

  2. Copy the <PPM_Server>/bin/chat/microfocus folder to a folder under <Rasa_Server>.
  3. Set the environment variable PYTHONPATH to the folder where the "microfocus" is copied.

    For example, if you copy the "microfocus" folder to the "chatbot_lib" folder, set the variable to "chatbot_lib".

  4. Create a new folder under <Rasa_Server>, and run the following command in the new folder to create a Rasa project. This folder is your Rasa project folder.

    rasa init --no-prompt

  5. Download the endpoint.yml and credential.yml files from the PPM Marketplace to your local machine.
  6. Copy the content of the downloaded endpoint.yml file to the endpoint.yml file of your Rasa project, and update the following:

    • url: http://<PPM_Server>:<PORT_Number>/itg/rest2/chat/webhook
    • username: The username of the user who has the access grant "Rasa Webhook".
    • password: The password of the user who has the access grant "Rasa Webhook".
  7. Copy the content of the downloaded credetails.yml file to the credetails.yml file of your Rasa project, update app_id and app_password with your bot ID and password you noted down when setting up the Microsoft Teams bot.
  8. In the Rasa project folder, run the following command line to start the Rasa server:

    rasa run --enable-api

Set up Rasa Server using VM image

PPM already has the Rasa server installed and Rasa project created in a VM. You can leverage the VM image to simplify the Rasa server setup procedures.

  1. Obtain the VM image from the PPM marketplace.
  2. Start the VM using the following account.

    Username: admin

    Password: 1Qaz2wsx

  3. Edit the endpoint.yml and credetails.yml files, as described in step 6 and 7 in Manual setup.
  4. Go to the Rasa project folder and run the following command line to start the Rasa server:

    rasa run --enable-api

For more information about configuring Rasa server, see:

Back to top

Set up PPM

  1. Set the following in the server.conf file.

    • com.kintana.core.server.RASA_SERVER=http://<RASA_SERVER>:5005

    • com.kintana.core.server.RASA_MODEL_PATH=<Rasa_project_folder>/models

      <Rasa_project_folder> is the folder where your Rasa project is created. See Set up Rasa server.

  2. Start the PPM server.

Back to top

Map Rasa server to web server

We recommend you not expose the Rasa Server to the outside world, but rather connect to it from your backend over a private connection.

You need a web server that supports https to map the Rasa server.

For example, map https://ppmbot.demo.com to http:<Rasa_Server>:5005.

Back to top

Update bot messaging endpoint

Update the messaging endpoint of your bot. Remember to replace the Rasa server URL with the mapped web server URL.

For example, https://ppmbot.demo.com/webhooks/botframework/webhook.

Back to top

Test and distribute bot

Go back to Teams App Studio, click Test and distribute in the Finish section. Click Install and add the bot to your teams.

For details, see https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/overview.

Back to top

(Optional) Customize welcome sentence

You can customize the welcome sentence that PPM Chatbot sends to the users in the welcome.html file from the <PPM home>/bin/chat/microfocus/ directory.

Back to top