Answers
Chatbot building blocks
Components

Components

EARLY ACCESS

Note

Components are in Early access phase. For more information, contact your Infobip account manager.

A component is a reusable block that does a specific task. It gets specific inputs, processes the input, and gives a structured output.

A component is built in Answers and uses the same building blocks as an Answers chatbot. So, it is a smaller version of a chatbot. It can be integrated into multiple solutions such as chatbots.

Example: Create separate components to do end user authentication, collect feedback, and answer FAQ, and use them across multiple Infobip solutions.

A component can only be used within a solution, such as a chatbot.

Advantages of components

Reusability: Some sections of the chatbot might be repeated, either in the same chatbot or in multiple chatbots. Instead of recreating the same section in multiple places, create a component and use it wherever required.

There is no limit to the number of times you can use a component either within the same solution or in multiple solutions.

Easier updates: If you need to make changes, update the component, not the solution in which it is used. The change is automatically applied wherever the component is used. This saves time and increases consistency.

Simpler maintenance and troubleshooting: Break down large tasks into multiple components. Each component focuses on a specific task, thus making it easy to maintain and troubleshoot.

Simpler solution design: Components help simplify the design of the solution. Example: Components can reduce the number of dialogs required in a chatbot.

Platform-independent: Components can be used across multiple Infobip solutions, such as Answers chatbots.

Supports collaboration: Because components are modular, different people can work on separate components at the same time. These components can then be added to the solution.

Use components with Infobip solutions

ProductHow to useExample
Answers - Create a component in Answers.

- Use a component in a chatbot to do a specific task.
Create components to do various tasks such as validating user information or providing the location of the nearest store.

How components work

Process overview

  1. The component is created in Answers.
  2. An Infobip solution such as an Answers chatbot calls the component.
  3. The component receives the input values from the solution.
  4. The component processes the input and generates an output.
  5. The component returns the output values to the solution.
  6. The solution then either uses these values for further processing or shares with the end user.

Component processing

Components are processed either synchronously or asynchronously.

Synchronous: The solution calls the component and waits for a response before going to the next step. The component returns the result when the API call is completed.

Asynchronous: The solution calls the component but does not wait for a response, and continues with the flow. The API call returns a Success response if the component is triggered successfully. The result is sent to the provided webhook.

Types of components

Components can be of the following types:

  • Channel agnostic
  • Channel specific

Channel agnostic

Channel agnostic components are not dependent on a specific communication channel. They can be used in any supported solution, regardless of the channel.

These components do not contain Send elements. So, they cannot send or receive messages. However, they can perform other types of processing.

Channel specific

Channel-specific components are designed for a specific communication channel. They can be used only in a supported solution that has the same channel as the component.

These components contain Send elements. So, they can send or receive messages.

Differences between chatbots and components

A component is a smaller version of a chatbot. The following are some differences between chatbots and components.

ChatbotComponent
Can do multiple tasksDoes a specific task
Uses Answers elementsIn addition to Answers elements, components have a Return result element that returns the result of the component.
User-facing solutionDoes not interact with end users directly. Get inputs from the solution and return outputs to the solution.
Channel specificCan be either channel specific or channel agnostic
Has a senderNo sender
Has Intents and KeywordsNo Intents or Keywords

Components tab

In the Chatbots > Components tab, you can view and manage all components.

You can do the following.

  • View a list of components. Each component shows the following information.

    • Name: Name of the component.
    • Status: Shows whether the component is in Active or Inactive state.
    • Last updated: The date the component was last updated.
    • Created by: Name of the component creator and the date it was created.
  • Sort components. Select a column header to sort.

  • Create a component.

  • Import previously exported components, including their settings and setup.

  • Editduplicateexport, and delete components.

  • Search for components. Use the Search box.

Components tab

Create a component in Answers

Components are built in Answers. The process of creating a component is similar to that of building an Answers chatbot.

Create the component

  1. On the Infobip web interface (opens in a new tab), go to Answers > Chatbots > Components tab.

  2. Select Create component.

  3. In the New component screen, complete the following fields.

    • Component name: Enter a unique name.

    • Channel

      • To create a channel-specific component, select the required channel.
      • To create a channel-agnostic component, select Any channel.
      Select the channel
  4. Select Create component.

    A new component is created and opens at the Dialogs tab.

    The component is created
  5. Create the required dialogs.

    • Add the Return result element to the dialog that gives the output of the component.
    • Each dialog in the component must have either the Return result element or the To dialog element.
    Add dialogs to the component
  6. In the Attributes tab > Input/output attributes tab, create the Input and Output attributes that are required for the component.

    • Name: Each attribute must have a unique name.
    • Type: Data type of the attribute.
    • Default value (Optional): Specify a default value for the attribute.
    • Description (Optional): Add a description of the Input attribute.
    • Input format (Optional): Define the format of the Input attribute in regex form. If the value of the attribute does not match this format, the attribute value is blank.
    • Required (Optional) Select whether the Input attribute is mandatory or optional.
    Create input and output attributes

    The attributes are listed in the Attributes tab.

    Attributes are created
  7. (Optional) In the Attributes tab > Attributes tab, create other attributes if required.

  8. Configure the component settings. The Component ID is automatically created.

  9. Test the component in the Test tab.

    1. Enter the values of the input attributes.

      Test the component
    2. Select Return result to see the values of the output attributes.

      View the result of the component
  10. Select Activate.

    Important

    If there is an existing Active component with the same Component ID, that component is deactivated. The new component replaces the existing component in all solutions in which it is used.

