> ## Documentation Index
> Fetch the complete documentation index at: https://rasa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Your First Assistant

> Rasa Studio Tutorials for CALM assistants

In this guide, you’ll create a simple assistant that greets users, introduces itself, and helps with money transfers.
Don't worry if you're new to Rasa or building assistants, this guide will walk you through each step.

By the end of this tutorial you will have built a [CALM](/docs/learn/concepts/calm)-based assistant that greets users, introduces itself, and assists with money transfers.

## Step 1: Create a new assistant

1. **Log In:** Start by logging into Studio with either the `superuser` or `developer` role. [Learn more about the default roles and their permissions](/docs/studio/installation/setup-guides/authorization-guide).
2. **Create Your Assistant:**

* On the Welcome page, click **Create new project**.

  <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-assistant-project.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=79feb6b9ff096ebea08060c87ae41f87" alt="image" width="1204" height="1090" data-path="images/legacy/studio/tutorial/create-assistant-project.png" />
* Give your assistant a name that describes what it will do. Since we're building a bot that transfers money let's name it: `transfer_money_assistant`.
* Keep the **English** selected as a default language, then click **Create assistant**.

  <img src="https://mintcdn.com/rasa-43f32701/eLeGQhEoUGCT-ckv/images/legacy/studio/building/create-assistant-project2.png?fit=max&auto=format&n=eLeGQhEoUGCT-ckv&q=85&s=26c97f61cb642d732aeac53cf2965d47" alt="image" width="2224" height="1568" data-path="images/legacy/studio/building/create-assistant-project2.png" />

## Step 2: Create your First Conversation

One of the key concepts in Rasa's [CALM](/docs/learn/concepts/calm) (Conversational AI with Language Models) is a flow.
A flow represents a series of steps that guide the user through a conversation.
Think of it as a conversation tree, where each step helps the assistant figure out what to say or do next based on what the user says.

Now, let's create your first flow:

1. **Checkout the Flow Builder**: Navigate to the **Flows** page through the tab in the menu.
2. **Create your first flow**: Click **Create flow** to begin crafting your welcome flow.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-flow.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=0e540029d813acd34f94d75d683a025f" alt="image" width="2040" height="1284" data-path="images/legacy/studio/tutorial/create-flow.png" />
3. **Create an ID for your Flow**: Since this flow is going to welcome the user, at the beginning of our conversation let's name it **welcome**.\
   You can optionally add a flow name, but it’s fine to leave it blank for now.
4. **Write your Flow Description:** Let's describe the flow so your assistant knows when it should be triggered.
   Ensure you provide specific and unique instructions, in this case: `Greet the user and introduce yourself` is appropriate. Click "Save" to create and open your flow.

<Note>
  Flow descriptions are incredibly important for your assistant's ability to know where to take a conversation. Rasa assistants use the flow description to determine when it is appropriate to trigger a specific flow.\
  [Read more about flows here](/docs/reference/primitives/flows).
</Note>

<img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-welcome-flow.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=6663c44189e2894457c0960ce2554375" alt="Create Welcome Flow" width="944" height="1268" data-path="images/legacy/studio/tutorial/create-welcome-flow.png" />

5. Flows start with the "Start" step, which is where you configure how the flow gets triggered. By default, it will be triggered by CALM based on the description you provided. This works for us, so you can leave it as is for now.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/start-step.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=35e99b393f3edecef72c1d443bc40559" alt="Start Step" width="2562" height="1554" data-path="images/legacy/studio/tutorial/start-step.png" />
6. Click the "Plus" icon to add a step. From the dropdown menu, select "Send message" to have your assistant send a text message to the user.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/send-message-step.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=e66727a0f754ff75b74230d387875167" alt="Message Step" width="2538" height="1444" data-path="images/legacy/studio/tutorial/send-message-step.png" />
7. Click on "Select or create response" on the side panel. When the pop-up appears, click the "Create new response" button.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-new-response.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=18add4866201cb64d889527eb1c4e870" alt="Create New Response Modal" width="1890" height="1230" data-path="images/legacy/studio/tutorial/create-new-response.png" />
8. Fill in the details:

   1. Enter the name, e.g `greet`.
   2. Enter the response e.g "Hello! I’m your assistant, created with Rasa Studio. I’m here to help you with money transfers".
   3. Select "Use contextual response rephraser" to have the response automatically rephrased based on the conversation’s context.
   4. Once you're set, click "Save".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/welcome-flow-utter-greet.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=7962b950b62c8c752ea077666a89f49e" alt="Create Response" width="996" height="1142" data-path="images/legacy/studio/tutorial/welcome-flow-utter-greet.png" />

