> For the complete documentation index, see [llms.txt](https://uci.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uci.sunbird.org/use/developer/uci-basics/transformers/odk-transformer/interactive-messages.md).

# Interactive-Messages

## Interactive Messaging

The Interactive Message Templates feature allows you to add buttons in message templates that can be used with List and Quick Replies. Buttons will give the ability to develop interactive experiences with pre-set options for users.\
There are two types of buttons:

### 1. List Message

List messages provide a simpler and more consistent format than text-based lists for people to find and select\
List messages are a way to allow users to easily choose from up to 10 options.

#### 1.1 Steps for creating List Message

For sending a List Message, add following properties in ODK form :

* **type** : `select_one <field_name>`\
  Column *type* describes the property of any particular message.
* **name** : `<field_name>`\
  Column *name* refers to unique *field\_name* of any message.
* **label** : `<text>`\
  In label, we can write text content that we want to send to user, If there are any choices available for say *select one field*, the choices will be appended with this text content.
* **bind::stylingTags** : `list`\
  Bind tag indicates, how a *select choice* option should be displayed to user as list or buttons. It is also used to define the media type a message.
* For creating options as list items we have to add the items in the *choices* tab as we do for the *select choices*. These are the properties that needs to be set:
  * **list name** : `<field_name>`\
    In list name, we write the field name, same as we wrote in the *name* field of survey tab.
  * **name** : `<indexing>`\
    In name field, we write index of a list item.
  * **label** : `<title>`\
    In label, we can write the title of a list item, which will be shown to the user.

#### 1.2 Rules for creating List Message

* In a single List Message maximum 10 list items are allowed.
* Maximum 24 characters are allowed in list item label.
* Alphanumeric characters and Spaces are allowed in list item label.

#### 1.3 Example for ODK form of List Message

* Survey Tab&#x20;

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FyLHDqEE34Zklj4aLw1gI%2FListMessage_SurveyTab.png?alt=media\&token=5f44be83-8950-4cbf-896a-ace9df6f4e24)

* Choices Tab&#x20;

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2F1Uf4YmphPJxphWYEVOka%2FListMessage_CoicesTab.png?alt=media\&token=79d4b034-29de-4a03-a2e0-2f19477dfc26)

#### 1.4 Example of List Message Preview

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FPEKYgWlWjKYBZ1nT8gO5%2FListMessage_example.jpeg?alt=media\&token=0e005158-494c-4ba1-9abb-1bdabe9dafca)

### 2. Quick Reply Button

These quick reply buttons will help improve the quality of conversations with users by prompting responses that can reduce spelling errors and improve an automated experience.\
These buttons can be attached to text messages and a maximum of 3 Buttons are allowed in one Message.

#### 2.1 Steps for creating Quick Reply Button

To send Quick Reply Button follow the below steps while creating ODK form :

* **type** : `select_one <field_name>`\
  Column *type* describes the property of any particular message.
* **name** : `<field_name>`\
  Column *name* refers to unique *field\_name* of any message.
* **label** : `<text>`\
  In label, we can write text content that we want to send to user, If there are any choices available for say *select one field*, the choices will be appended with this text content.
* **bind::stylingTags** : `buttonsForListItems`\
  Bind tag indicates, how a select choice option should be displayed to user as list or buttons. It is also used to define the media type a message.
* For creating buttons for quick reply, we have to add the items in the choices tab as we do for the select choices. These are the properties that needs to be set:
  * **list name** : `<field_name>`\
    In list name, we write the field name, same as we wrote in the *name* field of survey tab.
  * **name** : `<indexing>`\
    In name field, we write index of a list item.
  * **label** : `<title>`\
    In label, we can write the title of a button, which will be shown to the user.

#### 2.2 Rules for creating Quick Reply Buttons

* In a single Quick Reply Message, maximum 3 buttons are allowed.
* Maximum 20 characters are allowed in button label.
* Alphanumeric characters and Spaces are allowed in button label.

#### 2.3 Example for ODK form of Quick Reply Button

* Survey Tab&#x20;

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FmeX1LiRrS6iNBcl1v844%2FQuickReplyButton_SurveyTab.png?alt=media\&token=da58cfc1-9c8e-4700-9913-31087935cdda)

* Choices Tab&#x20;

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FBRA48QttR5BXMpnAdQRQ%2FQuickReplyButton_ChoicesTab.png?alt=media\&token=227fdf9f-e26b-4498-a846-ac341bf3cdb8)

#### 2.4 Example of Quick Reply Button Preview

![](https://1242145269-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnC2042spZ2TIbqdRA37S%2Fuploads%2FAgUh98Lf7mivrJ8apTNj%2FQuickReplyButton_Example.jpeg?alt=media\&token=0867b1d9-a605-46ec-ac62-5a234d86c787)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://uci.sunbird.org/use/developer/uci-basics/transformers/odk-transformer/interactive-messages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
