# Scenarios

## What is a scenario?

A scenario in OpenDialog encompasses the set of functionalities that make up your AI  application.&#x20;

## Accessing the scenario overview

Each workspace holds one or more scenarios. You can access the Scenario overview through the left-hand panel menu, by selecting 'Scenarios' and then 'Overview'.&#x20;

You can also do so by accessing the Scenario overview through the dedicated button 'Manage scenarios'.

<figure><img src="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2FuqrKzmOTChThjdgrbjiM%2FScreenshot%202023-05-26%20at%2012.51.54.png?alt=media&#x26;token=cd220518-fff0-424e-b1ee-d2f1bad18a94" alt=""><figcaption><p>Access the scenario overview through the left-hand menu or via the Manage Scenarios button.</p></figcaption></figure>

{% hint style="info" %}
**Note**: If your workspace has no scenarios yet, the Workspace Dashboard will indicate 0 scenarios, and the button will say 'Create scenario.'  Clicking the 'Create scenario' button will allow you to create your first scenario. More on [creating new scenarios](#creating-a-new-scenario) below.
{% endhint %}

## Creating a new scenario

Create a new scenario using the main area's 'Create Scenario' button.

<figure><img src="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2FQf4lwooMh8uAsLvnG4Xl%2FScreenshot%202023-05-26%20at%2012.59.19.png?alt=media&#x26;token=68154561-4a52-4f1e-b392-e67fbfcff5e9" alt=""><figcaption><p>Create a new scenario via the 'Create new scenario'  button or import an existing scenario via a .json file</p></figcaption></figure>

Scenarios are by default, created in draft mode. To use in a live environment, set the scenario to active by toggling the switch in the bottom right corner of the scenario tile (example shown in top left corner of scenario list), and [publish](https://docs.opendialog.ai/opendialog-platform/launching-your-application) it.&#x20;

## Duplicating, deleting and exporting a scenario

Click the vertical dots icon in the top right corner of a scenario tile to access the duplicate, delete and export functionality.&#x20;

When duplicating a scenario the duplicated scenario will be added to the workspace as the last one in the list. You may have to refresh your browser for it to display.&#x20;

When you export a scenario, an email is sent to your registered email address in OpenDialog. The scenario is contained in an attached .json file, which can then be imported into another workspace.&#x20;

Duplicating and exporting may take a few minutes; you will be emailed when the resulting file is ready.&#x20;

<figure><img src="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2FgxyNc3k4A82NvLxs5cJW%2F2023-05-01_16-32-21.png?alt=media&#x26;token=1cefd26c-49bd-41c2-9ab9-5afc536417bb" alt=""><figcaption><p>Example of Scenario functionality</p></figcaption></figure>

## Importing a scenario

To import a scenario, you will need access to a .json file that you will upload during import. For example, you may have received a .json file as an export from another workspace or as an email attachment.&#x20;

<figure><img src="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2FWMvx2XD4d9VeluZ2kIzs%2FScreenshot%202023-05-26%20at%2013.05.41.png?alt=media&#x26;token=917de0cd-8bc9-4da4-a736-a54f0c9b0086" alt=""><figcaption><p>Import scenario option at the top of the main Scenario Overview area.</p></figcaption></figure>

Use the Import Scenario button at the top of the main area and provide the .json file. Note that there is a 10 Mb file size limit on scenario .json files.&#x20;

## Active and draft scenarios&#x20;

Scenarios can be in either an "Active" or in "Draft" mode.&#x20;

Active scenarios are available to be used in chat interfaces, while draft scenarios are not considered.&#x20;

## Scenario settings

You can edit the Scenario name, description, set a preferred interpreter (which will act as the default interpreter throughout the scenario) and also set conditions. Setting a condition on a scenario is relevant in a multi-agent architecture, where conditions on scenarios identify a scenario for consideration.&#x20;

<figure><img src="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2FJoXF57brAsTcj08Xh700%2F2023-05-18_14-54-46.png?alt=media&#x26;token=16eb9526-9e20-42b8-8f2b-f3119010d88b" alt=""><figcaption><p>Scenario settings in the conversation designer</p></figcaption></figure>

## How to design your scenario

<table data-card-size="large" data-view="cards" data-full-width="false"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="../the-opendialog-model"><strong>The OpenDialog model</strong></a></td><td>Take a deepdive into the underpinning model for OpenDialog applications.</td><td></td><td><a href="../the-opendialog-model">the-opendialog-model</a></td><td><a href="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2Fj7ipROc2mUc7Yb1TGNh1%2FOD-basicmodel.png?alt=media&#x26;token=3ee9d615-48e2-41be-9d88-a8dbdb2f26ca">OD-basicmodel.png</a></td></tr><tr><td><a href="../../opendialog-platform/conversation-designer"><strong>Designing your application</strong></a></td><td>Create a new scenario from a template or from scratch using OpenDialog's model and best practices.</td><td></td><td><a href="../../opendialog-platform/conversation-designer">conversation-designer</a></td><td><a href="https://3203401256-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdP6xFXXyeBbibro1Ywnq%2Fuploads%2FNEHaii7kvwKfqg6xS0qe%2Fapplicationdesign.png?alt=media&#x26;token=af5f5d45-dfaa-4d83-a534-db4a5d680b49">applicationdesign.png</a></td></tr></tbody></table>
