# How to
___

This page explains how to configure fields and actions that are common to multiple chatbot elements. Not all elements have these options. See the documentation for the element to confirm whether an option is available.
___

## Add a fallback [#fallback]

A fallback is the action the chatbot takes when it cannot handle the end user's input or when an error occurs. You can configure a fallback for elements that collect input from the end user.

### Fallback action

In the **Fallback action** field, choose one of the following:

- **Go to dialog**: Send the end user to another dialog.
- **Connect to agent**: Transfer the conversation to a human agent.

### Dialog

If the **Fallback action** is **Go to dialog**, choose the dialog in the **Dialog** field. You can choose an existing dialog or create a new one.

### Fallback message (optional)

Enter the message to send to the end user when the fallback is triggered. You can add a maximum of 5 message variations. The end user receives one variation at random. To add a variation, select **Add variation**.

### Link preview (optional)

If the fallback message contains a URL, enable **Link preview** to show a preview of the linked page.

NOTE
If you do not configure a fallback, the chatbot uses the default fallback configured in the chatbot settings.
___

## Repeat a message [#repeat-message]

To repeat the message if the end user does not provide a valid response, configure the **Repeat count** field in the element.

### How many times to repeat the message

Choose the number of times to repeat. Options are 1, 2, or 3. Choose **No repeat** to disable repetition. Default is **No repeat**.

### Message content (optional)

If you want to send a different message on the repeat, enter the message content here.

### Link preview (optional)

If the repeat message contains a URL, enable **Link preview** to show a preview of the linked page.
___

## Add and delete message variations [#message-variations]

Message variations add variety to the chatbot experience. When the chatbot reaches an element with multiple message variations, the end user receives one of the variations at random.

### Add a variation [#how-to-add-variation]

Select **Add variation** to add a new message variation. You can add a maximum of 5 variations.

### Delete a variation [#how-to-delete-variation]

Select the delete icon next to the variation to remove it.
___

## Set a timeout [#timeout]

Use the timeout to specify how long the chatbot waits for the end user to respond. If there is no response within the timeout period, the chatbot takes the configured fallback action.

To set a timeout, go to the **Timeout** section in the element and enable the toggle.

### Seconds

Enter the timeout duration in seconds. Minimum is 15 seconds. Maximum is 14400 seconds (240 minutes).

NOTE
The timeout duration must be less than the [session timeout](https://www.infobip.com/docs/automation-studio/chatbots/manage-chatbots/chatbot-settings#session-timeout) duration.

### Timeout action

In the **Timeout action** field, choose one of the following:

- **Go to dialog**: Send the end user to another dialog.
- **Connect to agent**: Transfer the conversation to a human agent.

### Dialog

If the **Timeout action** is **Go to dialog**, choose the dialog in the **Dialog** field. You can choose an existing dialog or create a new one.

### Timeout message (optional)

Enter the message to send to the end user when the timeout elapses. You can add a maximum of 5 message variations.

### Link preview (optional)

If the timeout message contains a URL, enable **Link preview** to show a preview of the linked page.
___

## Personalize a message [#personalize-message]

Use attributes to personalize messages sent by the chatbot. Attributes are variables that store information about the end user or the conversation.

To add an attribute placeholder to a message field, type {{ and choose the attribute from the list. When the chatbot sends the message, the placeholder is replaced with the actual attribute value.

Example: Hello, {{first_name}}! becomes Hello, John! when the first name attribute value is *John*.

You can use attributes in the following fields:

- Message text
- URL fields
- Button titles
- Body of API and Webhook requests
___

## Use list attributes to configure a field in an element [#list-attributes]

Some elements support list attributes, which enable you to dynamically populate the element's options from a list stored in an attribute. This is useful when the list of options changes frequently or is too large to configure manually.

The following is an example of using a list attribute with the RCS Rich card element.

To use a list attribute:

1. In the **Attributes** tab, select **Add attribute**. Set the **Type** to **List**.
2. In the **Dialogs** tab, go to the dialog that contains the element.
3. Drag and drop the **Code** element from **Chatbot actions**. Place it before the element that uses the list attribute.
4. In the **Code** element, create the list and set it to the list attribute. Example:

   ```javascript
   const items = [
     { "title": "Option A", "postback": "option_a" },
     { "title": "Option B", "postback": "option_b" }
   ];
   attributeApi.set('list_items', items);
   ```

5. In the element, select **Add from list attribute** and choose the list attribute.
6. In the **Iteration label** field, enter a label name. Example: it_label. This value is available as a placeholder in the element's fields.
7. Use the iteration label to map the fields. Example:
   - **Title**: {{it_label.title}}
   - **Postback**: {{it_label.postback}}

The iteration label field can contain a maximum of 100 characters, including underscores. Spaces and special characters are not allowed. One line only.
___

## Rename an element [#rename-element]

To rename an element, double-select the element name in the chatbot editor and enter a new name.

Renaming elements helps you identify them in the chatbot editor, especially in complex chatbot flows with many elements.