## Step 3: Creating Money Transfer flow

Let’s now build another flow to help users in conducting money transfers, allowing CALM to activate this process when users inquire about sending money. To do it:

1. Return to the flow list and click "Create flow".

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-more-flow.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=bed8e3e0538d52f3a798f91b3ab1bff9" alt="Create Flow Button" width="2562" height="1109" data-path="images/legacy/studio/tutorial/create-more-flow.png" />
2. Name your flow `money_transfer` and add the description: "Ask all the required questions to process a money transfer request from users." Click "Save".

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-transfer-money-flow.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=84398cfa3add9d0860a88061f499e654" alt="Create Flow" width="928" height="1274" data-path="images/legacy/studio/tutorial/create-transfer-money-flow.png" />

### Collecting information about the recipient

1. In the newly created flow, add the "Collect Information" step to ask the user who the recipient of the transfer will be.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/transfer-money-collect.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=b0d567a77b33a17fe13091f0be379806" alt="iCreate Collect Information Step" width="2562" height="1450" data-path="images/legacy/studio/tutorial/transfer-money-collect.png" />
2. Instruct the assistant on what information to collect in this step by filling out the "Description" field. For example, "This step inquires about the recipient of the payment."

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/collect-step-add-description.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=28f93bbf7b8388c54b1f835240508060" alt="image" width="2506" height="1516" data-path="images/legacy/studio/tutorial/collect-step-add-description.png" />
3. To define the specific information the assistant should collect from the user's reply, you'll need to create a [slot](/docs/reference/primitives/slots). Slots function as your bot's memory, it will hold the data that the user provides .
   To create a slot, click on the "Select or create slot" field and choose "Create slot."

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-create-slot.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=60070b595320a3a6717bea83a35a9bb2" alt="image" width="2768" height="1750" data-path="images/legacy/studio/tutorial/money-transfer-create-slot.png" />
4. Input `recipient` as a slot name. Then select `Text` as type—a text slot stores information like personal names, countries, cities, etc. While you can provide an initial value for any slot, it's not applicable in this scenario. [Learn more about slot types](/docs/studio/build/flow-building/collect#slot-types).

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-recipient-slot.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=8824127a08b208560cb94cdeaa44f7cb" alt="image" width="950" height="1076" data-path="images/legacy/studio/tutorial/money-transfer-recipient-slot.png" />
5. Finally, generate a response that the assistant will use to collect this information from the user. To do this, click "Select or create response".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-create-response.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=ae2e13e7d7a84ee1447dacd14c4a8132" alt="image" width="2768" height="1750" data-path="images/legacy/studio/tutorial/money-transfer-create-response.png" />
6. The system will automatically fill in the response name by combining the slot name with the prefix `utter_ask`, resulting in `utter_ask_recipient`. Enter the text as "Who would you like to send money to?"

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-utter-ask-recipient.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=14096f4ccab9effe6d85349340ee792e" alt="image" width="1014" height="1120" data-path="images/legacy/studio/tutorial/money-transfer-utter-ask-recipient.png" />
7. Decide whether to check the "Use contextual response rephraser" box. If you leave it unchecked, the assistant will always use the exact same wording. If you check it, the message will vary slightly each time, depending on the conversation context, making it sound more natural. [Learn more](/docs/reference/primitives/contextual-response-rephraser).

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-rephraser.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=86c280f1221352011f9177d2baf63de8" alt="image" width="996" height="1142" data-path="images/legacy/studio/tutorial/money-transfer-rephraser.png" />
8. If you prefer full control over responses or don’t want to use an LLM, you can manually create response variations by clicking the "Add variation" button. Add as many variations as you'd like. During the conversation, Rasa will randomly pick one of them.

   <img src="https://mintcdn.com/rasa-43f32701/MQtQODV4k9Yeq80-/images/legacy/studio/building/utter-greet-add-variations.png?fit=max&auto=format&n=MQtQODV4k9Yeq80-&q=85&s=09e1c21d7a198ba32944a7258080e042" alt="image" width="996" height="1142" data-path="images/legacy/studio/building/utter-greet-add-variations.png" />
