For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setting up your very first conversation

1. Setting up your first bot

1.1. UCI Admin

  • Go to admin console. You can find the repo here.

  • Click on the "Add new button".

  • Fill the form with a unique starting message, start date equals to current & end date more than the current date.

  • Click on the Next button.

  • Click on Add logic button.

  • Fill the form & upload a xml form.

  • Add this & submit this form.

  • The bot will be added and we can start using this on the UCI front.

1.2. APIs

1.2.1 Upload ODK Form

  • Convert a ODK Excel form to XML form using Link.

    Sample ODK Excel Form

  • Upload this XML from using this api.

    curl --location 'http://localhost:9999/admin/form/upload' \
    --header 'admin-token: {ADMIN_TOKEN}' \
    --form 'form=@"{PATH_TO_YOUR_XML}"' \
    --form 'mediaFiles=@"{PATH_TO_YOUR_MEDIA_1}"' \
    --form 'mediaFiles=@"{PATH_TO_YOUR_MEDIA_2}"' \
    --form 'mediaFiles=@"{PATH_TO_YOUR_MEDIA_N}"'

    Sample ODK XML Form

    Response: The API will return a form id. Use this form id to create conversation logic API. Form id E.g. testing_form

    {
        "apiId": "api.form.upload",
        "path": "/admin/form/upload",
        "msgid": "fec3421b-cc04-42e2-9ce9-e004b3ded827",
        "result": {
            "status": "UPLOADED",
            "data": {
                "formID": "testing_form"
            }
        },
        "startTime": "2023-07-04T12:01:00.268Z",
        "method": "POST",
        "endTime": "2023-07-04T12:01:21.785Z"
    }

1.2.2 Create a Conversation Logic

Response: It will return a conversation logic id, use it in create bot. Eg. 92f7b965-4118-4ddc-9c7d-0bc0f77092db

1.2.3 Create a bot

Response: This api will return a bot id & other bot information. Use the starting message (Eg. Hi Test ODK) from here to start conversation with a bot.

Note: If you want to use the gupshup adapter, please contact the administrator for credentials.

2. Start Using Bots

Using Web Channel

Once the bot is created, we can start using it. Send the starting message added in the Create a bot api.

Example : Hi Test Bot

Using Whatsapp

Once the bot is created, we can start using it. If you have set up gupshup/netcore provider for whatsapp, Send the starting message added in the Create a bot api to the whatsapp number.

Last updated

Was this helpful?