Reusable Subdialogs
Last updated
Last updated
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.
Navigate to the Subdialogs tab within the project you want to export from.
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.
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.
Open your target project and navigate to the Dialog screen, then click on the Subdialogs tab.
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.
Upon successful upload, a paperclip icon with the file name will appear. Click Next to proceed.
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.
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.
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.
Click Import.
Note: Once you click the Import button, the browser will refresh to upload the dialog into the target project.
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.
Click Next to continue.
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).
Click Next to continue.
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.
Click Import.
Note: Once you click the Import button, the browser will refresh to upload the dialog into the target project.
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.
Yes, you can import an unlimited number of nested subdialogs within a parent subdialog.
The environment variables will be imported but remain inactive. To activate and use these variables, you must first create an environment within your 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.
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.
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.
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.
No, this feature is included as part of the product offering without additional charges.