9. By default, a "Collect Information" step can be skipped if the slot is already filled. For example, if a user says, "I want to transfer money to John" at the beginning of the conversation, the assistant will recognize John as the recipient and won't ask for the name again. If you want the assistant to always ask the question, even if the slot is already filled, enable the "Ask before filling" option. In this particular case, we recommend to leave it disabled.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-ask-before-filling.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=4af9b2cc70667d7987a0a1d2dcf152cb" alt="image" width="2622" height="1690" data-path="images/legacy/studio/tutorial/money-transfer-ask-before-filling.png" />
10. When the "Persist slot value" option is disabled, the system will clear the slot after the flow's final steps, prompting the question again in future sessions. This is useful for slots like `transfer_amount` or `recipient_name`, which can change each session. In this particular case, we recommend leaving the "Persist slot value" option disabled.

<img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-persist-slot-value.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=92f5840c5448f312bad00501ee02f185" alt="image" width="2766" height="1750" data-path="images/legacy/studio/tutorial/money-transfer-persist-slot-value.png" />

### Collecting information about the amount

1. Add one more "Collect information" step to ask the user about the amount of transfer.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-collect-info-amount.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=de24ec21d83576a7a594de0e99257e1e" alt="image" width="2768" height="1750" data-path="images/legacy/studio/tutorial/money-transfer-collect-info-amount.png" />
2. Enter the description: "This step inquires about the amount of the payment, in US Dollars."

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/collect-amount-description.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=60dbdbdacfc7eb88bf0c3ac3135ee06a" alt="Collect Amount" width="2664" height="1660" data-path="images/legacy/studio/tutorial/collect-amount-description.png" />
3. Create a new slot.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-amount-slot.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=59531a5554ca4d79e2f98a77837b5247" alt="image" width="2476" height="1740" data-path="images/legacy/studio/tutorial/money-transfer-amount-slot.png" />
4. Input `amount` as the slot name. Then select `Float` as type — it is employed for storing numerical values that can have decimal points. Click "Save".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-amount-slot-create.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=b4b93c957b8115bf4e21123ce6a08f87" alt="image" width="978" height="1112" data-path="images/legacy/studio/tutorial/money-transfer-amount-slot-create.png" />
5. Finally, generate a response that the assistant will use to collect this information from the user. To do this, click "Select or create response".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-amount-message.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=ecb8c3c16863e5fe13721a4e25768ea6" alt="image" width="2768" height="1750" data-path="images/legacy/studio/tutorial/money-transfer-amount-message.png" />
6. Modal to select or create new response will open. Click on "Create new response".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-amount-message-modal.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=73b559b2cdfe4cd9df17bb6009114833" alt="image" width="961" height="555" data-path="images/legacy/studio/tutorial/money-transfer-amount-message-modal.png" />
7. The system will automatically fill in the response name with `utter_ask_amount`. For the response content, you might use "How much money would you like to send (in US Dollars)?"

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-utter-ask-amount.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=32b9555797e93ba18e5e794b8c53fed1" alt="image" width="541" height="580" data-path="images/legacy/studio/tutorial/money-transfer-utter-ask-amount.png" />
8. You can optionally add buttons to give users structured choices, making it easier for them to quickly select an answer. To do this, click "Add button".

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/add-buttons-1.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=c1f82b98efad05b579d38bae297d5e30" alt="image" width="1008" height="1168" data-path="images/legacy/studio/tutorial/add-buttons-1.png" />
9. In the modal that opens, enter a button title, e.g., "50". You can leave the Payload field empty.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/add-buttons-2.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=0f2ce67de9552e885ade5bfc4a77ab23" alt="image" width="978" height="936" data-path="images/legacy/studio/tutorial/add-buttons-2.png" />
10. Click "Add another button" to add more options, such as `500`, `1000`, `1500`, etc. Don’t forget to save your buttons and the response when you're done.

