Reusable Subdialogs

Subdialogs can encapsulate a broad range of elements, including intents, conditions, storage variables, and more. By exporting and importing subdialogs, you can easily reuse established dialog structures, saving time and ensuring consistency across projects.

Step 1 – Export a Subdialog
  1. Navigate to the Subdialogs tab within the project you want to export from.

  2. Hover over the desired subdialog and click Export.

    The following displays, confirming the version of the subdialog being exported, along with the languages included. The export includes all languages configured in the bot from which you are exporting. Additionally, any nested subdialogs will be renamed to maintain consistency within the hierarchy. If the receiving bot lacks a specific language or dialect present in the subdialog (for example, en-GB versus en-US), that language will be added to your bot upon import.

  3. Click Export to download the subdialog in ZIP file format.

Note: Verify you're exporting the correct version of the subdialog by checking the project version.

Step 2 – Import a Subdialog – Happy Path
  1. Open your target project and navigate to the Dialog screen, then click on the Subdialogs tab.

  2. Click Import Subdialog and upload the subdialog ZIP file by dragging and dropping it into the designated area.

Caution: If the subdialog you're exporting is from an LLM-enabled (for example, using Description for intent classification), you cannot import it into a project that is not LLM-enabled.

  1. Upon successful upload, a paperclip icon with the file name will appear. Click Next to proceed.

  2. The Intent Groups tab displays any potential conflicts. If there are no conflicts, click Next to continue. If conflicts exist, refer to the provided instructions on how to resolve them.

  3. The Other Elements tab checks for conflicts in various elements. If there are no conflicts, click Next to continue. If conflicts exist, follow the instructions for resolution.

  1. Finally, in the Import tab, you can rename your subdialog in the Name field. The Language(s) settings displays the language/s used in the subdialog you are importing. If the language of the subdialog and the target project match, such as English in both instances, then English will be selected by default.

  1. Click Import.

Note: Once you click the Import button, the browser will refresh to upload the dialog into the target project.

Step 2.1 – Import a Subdialog – Conflict Resolution
  1. The Intent Groups tab will display any potential conflicts. If there are conflicts, you must rename the intent in the Source Subdialog section. The name cannot be an intent name that already exists in your project. If you rename the intent to a name that already exists and click Next, you will receive an error notification indicating that the name is already in use.

  2. Click Next to continue.

  3. The Other Elements tab checks for conflicts in various elements, such as text snippets, intents, slots, variables, and environment variables, and more. If there are conflicts, select whether to keep existing elements (Target Project) or override them with those from the imported subdialog (Source Subdialog).

    Note: You may choose whether to override conflicts from the imported subdialog one-by-one, or by selecting all within a group by clicking on 'Target Project' or 'Source Sub-dialog' of a group, indicated by being in bold font with a (number).

  4. Click Next to continue.

  5. Finally, in the Import tab, you can rename your subdialog in the Name field. If the same subdialog name already exists in your project, you must rename your subdialog. The Language(s) settings displays the language/s used in the subdialog you are importing. If the language of the subdialog and the target project match, such as English in both instances, then English will be selected by default.

  6. Click Import.

Note: Once you click the Import button, the browser will refresh to upload the dialog into the target project.

Important Notes

  • If importing a subdialog includes a service with a name already existing in your project, it will be automatically renamed to differentiate, along with the naming you provided it.

  • Imported services include branches, service input, and output but exclude technical configuration. For example:

  • If you select languages that are not currently present in the target project, they will be automatically added to your project.

FAQs

Can I import a subdialog that contains nested subdialogs?

Yes, you can import an unlimited number of nested subdialogs within a parent subdialog.

What happens if I import a subdialog with environment variables into a project without an environment?

The environment variables will be imported but remain inactive. To activate and use these variables, you must first create an environment within your project.

What should I do if there is a naming conflict with an existing subdialog in my project?

If an existing subdialog in your project shares the same name of a subdialog you want to import, you will need to rename one of them to resolve the conflict and proceed with the import.

Can I overwrite a subdialog in my project with an imported subdialog of the same name?

No, direct overwriting of subdialogs with the same name is not supported. If the name of the imported subdialog matches the name of an existing subdialog in your project, you will be prompted to rename the imported subdialog during the last step of the import process.

Will I need to do conflict resolution if the names are not the same?

No, conflict resolution is only necessary when element names are the same. Since each name serves as a unique identifier in the system, if the import process shows no conflicts, there are none to resolve.

Will the graph of the imported subdialog stay intact even after addressing conflicts?

Yes, the subdialog graph will stay intact with all its connections. Any conflicts will need to be resolved before the import, determining if elements from the projects need to be kept or overwritten by the import.

Do I pay an additional price to use this feature?

No, this feature is included as part of the product offering without additional charges.

If I have more than one tenant, can I import the subdialog to another tenant?

Yes, you can import subdialogs across tenants. However, if your imported subdialog relies on LLM-based routing and your current tenant is not enabled for it, the import will not be successful.

Can I export multiple subdialogs at the same time?

Currently, you can only export or import subdialogs one at a time.

Last updated