Component settings

  • Component description (Optional): Add a description for the component. Select the Text icon to use formatting, such as font size or headings.

  • Component ID: A component ID is created by default. You can update the ID either manually or automatically by selecting Generate.

  • Voice messages: Use voice functionality in your component.

    This setting is applicable for channel-specific components that contain messaging elements.

  • Component timeout: In some cases, the end user may not respond immediately. Configure the interval for which the component needs to wait for a message from the end user.

  • Tracking and URL shortening: If your messages contain links (URLs), you can shorten URLs and track URL clicks.

Component settings

Use a component in a solution

  1. Create the component in Answers.
  2. Create Input and Output attributes in the component.
  3. In a supported solution such as an Answers chatbot, call the component.
  4. In the solution, provide the input to the component through the Input attributes.
  5. The component processes the input and generates an output.
  6. The component returns the output through Output attributes.

Use a component in an Answers chatbot

  1. In your chatbot, add the Component element.

  2. Configure the element. Select a component and configure the input and output attributes. For more information, refer to the Component element documentation.

  3. Configure the chatbot to meet your requirements.

  4. Test the functionality of the component in the Test > Simulator tab.

    The Component start field shows the input for the component.

    View the input when testing the chatbot

    The other fields show the processing in the component.

    View the component processing when testing the chatbot

    The Component end field shows the output from the component.

    View the output from the component when testing the chatbot
  5. Activate the chatbot.

    Important

    If the selected component is deleted, you must either use a different component or remove the Component element before you activate the chatbot.

Manage components

Edit a component

To edit a component, go to the Components tab. Select the three dots next to the component and select Edit.

Note

You cannot edit an Active component. Either duplicate or deactivate the component.

Delete a component

To delete a component, go to the Components tab. Select the three dots next to the component and select Delete.

Note
  • You cannot delete an Active component. Either duplicate or deactivate the component.
  • After deleting a component, remove the references to the component in all solutions in which it is used.

Deactivate a component

Deactivating a component makes it unavailable to select in a solution. The status changes from Active to Inactive.

Select Deactivate in the component.

Note

You cannot deactivate a component that is used in an active solution. Either duplicate the component or remove it from all the solutions in which it is used.

Example: If the component is used in an active chatbot, deactivate the chatbot, remove or replace the component in the chatbot, and then activate the chatbot.

Duplicate a component

If you want to create a new component that is similar to an existing component, use the Duplicate option. This reduces the time taken to create the component because you do not need to create it from scratch. You can then modify the duplicate component to meet your requirements.

To duplicate a component, follow these steps:

  1. Go to the Components tab.

  2. Do one of the following:

    • Select the three dots next to the component and select Duplicate.
    • Open the component and select Duplicate component.

    The component is now listed in the Components tab.

    View the duplicate component
  3. In the duplicate component, do the following:

    • Rename the component.
    • Update the component ID.
    • Make other changes to meet your requirements.
  4. Select Activate.

    Important

    If there is an existing Active component with the same Component ID, that component is deactivated. The new component replaces the existing component in all solutions in which it is used.

Export/Import a component

If you want to create a new component that is similar to an existing component, export the existing component and import it as a new component. You can then modify the imported component to meet your requirements.

Export-import reduces the time taken to create the component because you do not need to create from scratch.

There is no limit to the number of times you can export-import a component.

Permissions

You do not need to have a specific user role to export a component. To import a component, you must have either the Manager or Designer role.

All Answers plans support export and import.

Export

Prerequisites

You can export a component only if has been validated by Answers and is error-free. This reduces the possibility of errors when importing the component.

Guidelines

When you export a component, the following guidelines and conditions apply:

  • Exported components are in a human-readable format. You can search the content and modify it to meet your requirements.
  • Exported components retain the following:
    • Attributes
    • Dialogs

Export a component

To export a component, do the following:

  1. Go to the Components tab.
  2. Select the three dots next to the component that you want to export, and select Export.

The system checks if there are any errors in the component. If there are no validation errors, the file is exported and stored on your local device in .export format.

Import

Prerequisites

  • The file that you want to import must be in .export format.
  • If you import the component to a different account, the target account must support the channel used in the exported component. Example: If you export a WhatsApp component from Account A, you can import the component to Account B only if WhatsApp is enabled in Account B.

Guidelines

When you import a component, the following guidelines and conditions apply:

  • You cannot change the channel when you import the component.
  • You can import the component either as a new component in the same account or to a different account that supports the channel used in the exported component.

Import the component

  1. Go to the Components tab.
  2. Select Import component.
  3. Upload the required .export file.
  4. Select Import.

If the export file contains images, videos, or files, you can view the progress of the upload and can also cancel the upload.

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2025 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use