<img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/add-buttons-3.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=8891f942673fe4cf4360406fb05c41c2" alt="image" width="1006" height="1194" data-path="images/legacy/studio/tutorial/add-buttons-3.png" />

11. Leave "Ask before filling" option disabled. If a user starts the conversation with "I want to transfer 50 dollars", the assistant will already fill the slot and won't to ask for the amount again.
    Also leave "Persist slot value" disabled to ensure that the next time a user requests a money transfer, the assistant will ask for the amount again.

<img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-ask.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=a6560d88ada5a945ad63d27cf8994f74" alt="image" width="2768" height="1750" data-path="images/legacy/studio/tutorial/money-transfer-ask.png" />

### Verifying if funds are sufficient

In this step, we aim to verify whether the user has sufficient funds for the transfer. Ideally, this is done using a custom action (API call) to check the user's balance and return a response. However, for the first part of the tutorial, we'll use Logic to mock the result of this custom action.

1. Add a "Logic" step. This type of step allows you to branch the flow based on a condition.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/transfer-money-add-logic.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=bb2127df5b8defd254ce56f0cab58ddd" alt="image" width="1333" height="834" data-path="images/legacy/studio/tutorial/transfer-money-add-logic.png" />
2. Define the condition for sufficient funds. Click on the first logic branch to create a scenario where the transaction amount is less than or equal to \$1000. If the transaction amount is less than the available funds, it indicates sufficient funds are available. Select the first condition and set it to `amount` `is less than or equal` `1000`.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/add-condition-logic-step.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=609752e0ce97b805826f802ec03cca38" alt="image" width="2660" height="1668" data-path="images/legacy/studio/tutorial/add-condition-logic-step.png" />
3. For cases where the user does not have enough funds, the "Else" logic branch will be activated. In this case, we need to notify the user that the transfer amount is insufficient. To do so, add a "Send message" step after the "Else" branch.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/send-fall-back-response.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=f22dcd2783b862c5158dd264968320aa" alt="image" width="2658" height="1530" data-path="images/legacy/studio/tutorial/send-fall-back-response.png" />
4. Create the response. Name it `insufficient_funds` and add the text "You don't have sufficient funds to complete this transaction." Click "Save."

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-else-reponse.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=2b92d6ac2ea35ec1410652bff5d3fe1b" alt="image" width="924" height="1090" data-path="images/legacy/studio/tutorial/money-transfer-else-reponse.png" />

### Confirming the request

If the user has sufficient funds, we can proceed to the next step: verifying the transfer details.

1. After the first condition, add the "Collect information" step.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-confirm-collect.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=3ea2af24ea345fb70f3df1a5cdf5e1d9" alt="image" width="2484" height="1434" data-path="images/legacy/studio/tutorial/money-transfer-confirm-collect.png" />
2. Add the description "This step asks the user to confirm the recipient and the transfer amount."

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-confirm-description.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=5c4ee4277d2a225ca0af76a24d87609d" alt="image" width="2484" height="1430" data-path="images/legacy/studio/tutorial/money-transfer-confirm-description.png" />
3. Create a slot and call it `final_confirmation`. Since you are asking a Yes or No question, you can store the result as a `Boolean` type. Click "Save".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/transfer-money-final-confirmation.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=024ffa107756fe860b4b17ade2ecce0a" alt="image" width="1020" height="1120" data-path="images/legacy/studio/tutorial/transfer-money-final-confirmation.png" />
4. Create a new assistant response, which will be automatically named `utter_ask_final_confirmation`. Enter the text "Please confirm that you want to transfer \{amount} to \{recipient}." We use curly brackets to reference slot values, so the amount and recipient saved from previous questions will be inserted here.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/final-confirmation.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=02cb7527703ce3ed3c0694db7a379a0c" alt="Confirmation Response" width="920" height="1032" data-path="images/legacy/studio/tutorial/final-confirmation.png" />
5. Enable "Ask before filling" so that with the next transfer, the assistant will not automatically fill this slot and will ask for confirmation again.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/transfer-money-ask-2.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=0443a4e10a296e3d984d812befa1cafd" alt="image" width="1335" height="833" data-path="images/legacy/studio/tutorial/transfer-money-ask-2.png" />
6. After the "Collect information", add the "Logic" step.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/transfer-money-logic-2.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=860b9b660f1821326d9ec3bc677edc70" alt="image" width="1340" height="837" data-path="images/legacy/studio/tutorial/transfer-money-logic-2.png" />
7. For the scenario where the user confirms the request (first logic branch), enter the following details: `final_confirmation` `is` `True`.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/final-confirmation-true.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=36fbabf0393cc01215a0d17491ecab22" alt="image" width="2488" height="1398" data-path="images/legacy/studio/tutorial/final-confirmation-true.png" />
8. The Else branch will automatically cover any other scenarios, such as the user denying the transfer or sending messages outside of the flow's business logic.

### Displaying success and cancel messages

If the user confirms the transaction request, we'll provide a success message.

1. After the `final_confirmation is true` branch, add the "Send message" step.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-success0.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=f5e31df1f4e7b0805ed343a5c9429d84" alt="image" width="2486" height="1400" data-path="images/legacy/studio/tutorial/money-transfer-success0.png" />
2. Create a new response named `transfer_successful` with the text "All done. \{amount} USD has been sent to \{recipient}."

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-success-response.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=6ef12a5d4989268f1ce8285e5bcc15af" alt="image" width="914" height="1056" data-path="images/legacy/studio/tutorial/money-transfer-success-response.png" />
3. For the Else branch, also add the "Send message" step.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-cancel-response0.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=f69858744a616c63ae6a30751760bd6e" alt="image" width="2486" height="1430" data-path="images/legacy/studio/tutorial/money-transfer-cancel-response0.png" />
4. Create a new message. Name it `cancel_transfer` and add the text "Transfer canceled". Click "Save".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-cancel-response1.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=95d290af5887f55b8b3f58d94ad8171c" alt="image" width="918" height="990" data-path="images/legacy/studio/tutorial/money-transfer-cancel-response1.png" />

### Linking to Feedback flow

Let's now ask users to leave feedback on the assistant's performance. For a complex assistant, this feedback logic can be reused in multiple scenarios, so it makes sense to separate it into a different flow.

1. Add a “Link” step after both “Transfer successful” and “Transfer canceled” messages. This step links flows together by ending the current flow and starting the target one.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-links.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=5dea8156a4d04f8d9856a7d8e55a8e1b" alt="image" width="2490" height="1370" data-path="images/legacy/studio/tutorial/money-transfer-links.png" />
2. In one of those Link steps, select "Create flow" in the dropdown.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-create-link-flow.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=668fd0c78e64d3a7dc5c54bcb9fada97" alt="image" width="2480" height="1372" data-path="images/legacy/studio/tutorial/money-transfer-create-link-flow.png" />
3. Name the new flow `leave_feedback`. Enter the description: "This flow collects user feedback on a scale from 1 to 5."

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/link-flow-creation-modal.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=6c3db677cfb64a51c9a0cc95cd0fc709" alt="image" width="922" height="1292" data-path="images/legacy/studio/tutorial/link-flow-creation-modal.png" />
4. Select the same flow in another Link step.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/link-to-leave-feedback.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=e9f526df33b90f6575d1877ab82f3e22" alt="image" width="2480" height="1384" data-path="images/legacy/studio/tutorial/link-to-leave-feedback.png" />

## Step 4: Building Feedback flow

1. Go to the `leave_feedback` flow that you’ve just created. You can do this by clicking on the "Open the flow in a new tab" link.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/open-linked-flow.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=a79154eb695fd0084d0df81dd11a7cc0" alt="image" width="2490" height="1400" data-path="images/legacy/studio/tutorial/open-linked-flow.png" />
2. We don't want the user to see the feedback flow out of nowhere and want it to only be triggered after particular operations with the assistant. To add this restriction, let's use [Flow guards](/docs/studio/build/flow-building/trigger-flows#flow-guards). Flow guards help you start the flow only if specific conditions are met, preventing automatic triggering with CALM or intents.
   To add a flow guard, select the "Start" step. This is where you configure how the flow can be started. Click on the "Flow guards" section.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/add-flow-guards.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=6e78175cd663065f0978eb40d9cb5423" alt="image" width="2482" height="1406" data-path="images/legacy/studio/tutorial/add-flow-guards.png" />
3. Select "Start the flow exclusively via links". This setting will ensure that this flow won't be started automatically by the LLM and will only be initiated after the "Link" step in the `transfer_money` flow.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/start-via-link-call.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=d569f5ea74075696afe183e2ce620d6a" alt="image" width="2492" height="1398" data-path="images/legacy/studio/tutorial/start-via-link-call.png" />
4. Now we can proceed to building the flow. Add the “Collect Information” step to ask the user if they want to leave feedback. Fill it with the following details:

   1. Add the step description "Ask user to leave feedback."
   2. Create a slot named `feedback` with a `Boolean` type, as it's a yes or No question.
   3. Add an assistant's message with the name `utter_ask_feedback` and the text "Do you want to leave feedback?"
   4. The result should look like this:

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/feedback-collect-step.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=d742e8dd66cde16cdee466ee9b1abb53" alt="image" width="2488" height="1408" data-path="images/legacy/studio/tutorial/feedback-collect-step.png" />
5. Following this question, insert the "Logic" step, and set the first logic branch to `feedback` `is` `true`. If the user is willing to leave feedback, the conversation will follow this branch.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/feedback-is-true.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=caaa1b90348388f91b14471cd3d5ff23" alt="image" width="2488" height="1410" data-path="images/legacy/studio/tutorial/feedback-is-true.png" />
6. After the Else branch — the case when the user doesn’t want to leave feedback — add the "Message" step. Name the new message `goodbye` and add the text "Thank you and have a great day!"

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/goodbye-messagepng.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=d04c90c8b5249b6f5b7452f1f1ec1d86" alt="image" width="2488" height="1414" data-path="images/legacy/studio/tutorial/goodbye-messagepng.png" />
7. After `feedback` `is` `true` branch, add the “Collect information” step to collect feedback from the users. Fill it with the following details:

   1. Add the step description "Ask users to rate the assistant's performance."
   2. Create a slot named `rating` with a `float` type, as we'll accept the number from 1 to 5.
   3. Add an assistant's message with the name `utter_ask_rating` and the text "How would you rate my performance from 1 to 5?" Optionally you can add buttons so user could easily pick the answer.
   4. The result should look like this:

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/collect-rating-info.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=a697fca05e71e5a8a8c8d27857f87cda" alt="image" width="2486" height="1914" data-path="images/legacy/studio/tutorial/collect-rating-info.png" />

Your simple assistant is ready!

## Step 5: Training and testing the assistant

Training and testing a model are fundamental steps in developing an assistant. Studio users can directly train their assistant within the user interface. To train your assistant:

1. Click the "Train" button.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/train-button.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=ac74ffa3551bc4fed67d5efa72e0c22d" alt="image" width="2484" height="1380" data-path="images/legacy/studio/tutorial/train-button.png" />
2. In the training panel, select the flows you want to include in the training. Select all flows, then click the "Start training" button.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/select-flows-for-training.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=c906c8733d1fa90476548645b1b72881" alt="image" width="2246" height="1336" data-path="images/legacy/studio/tutorial/select-flows-for-training.png" />
3. First, Studio will validate all your flows. If there are errors that could lead to training failures, you will see the "Unable to train the assistant" message. You can navigate through the list of flows with errors by clicking on their names. Once all errors are corrected, you can try to train the assistant again.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/validation-error.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=b6487bc6b764c03f8f5b5c0aef07bb06" alt="image" width="2479" height="889" data-path="images/legacy/studio/tutorial/validation-error.png" />
4. Once the training has started, you will see the following message:

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/training-in-progress.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=ad732d8b5e6b5d83b6846b9b83d88fc7" alt="image" width="2477" height="921" data-path="images/legacy/studio/tutorial/training-in-progress.png" />
5. If the training process encounters an issue or fails, the following message will appear. You can download training log and investigate the reason for the failure.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/failed.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=54bda115b0474771e504f495c54aeb91" alt="image" width="2624" height="1055" data-path="images/legacy/studio/tutorial/failed.png" />
6. In the event of a successful model training, you will see the green tick and the following message:

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/training-success.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=6375c66e302ab925c168c91092adfd9f" alt="image" width="2488" height="1156" data-path="images/legacy/studio/tutorial/training-success.png" />
7. After successful training, go to "Try your assistant" page to test how well the assistant navigates between your flows and provides the correct answers.

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/test.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=1ffb56b618fb3045cf0d1499d9066bcd" alt="image" width="2722" height="1594" data-path="images/legacy/studio/tutorial/test.png" />
8. Optionally, enable "Inspector mode" to access detailed event information and debugging tools.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/inspect.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=48cb2347187e33a8acd7a79a2cfe9a73" alt="image" width="2714" height="1602" data-path="images/legacy/studio/tutorial/inspect.png" />

## Step 6 \[Advanced]: Adding a custom action

A Custom action step can execute any code you desire, including API calls, database queries, and more. Whether it's turning on the lights, adding an event to a calendar, checking a user's bank balance, or anything else you can imagine, custom actions offer extensive flexibility.

As of now, custom actions can only be implemented outside of Studio. For details on how to implement a custom action, please refer to [the SDK Action Server documentation](/docs/reference/integrations/action-server/running-action-server). Any custom action that you want to use in flows should be added into the actions section of your [domain](/docs/reference/config/domain).

In this part of the tutorial, we are going to replace the previously created amount validation logic with a custom action.

1. Return to the `money_transfer` flow.
2. After the question about how much money you would like to transfer and before the logic branch, add a "Custom action" step.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/custom-action-step.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=3184cbcdbb38ccc2dc05e96f20cd624c" alt="image" width="2722" height="1602" data-path="images/legacy/studio/tutorial/custom-action-step.png" />
3. Open the custom action dropdown and click "Create custom action."

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/create-new-action.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=c9feb26ac2cbbee61ff9c60b0e1a9aff" alt="image" width="2716" height="1592" data-path="images/legacy/studio/tutorial/create-new-action.png" />
4. Enter the name `action_validate_sufficient_funds` and a description: "Goal: Validate whether the funds are sufficient for the transfer.
   Requirement: Check if the slot `amount` is greater than 1000. If true, return a `true` value for the slot `has_sufficient_funds`. If false, return a `false` value for the slot `has_sufficient_funds`."

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/money-transfer-new-custom-action.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=800db9a47363f0db54ef072d3027c2fe" alt="image" width="1018" height="942" data-path="images/legacy/studio/tutorial/money-transfer-new-custom-action.png" />
5. Select the first logic branch, the one labeled `amount` `is less_or_equal` `1000`. We’ll need to replace this with validation from the custom action. Instead of `amount`, create a new slot.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/ca-create-slot.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=fbcc96c0563ce1c8481a354432899031" alt="image" width="2714" height="1402" data-path="images/legacy/studio/tutorial/ca-create-slot.png" />
6. Enter slot name `has_sufficient_funds`. Select `Boolean` as a type and click "Save".

   <img src="https://mintcdn.com/rasa-43f32701/3m_1rqabZkSRtSZi/images/legacy/studio/tutorial/transfer-money-has-sufficient-funds.png?fit=max&auto=format&n=3m_1rqabZkSRtSZi&q=85&s=cf2f236ae864d9f52f1d06ce2d165db3" alt="image" width="990" height="1102" data-path="images/legacy/studio/tutorial/transfer-money-has-sufficient-funds.png" />
7. Set the condition so that `has_sufficient_funds` `is` `true`.

   <img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/ca-change-condition.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=45c6b31938a95e33290867fdf9e22ba1" alt="image" width="2708" height="1506" data-path="images/legacy/studio/tutorial/ca-change-condition.png" />
8. Switch to an IDE to set up your own Rasa Action Server.

   To do this, you need Rasa Pro 3.7.0 or newer.

   **Create a local Rasa project**

```shell theme={null}
rasa init --template calm
```

9. Implement the custom action that validates the amount of funds.
   You can copy/paste the following Python code in `actions/actions.py`:

```
# These files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/reference/primitives/custom-actions

from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.events import SlotSet

class ActionValidateSufficientFunds(Action):

   def name(self) -> Text:
      return "action_validate_sufficient_funds"

   def run(self, dispatcher: CollectingDispatcher,
         tracker: Tracker,
         domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
      # hard-coded balance for tutorial purposes. in production this
      # would be retrieved from a database or an API
      balance = 1000
      transfer_amount = tracker.get_slot("amount")
      has_sufficient_funds = transfer_amount <= balance
      return [SlotSet("has_sufficient_funds", has_sufficient_funds)]
```

10. Run action server using Rasa CLI.

```
rasa run actions
```

11. Use a reverse proxy like `ngrok` to expose the action server running on your local machine to the public internet and pass this to Studio for training. This can help you with quick prototyping & testing.
    Optionally you can also deploy this action server in your chosen cloud environment and pass the public URL to Studio to connect with your assistant.

```
ngrok http 5055
```

12. You can provide the URL + `/webhook` in **Assistant Settings - Configuration - Action Endpoint**:

<img src="https://mintcdn.com/rasa-43f32701/XHj2VCWI4cZ6KSTn/images/legacy/studio/tutorial/action-endpoint.png?fit=max&auto=format&n=XHj2VCWI4cZ6KSTn&q=85&s=a3bfa4f5dab9629cc76a1fd3a386bf06" alt="image" width="2920" height="1778" data-path="images/legacy/studio/tutorial/action-endpoint.png" />

13. Train and test your assistants again, as described in **Step 5**.

## Step 7: Editing YAML files \[Advanced]

1. Download YAML files from Studio via Rasa CLI.

   To do this, you need Rasa Pro 3.7.0 or newer. We recommend the latest Rasa version in order to use the latest features and improvements.
   Starting from Rasa Pro 3.9.8, you can download endpoint and config files as well.

   **Note:** Make sure you pass the value for `studio-url`, `realm-name` and `client-id` based on variables used during your Studio deployment

   **Create a new folder**

```shell theme={null}
mkdir my-assistant-name
cd my-assistant-name
```

**Configure CLI to connect to Studio**

```shell theme={null}
rasa studio config
```

Provide the Studio URL to configure the connection.

**Log in to Studio as a developer**

```shell theme={null}
rasa studio login
```

Provide the credentials of the user belonging to the developer group.

**Download assistant by assistant-name**

Run the below command to download the assistant files.

```shell theme={null}
rasa studio download <my-assistant-name>
```

This will download the assistant's files to the current directory. The default directory structure will look like this:

```
  |-endpoints.yml
  |-config.yml
  |-domain.yml
  |-data
  | |-studio_flows.yml
  | |-studio_nlu.yml
```

Run `rasa studio download --help` to see the full list of arguments.
2\. Apply changes, you can’t apply in Studio but only in YAML:

* view Tracing (Observability)
* add IVR Channel with AudioCodes
* run End-to-End Test
* use Secrets Management
* use PII Management
* add markers
* use Custom Information Retrieval
* add Conversation Tracking
* add Generation prompt in flow\.yml

3. Train the rasa model locally using rasa CLI.

```
rasa train
```

4. Test your assistant with custom action using Rasa Inspector.

```
rasa inspect
```


## Related topics

- [How to Set Up Your Assistant](/docs/studio/build/set-up-your-assistant.md)
- [Trying Your Assistant](/docs/pro/testing/trying-assistant.md)
- [Developer Quickstart](/docs/learn/quickstart/pro.md)
- [Flow Policy](/docs/reference/config/policies/flow-policy.md)
- [Responses](/docs/reference/primitives/responses.md)
